Strange error with nalgebra Vector3


#1

Hi !

I got a strange error while trying to create a Plane3 with a Vector3:

use nalgebra::Vector3;
use ncollide::shape::Plane3;

let chunk_plane = Plane3::new(Vector3::new(0.0, 1.0, 0.0));
error[E0308]: mismatched types
   --> src/gfx/chunk_manager.rs:110:39
    |
110 |         let chunk_plane = Plane3::new(Vector3::new(0.0_f32, 1.0, 0.0));
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `nalgebra::structs::vector::Vector3`, found struct `nalgebra::Vector3`
    |
    = note: expected type `nalgebra::structs::vector::Vector3<_>`
    = note:    found type `nalgebra::Vector3<f32>`

error: aborting due to previous error

error: Could not compile `test26`.

To learn more, run the command again with --verbose.

#2

Ok, I found the problem, ncollide 0.10.0 depends of nalgebra 0.9.0 and I used nalgebra 0.10.1.

Now it works but it needs a fix or an explanation I think.


#3

That’s right. Only the version 0.9 of nalgebra is supported at the moment (ncollide will be updated as soon as I am done with nalgebra v0.11.

I’ve made the user guide clearer.