Code Monkey home page Code Monkey logo

nphysics's People

Contributors

angrylawyer avatar benbergman avatar distransient avatar fabienjuif avatar james-rms avatar janhohenheim avatar jansegre avatar jeremystucki avatar jmeggitt avatar johnpmayer avatar jonas-schievink avatar kerollmops avatar liquidityc avatar m-ou-se avatar matthewsanetra avatar michaelriss avatar movingtomars avatar mxnemu avatar neachdainn avatar pengowen123 avatar pum-purum-pum-pum avatar quadrupleslap avatar ralith avatar ryanisaacg avatar sebcrozet avatar seppo0010 avatar ubershmekel avatar vks avatar vrixyz avatar yuvallanger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nphysics's Issues

Linux64 build error details (3df64)

cargo run [--release] --verbose spews out:

       Fresh winapi v0.2.4
       Fresh winapi-build v0.1.1
       Fresh libc v0.1.10
       Fresh rustc-serialize v0.3.16
       Fresh advapi32-sys v0.1.2
       Fresh rand v0.3.11
       Fresh num v0.1.27
       Fresh nalgebra v0.3.0
       Fresh ncollide_math v0.2.1
       Fresh ncollide_utils v0.2.3
       Fresh ncollide_procedural v0.2.3
       Fresh ncollide_entities v0.4.0
       Fresh ncollide_queries v0.3.1
       Fresh ncollide_transformation v0.2.2
       Fresh ncollide_pipeline v0.4.0
       Fresh ncollide v0.5.0
   Compiling nphysics v0.1.1 (https://github.com/sebcrozet/nphysics#248e90bc)
     Running `rustc /root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/lib.rs --crate-name nphysics --crate-type lib -g --cfg feature=\"3df64\" --cfg feature=\"f64\" --cfg feature=\"3d\" -C metadata=ee189578891c8629 -C extra-filename=-ee189578891c8629 --out-dir /root/nphysics-master/target/debug/deps --emit=dep-info,link -L dependency=/root/nphysics-master/target/debug/deps -L dependency=/root/nphysics-master/target/debug/deps --extern rustc_serialize=/root/nphysics-master/target/debug/deps/librustc_serialize-7ff5bfc027146194.rlib --extern num=/root/nphysics-master/target/debug/deps/libnum-397f282c1d72fe58.rlib --extern nalgebra=/root/nphysics-master/target/debug/deps/libnalgebra-2b850f0e7aef001b.rlib --extern ncollide=/root/nphysics-master/target/debug/deps/libncollide-96640172ad2a0af4.rlib --cap-lints allow`
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90:69: 90:91 error: borrowed value does not live long enough
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90                 for co2 in cw.interferences_with_aabb(&swept_aabb, &CollisionGroups::new()) {
                                                                                                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90:17: 116:18 note: reference must be valid for the destruction scope surrounding statement at 90:16...
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90                 for co2 in cw.interferences_with_aabb(&swept_aabb, &CollisionGroups::new()) {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:91                     if &*co2.data as *const RefCell<RigidBody> as usize !=
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:92                        &*o.value.body as *const RefCell<RigidBody> as usize {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:93                         let brb2 = co2.data.borrow();
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:94 
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:95                         let toi = geometry::time_of_impact(
                                                                                                                    ...
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90:17: 116:18 note: ...but borrowed value is only valid for the statement at 90:16
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90                 for co2 in cw.interferences_with_aabb(&swept_aabb, &CollisionGroups::new()) {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:91                     if &*co2.data as *const RefCell<RigidBody> as usize !=
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:92                        &*o.value.body as *const RefCell<RigidBody> as usize {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:93                         let brb2 = co2.data.borrow();
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:94 
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:95                         let toi = geometry::time_of_impact(
                                                                                                                    ...
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90:17: 116:18 help: consider using a `let` binding to increase its lifetime
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:90                 for co2 in cw.interferences_with_aabb(&swept_aabb, &CollisionGroups::new()) {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:91                     if &*co2.data as *const RefCell<RigidBody> as usize !=
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:92                        &*o.value.body as *const RefCell<RigidBody> as usize {
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:93                         let brb2 = co2.data.borrow();
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:94 
/root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/integration/translational_ccd_motion_clamping.rs:95                         let toi = geometry::time_of_impact(
                                                                                                                    ...
error: aborting due to previous error
Could not compile `nphysics`.

Caused by:
  Process didn't exit successfully: `rustc /root/.cargo/git/checkouts/nphysics-63c55fd7c3b635b7/master/src/lib.rs --crate-name nphysics --crate-type lib -g --cfg feature="3df64" --cfg feature="f64" --cfg feature="3d" -C metadata=ee189578891c8629 -C extra-filename=-ee189578891c8629 --out-dir /root/nphysics-master/target/debug/deps --emit=dep-info,link -L dependency=/root/nphysics-master/target/debug/deps -L dependency=/root/nphysics-master/target/debug/deps --extern rustc_serialize=/root/nphysics-master/target/debug/deps/librustc_serialize-7ff5bfc027146194.rlib --extern num=/root/nphysics-master/target/debug/deps/libnum-397f282c1d72fe58.rlib --extern nalgebra=/root/nphysics-master/target/debug/deps/libnalgebra-2b850f0e7aef001b.rlib --extern ncollide=/root/nphysics-master/target/debug/deps/libncollide-96640172ad2a0af4.rlib --cap-lints allow` (exit code: 101)

`set_lin_acc` is useless outside of nphysics.

The acceleration of each object is reset to the world's gravity at the beginning of each update. This mean that any call to set_lin_acc (or set_ang_acc) is just a no-op from the user point of view.

Here are some possible fixes:

  1. Let the user define his own force generator (which would replace the default BodyForceGenerator).
  2. Implement something like box2d's setGravityScale.
  3. Let each rigid body have a user-defined resultant force that would later be added to the gravity.

Can't build examples, missing glfw

When I try to build the examples, I get the following error when running make examples_deps:

make -C examples deps
make[1]: Entering directory `/home/jhasse/git/nphysics/examples'
mkdir -p lib
rustc ./lib/rust-sfml/src/rsfml/lib.rs --opt-level 3 --out-dir lib
make deps -C lib/kiss3d
make[2]: Entering directory `/home/jhasse/git/nphysics/examples/lib/kiss3d'
rustc --out-dir lib/glfw-rs --opt-level=3 lib/glfw-rs/src/glfw/lib.rs
error: couldn't read lib/glfw-rs/src/glfw/lib.rs: no such file or directory
task 'rustc' failed at 'explicit failure', /home/jhasse/git/rust/src/libsyntax/diagnostic.rs:102
task '<main>' failed at 'explicit failure', /home/jhasse/git/rust/src/librustc/lib.rs:443
make[2]: *** [deps] Error 101
make[2]: Leaving directory `/home/jhasse/git/nphysics/examples/lib/kiss3d'
make[1]: *** [deps] Error 2
make[1]: Leaving directory `/home/jhasse/git/nphysics/examples'
make: *** [examples_deps] Error 2

Is anyone already looking into the failing volumetric::volumetric_convex::test::test_inertia_tensor test?

For a while now the volumetric::volumetric_convex::test::test_inertia_tensor is failing.

I tried to track it down, but my println!( "... {:?}", ... ); attempts failed once I got to ncollide::ncollide_transform::convex_hull::get_initial_mesh().
The eigenvector calculation returns objects that cannot be printed via the {:?} formatting because the Debug trait is missing for them and ... I just cannot figure out how and where to fix it.
After the eigenvector values get weaved into points they are suddenly all NaN values.
So, something seems to be failing in the eigenvector section.

The other thing I saw is, that there was a major change in nalgebra with the QR algorithm. It could be that this was the crucial change that broke the nphysics test.

Beyond that, I'm at a loss what to do, did anyone already look into that? Any ideas/pointers for me?

Cargo build complains about missing math crate

I'm new to Rust so I apologize if this is due to some mistake on my side.

When I run cargo build in a freshly checked out copy of nphysics, I get this output:

$ cargo build
   Compiling nalgebra v0.1.0 (https://github.com/sebcrozet/nalgebra#15d1fa0b)
   Compiling ncollide v0.2.0 (https://github.com/sebcrozet/ncollide#bb591731)
   Compiling nphysics v0.1.0 (file:///Users/sam/rust/nphysics)
src/detection/joint/ball_in_socket.rs:2:5: 2:9 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/joint/ball_in_socket.rs:2 use math::Point;
                                            ^~~~
src/detection/joint/fixed.rs:1:5: 1:9 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/detection/joint/fixed.rs:1 use math::Matrix;
                                   ^~~~
src/resolution/constraint/velocity_constraint.rs:2:12: 2:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                              ^~~~
src/resolution/constraint/velocity_constraint.rs:2:20: 2:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                                      ^~~~
src/resolution/constraint/velocity_constraint.rs:2:26: 2:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                                            ^~~~
src/resolution/constraint/projected_gauss_seidel_solver.rs:2:12: 2:16 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/projected_gauss_seidel_solver.rs:2 use math::{Vect, Orientation};
                                                                        ^~~~
src/resolution/constraint/projected_gauss_seidel_solver.rs:2:18: 2:22 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/projected_gauss_seidel_solver.rs:2 use math::{Vect, Orientation};
                                                                              ^~~~
src/resolution/constraint/impulse_cache.rs:10:12: 10:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/impulse_cache.rs:10 use math::{Scalar, Point};
                                                         ^~~~
src/resolution/constraint/impulse_cache.rs:10:20: 10:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/impulse_cache.rs:10 use math::{Scalar, Point};
                                                                 ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:12: 7:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:7 use math::{Scalar, Vect, Orientation, Matrix};
                                                                     ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:20: 7:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:7 use math::{Scalar, Vect, Orientation, Matrix};
                                                                             ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:26: 7:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:7 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                   ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:39: 7:43 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:7 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                                ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:5:12: 5:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:5 use math::{Scalar, Point, Vect};
                                                                  ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:5:20: 5:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:5 use math::{Scalar, Point, Vect};
                                                                          ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:5:27: 5:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:5 use math::{Scalar, Point, Vect};
                                                                                 ^~~~
src/resolution/solver.rs:1:5: 1:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/solver.rs:1 use math::Scalar;
                               ^~~~
src/object/rigid_body.rs:11:12: 11:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                       ^~~~
src/object/rigid_body.rs:11:20: 11:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                               ^~~~
src/object/rigid_body.rs:11:27: 11:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                      ^~~~
src/object/rigid_body.rs:11:33: 11:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                            ^~~~
src/object/rigid_body.rs:11:46: 11:50 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                         ^~~~
src/object/rigid_body.rs:11:54: 11:58 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:11 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                                 ^~~~
src/integration/integrator.rs:3:5: 3:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/integrator.rs:3 use math::Scalar;
                                    ^~~~
src/integration/body_exp_euler_integrator.rs:4:5: 4:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_exp_euler_integrator.rs:4 use math::Scalar;
                                                   ^~~~
src/integration/body_force_generator.rs:3:12: 3:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                     ^~~~
src/integration/body_force_generator.rs:3:20: 3:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                             ^~~~
src/integration/body_force_generator.rs:3:26: 3:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                                   ^~~~
src/integration/euler.rs:5:12: 5:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                      ^~~~
src/integration/euler.rs:5:20: 5:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                              ^~~~
src/integration/euler.rs:5:27: 5:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                     ^~~~
src/integration/euler.rs:5:33: 5:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                           ^~~~
src/integration/euler.rs:5:46: 5:50 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                                        ^~~~
src/integration/body_damping.rs:3:5: 3:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_damping.rs:3 use math::Scalar;
                                      ^~~~
src/resolution/constraint/fixed_equation.rs:9:12: 9:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:9 use math::{Scalar, Vect, Orientation, Matrix};
                                                         ^~~~
src/resolution/constraint/fixed_equation.rs:9:20: 9:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:9 use math::{Scalar, Vect, Orientation, Matrix};
                                                                 ^~~~
src/resolution/constraint/fixed_equation.rs:9:26: 9:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:9 use math::{Scalar, Vect, Orientation, Matrix};
                                                                       ^~~~
src/resolution/constraint/fixed_equation.rs:9:39: 9:43 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:9 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                    ^~~~
src/integration/body_smp_euler_integrator.rs:7:5: 7:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_smp_euler_integrator.rs:7 use math::Scalar;
                                                   ^~~~
src/aliases/mod.rs:11:12: 11:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                 ^~~~
src/aliases/mod.rs:11:20: 11:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                         ^~~~
src/aliases/mod.rs:11:27: 11:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                ^~~~
src/aliases/mod.rs:11:33: 11:37 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                      ^~~~
src/aliases/mod.rs:11:41: 11:45 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                              ^~~~
src/detection/constraint.rs:8:12: 8:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                         ^~~~
src/detection/constraint.rs:8:20: 8:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                                 ^~~~
src/detection/constraint.rs:8:27: 8:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                                        ^~~~
src/detection/activation_manager.rs:14:12: 14:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/detection/activation_manager.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                  ^~~~
src/detection/activation_manager.rs:14:20: 14:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/activation_manager.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                          ^~~~
src/detection/activation_manager.rs:14:27: 14:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/detection/activation_manager.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                                 ^~~~
src/detection/activation_manager.rs:14:33: 14:37 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/detection/activation_manager.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                                       ^~~~
src/detection/activation_manager.rs:14:41: 14:45 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/detection/activation_manager.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                                               ^~~~
src/detection/joint/anchor.rs:5:5: 5:9 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/joint/anchor.rs:5 use math::Point;
                                    ^~~~
src/detection/bodies_bodies.rs:14:12: 14:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                             ^~~~
src/detection/bodies_bodies.rs:14:20: 14:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                     ^~~~
src/detection/bodies_bodies.rs:14:27: 14:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                            ^~~~
src/detection/bodies_bodies.rs:14:33: 14:37 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                                  ^~~~
src/detection/bodies_bodies.rs:14:41: 14:45 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:14 use math::{Scalar, Point, Vect, Matrix, AngularInertia};
                                                                          ^~~~
src/resolution/constraint/contact_equation.rs:7:12: 7:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:7 use math::{Scalar, Point, Vect, Orientation};
                                                           ^~~~
src/resolution/constraint/contact_equation.rs:7:20: 7:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:7 use math::{Scalar, Point, Vect, Orientation};
                                                                   ^~~~
src/resolution/constraint/contact_equation.rs:7:27: 7:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:7 use math::{Scalar, Point, Vect, Orientation};
                                                                          ^~~~
src/resolution/constraint/contact_equation.rs:7:33: 7:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:7 use math::{Scalar, Point, Vect, Orientation};
                                                                                ^~~~
src/world/world.rs:19:12: 19:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                 ^~~~
src/world/world.rs:19:20: 19:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                         ^~~~
src/world/world.rs:19:27: 19:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                ^~~~
src/world/world.rs:19:33: 19:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                      ^~~~
src/world/world.rs:19:46: 19:50 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                   ^~~~
src/world/world.rs:19:54: 19:58 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/world/world.rs:19 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                           ^~~~
error: aborting due to 68 previous errors
Could not compile `nphysics`.

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

Collision groups self-colliding

First, let me just say thanks for creating the nphysics library - simple to use and very performant!

Now, the bug. I have been developing with nphysics for a few weeks now in my repo and I have come across a problem when trying to create a simple table. To run the code:

git clone https://github.com/trolleyman/neat
cd neat
cargo run --release -- -pv

-p pauses the simulation
-v makes it verbose
F1 to resume the simulation
F2 to step the simulation

I create the entities in GameStateBuilder. This calls EntityBuilder a few times which calls Entity::with_matrix. This adds the rigid bodies to the world and adds the joints. I set the collision groups here, and you should see from the output that it adds each body to the collision group and disables self collision just in case. Any reason why it doesn't work?

Oh also, would it be possible to modify ncollide to allow for a potentially infinite pool of collision groups? I kind of need this to implement entities that don't glitch out completely...

Getting lots of errors when trying to compile

rustc 0.13.0-nightly (395901393 2014-11-24 00:46:30 +0000)

When typing cargo build, I get these errors:

src/integration/body_exp_euler_integrator.rs:4:5: 4:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_exp_euler_integrator.rs:4 use math::Scalar;
                                                   ^~~~
src/integration/euler.rs:5:12: 5:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                      ^~~~
src/integration/euler.rs:5:20: 5:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                              ^~~~
src/integration/euler.rs:5:27: 5:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                     ^~~~
src/integration/euler.rs:5:33: 5:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                           ^~~~
src/integration/euler.rs:5:46: 5:50 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/integration/euler.rs:5 use math::{Scalar, Point, Vect, Orientation, Matrix};
                                                                        ^~~~
src/integration/body_force_generator.rs:3:12: 3:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                     ^~~~
src/integration/body_force_generator.rs:3:20: 3:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                             ^~~~
src/integration/body_force_generator.rs:3:26: 3:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/integration/body_force_generator.rs:3 use math::{Scalar, Vect, Orientation};
                                                                   ^~~~
src/integration/integrator.rs:3:5: 3:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/integrator.rs:3 use math::Scalar;
                                    ^~~~
src/integration/body_damping.rs:3:5: 3:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_damping.rs:3 use math::Scalar;
                                      ^~~~
src/resolution/constraint/velocity_constraint.rs:2:12: 2:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                              ^~~~
src/resolution/constraint/velocity_constraint.rs:2:20: 2:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                                      ^~~~
src/resolution/constraint/velocity_constraint.rs:2:26: 2:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/velocity_constraint.rs:2 use math::{Scalar, Vect, Orientation};
                                                                            ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:4:12: 4:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:4 use math::{Scalar, Point, Vect};
                                                                  ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:4:20: 4:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:4 use math::{Scalar, Point, Vect};
                                                                          ^~~~
src/resolution/constraint/ball_in_socket_equation.rs:4:27: 4:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/ball_in_socket_equation.rs:4 use math::{Scalar, Point, Vect};
                                                                                 ^~~~
src/resolution/constraint/projected_gauss_seidel_solver.rs:2:12: 2:16 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/projected_gauss_seidel_solver.rs:2 use math::{Vect, Orientation};
                                                                        ^~~~
src/resolution/constraint/projected_gauss_seidel_solver.rs:2:18: 2:22 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/projected_gauss_seidel_solver.rs:2 use math::{Vect, Orientation};
                                                                              ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:6:12: 6:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:6 use math::{Scalar, Vect, Orientation, Matrix};
                                                                     ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:6:20: 6:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:6 use math::{Scalar, Vect, Orientation, Matrix};
                                                                             ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:6:26: 6:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:6 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                   ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:6:39: 6:43 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/resolution/constraint/accumulated_impulse_solver.rs:6 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                                ^~~~
src/resolution/constraint/impulse_cache.rs:11:12: 11:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/impulse_cache.rs:11 use math::{Scalar, Point};
                                                         ^~~~
src/resolution/constraint/impulse_cache.rs:11:20: 11:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/impulse_cache.rs:11 use math::{Scalar, Point};
                                                                 ^~~~
src/resolution/solver.rs:1:5: 1:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/solver.rs:1 use math::Scalar;
                               ^~~~
src/object/rigid_body.rs:10:12: 10:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                       ^~~~
src/object/rigid_body.rs:10:20: 10:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                               ^~~~
src/object/rigid_body.rs:10:27: 10:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                      ^~~~
src/object/rigid_body.rs:10:33: 10:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                            ^~~~
src/object/rigid_body.rs:10:46: 10:50 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                         ^~~~
src/object/rigid_body.rs:10:54: 10:58 error: unresolved import `math::AngularInertia`. Maybe a missing `extern crate math`?
src/object/rigid_body.rs:10 use math::{Scalar, Point, Vect, Orientation, Matrix, AngularInertia};
                                                                                 ^~~~
src/detection/joint/ball_in_socket.rs:2:5: 2:9 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/joint/ball_in_socket.rs:2 use math::Point;
                                            ^~~~
src/detection/joint/fixed.rs:1:5: 1:9 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/detection/joint/fixed.rs:1 use math::Matrix;
                                   ^~~~
src/resolution/mod.rs:5:52: 5:71 error: unresolved import `resolution::constraint::contact_equation::VelocityAndPosition`. There is no `VelocityAndPosition` in `resolution::constraint::contact_equation`
src/resolution/mod.rs:5 pub use resolution::constraint::contact_equation::{VelocityAndPosition, Velocity,
                                                                           ^~~~~~~~~~~~~~~~~~~
src/resolution/mod.rs:5:73: 5:81 error: unresolved import `resolution::constraint::contact_equation::Velocity`. There is no `Velocity` in `resolution::constraint::contact_equation`
src/resolution/mod.rs:5 pub use resolution::constraint::contact_equation::{VelocityAndPosition, Velocity,
                                                                                                ^~~~~~~~
src/resolution/mod.rs:6:52: 6:79 error: unresolved import `resolution::constraint::contact_equation::VelocityAndPositionThresold`. There is no `VelocityAndPositionThresold` in `resolution::constraint::contact_equation`
src/resolution/mod.rs:6                                                    VelocityAndPositionThresold, CorrectionMode};
                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:41: 7:45 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                  ^~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:47: 7:69 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                        ^~~~~~~~~~~~~~~~~~~~~~
src/resolution/constraint/accumulated_impulse_solver.rs:7:71: 7:86 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                                                ^~~~~~~~~~~~~~~
src/object/mod.rs:3:58: 3:64 error: unresolved import `object::rigid_body::Static`. There is no `Static` in `object::rigid_body`
src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                             ^~~~~~
src/object/mod.rs:3:66: 3:73 error: unresolved import `object::rigid_body::Dynamic`. There is no `Dynamic` in `object::rigid_body`
src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                     ^~~~~~~
src/object/mod.rs:3:75: 3:82 error: unresolved import `object::rigid_body::Deleted`. There is no `Deleted` in `object::rigid_body`
src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                              ^~~~~~~
src/object/mod.rs:3:84: 3:90 error: unresolved import `object::rigid_body::Active`. There is no `Active` in `object::rigid_body`
src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                                       ^~~~~~
src/object/mod.rs:3:92: 3:100 error: unresolved import `object::rigid_body::Inactive`. There is no `Inactive` in `object::rigid_body`
src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                                               ^~~~~~~~
src/detection/activation_manager.rs:10:29: 10:33 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                   ^~~~
src/detection/activation_manager.rs:10:35: 10:57 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                         ^~~~~~~~~~~~~~~~~~~~~~
src/detection/activation_manager.rs:10:59: 10:74 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                 ^~~~~~~~~~~~~~~
src/detection/joint/anchor.rs:5:5: 5:9 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/joint/anchor.rs:5 use math::Point;
                                    ^~~~
src/detection/joint/joint_manager.rs:11:41: 11:63 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                ^~~~~~~~~~~~~~~~~~~~~~
src/detection/joint/joint_manager.rs:11:65: 11:80 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                                        ^~~~~~~~~~~~~~~
src/detection/joint/joint_manager.rs:11:82: 11:86 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                                                         ^~~~
src/detection/constraint.rs:8:12: 8:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                         ^~~~
src/detection/constraint.rs:8:20: 8:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                                 ^~~~
src/detection/constraint.rs:8:27: 8:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/detection/constraint.rs:8 use math::{Scalar, Point, Vect};
                                                        ^~~~
src/detection/bodies_bodies.rs:12:41: 12:45 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
src/detection/bodies_bodies.rs:12 use detection::constraint::{Constraint, RBRB};
                                                                          ^~~~
src/detection/bodies_bodies.rs:15:12: 15:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:15 use math::{Scalar, Point, Vect, Matrix};
                                             ^~~~
src/detection/bodies_bodies.rs:15:20: 15:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:15 use math::{Scalar, Point, Vect, Matrix};
                                                     ^~~~
src/detection/bodies_bodies.rs:15:27: 15:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:15 use math::{Scalar, Point, Vect, Matrix};
                                                            ^~~~
src/detection/bodies_bodies.rs:15:33: 15:37 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/detection/bodies_bodies.rs:15 use math::{Scalar, Point, Vect, Matrix};
                                                                  ^~~~
src/integration/body_smp_euler_integrator.rs:7:5: 7:9 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/body_smp_euler_integrator.rs:7 use math::Scalar;
                                                   ^~~~
src/integration/translational_ccd_motion_clamping.rs:11:12: 11:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/integration/translational_ccd_motion_clamping.rs:11 use math::{Scalar, Point, Vect};
                                                                   ^~~~
src/integration/translational_ccd_motion_clamping.rs:11:20: 11:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/integration/translational_ccd_motion_clamping.rs:11 use math::{Scalar, Point, Vect};
                                                                           ^~~~
src/integration/translational_ccd_motion_clamping.rs:11:27: 11:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/integration/translational_ccd_motion_clamping.rs:11 use math::{Scalar, Point, Vect};
                                                                                  ^~~~
src/resolution/constraint/fixed_equation.rs:8:12: 8:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:8 use math::{Scalar, Vect, Orientation, Matrix};
                                                         ^~~~
src/resolution/constraint/fixed_equation.rs:8:20: 8:24 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:8 use math::{Scalar, Vect, Orientation, Matrix};
                                                                 ^~~~
src/resolution/constraint/fixed_equation.rs:8:26: 8:30 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:8 use math::{Scalar, Vect, Orientation, Matrix};
                                                                       ^~~~
src/resolution/constraint/fixed_equation.rs:8:39: 8:43 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/resolution/constraint/fixed_equation.rs:8 use math::{Scalar, Vect, Orientation, Matrix};
                                                                                    ^~~~
src/resolution/constraint/contact_equation.rs:8:12: 8:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:8 use math::{Scalar, Point, Vect, Orientation};
                                                           ^~~~
src/resolution/constraint/contact_equation.rs:8:20: 8:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:8 use math::{Scalar, Point, Vect, Orientation};
                                                                   ^~~~
src/resolution/constraint/contact_equation.rs:8:27: 8:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:8 use math::{Scalar, Point, Vect, Orientation};
                                                                          ^~~~
src/resolution/constraint/contact_equation.rs:8:33: 8:37 error: unresolved import `math::Orientation`. Maybe a missing `extern crate math`?
src/resolution/constraint/contact_equation.rs:8 use math::{Scalar, Point, Vect, Orientation};
                                                                                ^~~~
src/aliases/mod.rs:11:12: 11:16 error: unresolved import `math::Scalar`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix};
                                 ^~~~
src/aliases/mod.rs:11:20: 11:24 error: unresolved import `math::Point`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix};
                                         ^~~~
src/aliases/mod.rs:11:27: 11:31 error: unresolved import `math::Vect`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix};
                                                ^~~~
src/aliases/mod.rs:11:33: 11:37 error: unresolved import `math::Matrix`. Maybe a missing `extern crate math`?
src/aliases/mod.rs:11 use math::{Scalar, Point, Vect, Matrix};
                                                      ^~~~
src/world/world.rs:18:52: 18:71 error: unresolved import (maybe you meant `VelocityAndPosition::*`?)
src/world/world.rs:18 use resolution::{Solver, AccumulatedImpulseSolver, VelocityAndPosition};
                                                                         ^~~~~~~~~~~~~~~~~~~
src/detection/activation_manager.rs:12:25: 12:32 error: unresolved import (maybe you meant `Deleted::*`?)
src/detection/activation_manager.rs:12 use object::{RigidBody, Deleted};
                                                               ^~~~~~~
error: aborting due to 78 previous errors
Could not compile `nphysics`.

Unexpected damped collision response?

Hi,
I've created a simple demo app using nphysics, but rendering with glium at:
https://github.com/taumuon/rustygameproto

I have a cuboid dynamic object (drawn as a teapot) colliding with a static plane. When running the simulation, can see the teapot/cuboid fall and accelerate downwards, but when it hits the plane it stops dead.

I've set friction to zero, and coefficient of restitution to 1, so I'd expect an elastic collision, and for the teapot/cuboid to bounce back upwards, but that doesn't happen - can you please look at my code and see what I'm doing wrong?

Thanks!

Simulations are no longer deterministic.

The HashMap api related to custom hasher is not yet accessible from a stable Rust compiler. Thus, we cannot use a non-random hasher. This should be fixable in future version of the compiler.

source trait is inaccessible ... module is private

This is actually a bug on rust. I'm opening this issue to track a workaround while the bug is there.

As with rustc 0.13.0-nightly (f03745244 2014-10-26 16:42:33 +0000) the following happens a lot:

src/detection/activation_manager.rs:130:28: 130:50 error: source trait is inaccessible
src/detection/activation_manager.rs:130                     match (bis.borrow().anchor1().body.as_ref(), bis.borrow().anchor2().body.as_ref()) {
                                                                   ^~~~~~~~~~~~~~~~~~~~~~
src/detection/activation_manager.rs:130:28: 130:50 note: module `joint` is private
src/detection/activation_manager.rs:130                     match (bis.borrow().anchor1().body.as_ref(), bis.borrow().anchor2().body.as_ref()) {
                                                                   ^~~~~~~~~~~~~~~~~~~~~~

As a workaround the module can be pub'd.
I'm also opening a pull request with this workaround to be merged if it makes sense.

nphysics no longer compiles on nightly

When trying to compile nphysics on a nightly created on or after 2016-04-14, the compiler errors. Before this date it is fine. This error is produced:

   Compiling nphysics3d v0.2.2 (https://github.com/sebcrozet/nphysics.git#b379109f)
error: internal compiler error: ../src/librustc_trans\debuginfo\type_names.rs:155: debuginfo: Trying to create type name for unexpected type: <na::Pnt3<f32> as nc::ncollide_math::Point>::Vect
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', ../src/libsyntax\errors/mod.rs:575

Reduce the number of `use` on demos.

When people look at the example, they think there are too much imports; and so do I. Also, there is a lot of import something::some_type::SomeType. This is uggly because of the redundency of SomeType.

This is because a lot of types and traits must be imported, and all the libs are design with a 1-struct-per-file policy.

Now that pub use (reexport) seems to be fixed in rustc, those problems may be dealt with.

Implement ghost- aka. sensor-objects

Objects who report overlaps/collisions with other objects, but don't actually affect them.
Bullet3d calls them ghost-objects; for Box2d and Chipmunk2d, they're sensors.

src/math.rs is empty?!

It's weird that this file contains zero lines.
Also, I tried building the doc, that failed and several errors showed up stating that math* is missing.

I doubt this is a coincidence. Maybe an error uploading the file?

Relative orientation forces?

Hi, currently stuff like RigidBody::append_lin_force and RigidBody::append_force_wrt_point append a force with respect to the world orientation, not the orientation of the body. This means that even if the object is rotating, it will still accelerate in one direction. Do you think it would be possible to add in forces relative to the orientation of the rigid body?

error[E0283]: type annotations required: cannot resolve `_: alga::general::real::Real`

Getting this error:

   Compiling tts v0.1.0 (file:///home/nolan/Projects/Wasm/tts)
error[E0283]: type annotations required: cannot resolve `_: alga::general::real::Real`
  --> src/ecs.rs:87:29
   |
87 |         let physics_world = nphysics2d::world::World::new();
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: required by `<ecs::nphysics2d::world::World<N>>::new`

Do I need to pull in another crate? I'm trying to store the World instance in a struct so my ECS can access it, and it seems like I'm missing an initialization step before I can do that. I've studied the examples, and they all seem to tweak the world and bodies in the same module, when what I want to do is just instantiate the world and set up bodies elsewhere.

Thanks.

Point-projection to support-mapped shapes is broken.

This line expects to be able to translate the matrix m. However, Identity::new() is passed when support-mapped shapes use this function to implement LocalPointQuery (e.g. this line). This panics because Identity is supposed to remain constant.

This bug was not discovered before #31 landed as point queries on those shapes were not used before.

Learning resources

Could you please suggest any resources which can be useful to get more solid idea on how this library should be used. For example how do restitution and frictions work and what values in what ranges should be used. Thanks!

Avoiding mutable state?

Hi, there. I was thinking about adopting nphysics as a base for a game engine. Now, I am currently looking into functional reactive game design and the current API of nphysics does not play well with that, as it heavily relies on mutable state.

Ideally I would like to have the physics engine transform a list of bodies into a new list of bodies each step. Maybe this could already be accomplished by having World implement Clone and then doing something like:

fn step(world: &World, dt: Scalar) -> World {
    let mut new_world = world.clone();
    new_world.step(dt);
    new_world
}

Thereby the mutability is confined to the local scope of this function, which would already be fine for my purposes. Of course, I hope that stepping typically takes more time than cloning, so that this is actually viable performance-wise. Do you think this is feasible?

error: can't find crate for `rustc_serialize` when used via Cargo

So, when I have the following in my Cargo.toml:

git = "https://github.com/sebcrozet/nphysics"

I seem to get the following:

Compiling nphysics2df64 v0.1.0 (https://github.com/sebcrozet/nphysics#267f1307) /Users/tony/.cargo/git/checkouts/nphysics-d13c65e323a1814d/master/src/lib.rs:90:1: 90:51 error: can't find crate for rustc_serialize /Users/tony/.cargo/git/checkouts/nphysics-d13c65e323a1814d/master/src/lib.rs:90 extern crate "rustc-serialize" as rustc_serialize;

Looking at the dependencies in nphysics, you're pulling in rustc-serialize, but it just doesn't seem to be able to see it.

I've tried including rustc-serialize in my main project, and I've tried all the iterations of nphysics possible, and it stays not working.

Any ideas?

Fails to build, looks like something changed in nalgebra?

$ make
cd build/nphysics2df32; cargo build --release
   Compiling nphysics2df32 v0.1.0 (file:///home/johnpmayer/nphysics/build/nphysics2df32)
../../src/detection/joint/ball_in_socket.rs:75:17: 75:77 error: the trait `nalgebra::structs::iso::Iso2TransformRhs<f32>` is not implemented for the type `nalgebra::structs::vec::Vec2<f32>`
../../src/detection/joint/ball_in_socket.rs:75                 b.borrow().transform_ref().transform(&self.anchor1.position)
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/detection/joint/ball_in_socket.rs:86:17: 86:77 error: the trait `nalgebra::structs::iso::Iso2TransformRhs<f32>` is not implemented for the type `nalgebra::structs::vec::Vec2<f32>`
../../src/detection/joint/ball_in_socket.rs:86                 b.borrow().transform_ref().transform(&self.anchor2.position)
                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/resolution/constraint/accumulated_impulse_solver.rs:275:44: 275:63 error: the trait `nalgebra::structs::pnt::Pnt2AddRhs<f32,<generic #857>>` is not implemented for the type `nalgebra::structs::pnt::Pnt2<f32>`
../../src/resolution/constraint/accumulated_impulse_solver.rs:275                                           (c.world1 + c.world2) / na::cast::<f32, Scalar>(2.0));
                                                                                                             ^~~~~~~~~~~~~~~~~~~
../../src/resolution/constraint/accumulated_impulse_solver.rs:275:43: 275:64 error: the type of this value must be known in this context
../../src/resolution/constraint/accumulated_impulse_solver.rs:275                                           (c.world1 + c.world2) / na::cast::<f32, Scalar>(2.0));
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~
../../src/resolution/constraint/contact_equation.rs:101:19: 101:44 error: the trait `nalgebra::structs::pnt::Pnt2AddRhs<f32,<generic #183>>` is not implemented for the type `nalgebra::structs::pnt::Pnt2<f32>`
../../src/resolution/constraint/contact_equation.rs:101     let center = (coll.world1 + coll.world2) * na::cast::<f32, Scalar>(0.5);
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
../../src/resolution/constraint/contact_equation.rs:101:18: 101:45 error: the type of this value must be known in this context
../../src/resolution/constraint/contact_equation.rs:101     let center = (coll.world1 + coll.world2) * na::cast::<f32, Scalar>(0.5);
                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/object/rigid_body.rs:127:31: 127:85 error: the trait `nalgebra::structs::iso::Iso2TransformRhs<f32>` is not implemented for the type `nalgebra::structs::vec::Vec2<f32>`
../../src/object/rigid_body.rs:127         self.center_of_mass = self.local_to_world.transform(&self.ls_center_of_mass);
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/object/rigid_body.rs:243:13: 243:24 error: mismatched types: expected `core::option::Option<(f32,nalgebra::structs::vec::Vec2<f32>,nalgebra::structs::mat::Mat1<f32>)>`, found `core::option::Option<(f32,nalgebra::structs::pnt::Pnt2<f32>,nalgebra::structs::mat::Mat1<f32>)>` (expected struct nalgebra::structs::vec::Vec2, found struct nalgebra::structs::pnt::Pnt2)
../../src/object/rigid_body.rs:243             Some(props),
                                               ^~~~~~~~~~~
error: aborting due to 8 previous errors
Could not compile `nphysics2df32`.

To learn more, run the command again with --verbose.
make: *** [all] Error 101
$ rustc --version
rustc 0.13.0-nightly (1add4dedc 2014-10-10 18:47:03 +0000)

Support temporarily removing bodies from the physics world

I'm working on a VR project, where the player will routinely pick up physics objects (causing them to be attached to their tracked controller and no longer participate in collision detection or dynamics) for short periods and then release them (causing them to re-enter the simulation at a nearby position and velocity).

At first, it seems like World::remove_rigid_body is the right tool, but there are a few issues:

  • The body might have attached sensors, and it's unclear what happens to those
  • It calls RigidBody::delete, which sets the body's ActivationState to Deleted, and there doesn't seem to be a good way to undo this with public API
  • World::add_rigid_body takes a RigidBody, not a RigidBodyHandle, so it is difficult to avoid cloning the RigidBody every time it has to be re-added

A better option is be to modify the body's collision groups to disable all collision, but this is still ugly as nphysics and ncollide will still process it for collision and dynamics.

Fully integrate collision groups into nphysics.

Collision groups are useful to prevent some object from colliding with others. It is already part of the ncollide API, though it is not yet fully exploited by nphysics. There are two steps for a complete integration:

  • Allowing the user to pass its own collision group to the physics engine at rigid-body construction time. This should be implemented soon.
  • Allowing the user to change the collision group of a rigid body after it has been added to the scene. This one involves some intricate development on ncollide so it is much more complicated and won't be added in the very short term.

The first step is quite simple to implement as it just amounts to:

  1. Wrap ncollide's CollisionGroup structure into another that will prevent the user from messing with the group reserved by nphysics for its own purposes (i.e. the group of static objects).
  2. Add an instance of this new structure to the RigidBody and add accessors to modify it (in a first implementation, the modification will have no effect if it is performed after the rigid body has been added to the scene). If the rigid body is static, the corresponding group should be set automatically after the user modified the group.
  3. Modify the World::add_body(...) method so that is passes added rigid body group to the collision world.

The second step is more complicated as it requires some non-trivial bookkeeping-related work on ncollide as well.

Related discussion: #50 .

Can't run examples because of glfw

Why are there so many unresolved symbols?

D:\3rdparty\nphysics\examples3d> cargo run --bin pyramid
   Compiling nphysics-examples v0.1.0 (file:///D:/3rdparty/nphysics/examples3d)
error: linking with `link.exe` failed: exit code: 1120
  |
  = note: "D:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\pyramid-0119cd4ae111172e.0.o" "/OUT:D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\pyramid-0119cd4ae111172e.exe" "/OPT:REF,NOICF" "/DEBUG" "/LIBPATH:D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps" "/LIBPATH:D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\build\\libz-sys-26642ca3039fad06\\out/lib" "/LIBPATH:D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\build\\glfw-sys-c1a3c1c76fb1fe80\\out\\lib" "/LIBPATH:D:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\atlmfc\\lib\\amd64" "/LIBPATH:D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\build\\miniz-sys-39fcb02f7f4ce887\\out" "/LIBPATH:D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnphysics_testbed3d-13cb258131c35abc.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnphysics3d-1875b544079f9147.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide-e167dceee39f4149.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_transformation-4bacaae9fbb9e87c.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_pipeline-b4295239c2cf63dd.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_geometry-9637f1b7b164bf65.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libkiss3d-33f943f4130729c3.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libfreetype-7726ff20590e6040.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libfreetype_sys-bd32df73ffdbd35f.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_procedural-1628aa22b056d1bc.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_utils-d0e2797ed6c0334a.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libncollide_math-534247f4c3be523c.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnalgebra-c11aed5635e31e59.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libalga-d969fb19715d49d7.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libgeneric_array-df5d85eda373eb71.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libtypenum-90d837c46950acec.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libapprox-f9c0d4d75c1ef8e8.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libgl-1920c5fe81917b78.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libglfw-6caab83a7a5b70a4.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\liblog-2d7fe76296fc476d.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libsemver-7d74d02030743925.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libtime-c1644c9633aab5f6.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libkernel32-03bb4a717fde1ed3.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libwinapi-28b70638917d7474.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnom-acd2f8badce41144.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libbitflags-b8d76143e708b50f.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libimage-81191e59bea1bdad.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libgif-bd5e0275d4ac9c57.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\liblzw-cb4e33d535bab5c7.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libpng-707fb413fa752597.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libflate2-4706b30ecc5b7c62.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libinflate-a4e73c39fc85e8e9.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libenum_primitive-596d2f222fec5acc.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum-bd100bf03736138e.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_rational-f82fd0cec275917c.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_bigint-59314f95d5b7d893.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\librand-0871b76acefc840a.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_complex-d0d353effea9cff8.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\librustc_serialize-81a38e5345199ff5.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_iter-8029fd4d5df0c26a.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_integer-f6e14a77cef21d06.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libnum_traits-8671c5b1c48f503b.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libbyteorder-ee847f9fc4bc88eb.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libbitflags-23e2ddeae2bb1389.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libminiz_sys-1af9ba3d64c8da45.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\liblibc-4fcf2131db730d1b.rlib" "D:\\3rdparty\\nphysics\\examples3d\\target\\debug\\deps\\libcolor_quant-b5626d56b815e8b3.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-8241ac252ca16ee1.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-cd7b4e84e2c3992e.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-611004fdd02c4aa5.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-6a73bc1de174af09.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-47ae876d44de4b0a.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc_system-d20de0f264ff92ff.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_unicode-c2a6e747c719f48a.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librand-cc3b6afa6d74bc72.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-fea14809a8968a6d.rlib" "D:\\Program Files\\.multirust\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-3c69b398d914eae9.rlib" "freetype.lib" "opengl32.lib" "gdi32.lib" "kernel32.lib" "advapi32.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "shell32.lib" "msvcrt.lib"
  = note: libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_TrackMouseEvent referenced in function windowProc
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetMessageTime referenced in function translateKey
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SendMessageW referenced in function _glfwPlatformSetWindowIcon
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PostMessageW referenced in function _glfwPlatformPostEmptyEvent
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WaitMessage referenced in function _glfwPlatformWaitEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function windowProc
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_UnregisterClassW referenced in function _glfwUnregisterWindowClassWin32
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassExW referenced in function _glfwRegisterWindowClassWin32
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function createNativeWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_init.obj) : error LNK2001: unresolved external symbol __imp_CreateWindowExW
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function _glfwPlatformDestroyWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_init.obj) : error LNK2001: unresolved external symbol __imp_DestroyWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function _glfwPlatformCreateWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_init.obj) : error LNK2001: unresolved external symbol __imp_ShowWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MoveWindow referenced in function _glfwPlatformSetWindowAspectRatio
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPos referenced in function _glfwPlatformSetWindowMonitor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsWindowVisible referenced in function _glfwPlatformWindowVisible
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsIconic referenced in function _glfwPlatformWindowIconified
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_BringWindowToTop referenced in function _glfwPlatformCreateWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsZoomed referenced in function _glfwPlatformWindowMaximized
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OpenClipboard referenced in function _glfwPlatformGetClipboardString
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CloseClipboard referenced in function _glfwPlatformGetClipboardString
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetClipboardData referenced in function _glfwPlatformSetClipboardString
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClipboardData referenced in function _glfwPlatformGetClipboardString
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_EmptyClipboard referenced in function _glfwPlatformSetClipboardString
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetFocus referenced in function _glfwPlatformCreateWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetActiveWindow referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetKeyState referenced in function getKeyMods
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetAsyncKeyState referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetKeyNameTextW referenced in function _glfwPlatformGetKeyName
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function windowProc
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function windowProc
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MsgWaitForMultipleObjects referenced in function _glfwPlatformWaitEventsTimeout
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetSystemMetrics referenced in function _glfwPlatformSetWindowIcon
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function _glfwPlatformCreateWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function createIcon
          libglfw-6caab83a7a5b70a4.rlib(wgl_context.obj) : error LNK2001: unresolved external symbol __imp_GetDC
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function createIcon
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetPropW referenced in function createNativeWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetPropW referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RemovePropW referenced in function _glfwPlatformDestroyWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function _glfwPlatformSetWindowTitle
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClientRect referenced in function _glfwPlatformGetFramebufferSize
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowRect referenced in function _glfwPlatformSetWindowAspectRatio
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_AdjustWindowRectEx referenced in function _glfwPlatformGetWindowFrameSize
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursorPos referenced in function _glfwPlatformPollEvents
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursor referenced in function _glfwPlatformSetCursor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function _glfwPlatformGetCursorPos
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClipCursor referenced in function updateClipRect
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClientToScreen referenced in function _glfwPlatformGetWindowPos
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ScreenToClient referenced in function _glfwPlatformGetCursorPos
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WindowFromPoint referenced in function cursorInClientArea
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetRect referenced in function _glfwPlatformGetWindowFrameSize
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PtInRect referenced in function cursorInClientArea
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowLongW referenced in function _glfwPlatformSetWindowMonitor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowLongW referenced in function _glfwPlatformSetWindowMonitor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClassLongPtrW referenced in function _glfwPlatformSetWindowIcon
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadCursorW referenced in function _glfwPlatformCreateStandardCursor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DestroyIcon referenced in function _glfwPlatformDestroyCursor
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function _glfwRegisterWindowClassWin32
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateIconIndirect referenced in function createIcon
          libglfw-6caab83a7a5b70a4.rlib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CopyIcon referenced in function _glfwPlatformCreateStandardCursor
          libglfw-6caab83a7a5b70a4.rlib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function createHelperWindow
          libglfw-6caab83a7a5b70a4.rlib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
          libglfw-6caab83a7a5b70a4.rlib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ChangeDisplaySettingsExW referenced in function _glfwPlatformGetVideoModes
          libglfw-6caab83a7a5b70a4.rlib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsW referenced in function _glfwPlatformGetVideoMode
          libglfw-6caab83a7a5b70a4.rlib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsExW referenced in function _glfwPlatformGetMonitorPos
          libglfw-6caab83a7a5b70a4.rlib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayDevicesW referenced in function _glfwPlatformGetMonitors
          libglfw-6caab83a7a5b70a4.rlib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceInfoA referenced in function supportsXInput
          libglfw-6caab83a7a5b70a4.rlib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceList referenced in function supportsXInput
          D:\3rdparty\nphysics\examples3d\target\debug\deps\pyramid-0119cd4ae111172e.exe : fatal error LNK1120: 69 unresolved externals
          

error: aborting due to previous error(s)

error: Could not compile `nphysics-examples`.

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

Static bodies' positions aren't propagated to collision world

Changing the position of a static body using set_transformation and related methods has no apparent effect, as its position in the collision world remains unchanged. A simple workaround is to add this method to the World class:

/// Acknowledge changes to a static rigid body's position.
pub fn update_static_body_position(&mut self, b: &RigidBodyHandle<N>) {
    let rb = b.borrow_mut();
    self.cworld.deferred_set_position(&**b as *const RefCell<RigidBody<N>> as usize,
                                      rb.position().clone());
}

However, this may be considered a bit of a hack. On the other hand, I'm not sure what a better solution would be. Adding a branch to set_transformation to check if the body is static (and if so, add it to a list of objects that need to be updated) might be slow for many physics objects. If sensors and rigid bodies are now distinct objects, though, maybe it would be worth it to have type-level distinction between dynamic and static bodies. For now, the hack does just fine.

Does not compile with my nightly

Version

$ rustc --version
rustc 1.9.0-nightly (d7a71687e 2016-03-24)

What I was trying to do

I just want to test out gravity.rs to get a feel for how this library works. So I made a new project, copied the contents of gravity.rs from the repo into a file and added nphysics to my deps. Then I ran cargo build, which gave me this error:

/home/mrkgnao/.cargo/registry/src/github.com-88ac128001ac3a9a/nphysics-0.1.0/src/lib.rs:93:14: 93:24 error: expected ident, found `"nalgebra"`
/home/mrkgnao/.cargo/registry/src/github.com-88ac128001ac3a9a/nphysics-0.1.0/src/lib.rs:93 extern crate "nalgebra" as na;

so I forked and cloned the nphysics repo to see if I could build it myself. When I run cargo build, I get a bunch of errors complaining about missing extern crate math everywhere, and then a ton of errors I don't understand (all errors pasted here).

Examples execution errors on OSX

It seems that sfml/csml cannot create the proper context for OpenGl or something like that.
When I ./examples2d/target/release/gravity --help:

Warning. OpenGL debugging not supported on this platform.
Error. Unable to find a suitable pixel format.
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 0.1 ; depth bits = 10 ; stencil bits = 10 ; AA level = 2 ; core = true ; debug = true
Created: version = 2.1 ; depth bits = 10 ; stencil bits = 10 ; AA level = 2 ; core = false ; debug = false
Failed to activate the window's context
Failed to activate the window's context

I have set the dynamics and statics libraries paths like this:

export LD_LIBRARY_PATH=$HOME/.brew/lib/
export DYLD_LIBRARY_PATH=$HOME/.brew/lib/

When I execute the gravity example, sometimes I get a segfault, sometimes an infinite loop of Failed to activate the window's context...

Can't raycast static bodies

Hi!

I miss something, or ray doesn't intersect static rigidbodies?

Sample code:

extern crate nalgebra;
extern crate ncollide;
extern crate nphysics2d;

use nphysics2d::object::RigidBody;
use nphysics2d::world::World;
use ncollide::shape::Ball;
use ncollide::world::CollisionGroups;
use ncollide::query::Ray;
use nalgebra::{Vector2, Point2, Translation2};

fn create_static_body() -> RigidBody<f32> {
    RigidBody::new_static(Ball::new(100.0), 1.0, 0.3)
}

fn create_dynamic_body() -> RigidBody<f32> {
    RigidBody::new_dynamic(Ball::new(100.0), 1.0, 0.3, 1.0)
}

fn main() {
    // Create world
    let mut physics_world = World::new();
    physics_world.set_gravity(Vector2::new(0.0, 0.0));

    // Create static body at left
    let mut rb = create_static_body();
    rb.append_translation(&Translation2::new(-1000.0, 0.0));
    physics_world.add_rigid_body(rb);

    // Create dynamic body at right
    let mut rb = create_dynamic_body();
    rb.append_translation(&Translation2::new(1000.0, 0.0));
    physics_world.add_rigid_body(rb);

    let all_groups = &CollisionGroups::new();

    // Raycast over static body
    let ray = Ray::new(Point2::new(-1000.0, 1000.0), Vector2::new(0.0, -1.0));
    println!("Static: {}",
             physics_world
                 .collision_world()
                 .interferences_with_ray(&ray, all_groups)
                 .count());

    // Raycast over dynamic body
    let ray = Ray::new(Point2::new(1000.0, 1000.0), Vector2::new(0.0, -1.0));
    println!("Dynamic: {}",
             physics_world
                 .collision_world()
                 .interferences_with_ray(&ray, all_groups)
                 .count());

    // Raycast from left to right over static and dynamic bodies
    let ray = Ray::new(Point2::new(-2000.0, 0.0), Vector2::new(1.0, 0.0));
    println!("Dynamic + Static: {}",
             physics_world
                 .collision_world()
                 .interferences_with_ray(&ray, all_groups)
                 .count());
}

Output:

Static: 0
Dynamic: 1
Dynamic + Static: 1

Cargo features are designed to be additive

Cargo features are designed to be additive (they add features, don't change them in a way that breaks a library). This is evident since cargo automatically uses the union of all requested features in a build.

Consider if App depends on library X that depends on nphysics, and App depends on library Y that depends on nphysics.

If library X selects the f64 feature, this changes how nphysics is compiled for the whole App's build, so Y will not compile (it was written to use f32).

Use rustpkg.

Rustpkg looks stable enough to be usable now.

The task is basically to copy all the *.rc files to the corresponding lib.rs or bin.rs. rc files are deprecated anyway.

About joints

More joints, joint limits, joint motors and breakable joints.

What is missing to have more joints ? Is it possible to have some sort of milestone ?
I can be interrested on implementing joints in ncollide/nphysics if I know what is missing, I think that can help many people to be engaged in this library.

After that we can publish it on TWIR in the "Call for Participation" section.

Objects deactivate when they shouldn't

I'm not a 100% sure about this, but it looks like objects with a (0,0) acceleration and a (x,0) movement (where abs(x) < 1) deactive themselves after a certain time (is_active returns false).

This means that having an object with a constant velocity of (-0.9, 0) is impossible for example.

I don't know whether this behavior is intended, but if so I think that the threshold should be configurable.

Fine-grained restitution and friction

It would be useful to support bodies that have restitution and friction per-shape for bodies with compound shapes. ncollide's TriMesh already stores uv coordinates, so you could conceivably even have texture-mapped surface properties, which would be useful for applications like a terrain mesh whose surface represents a wide array of potentially smoothly-varying materials.

Examples not building in Rust 1.11 (expected type nalgebra::structs::vector::Vector2<_>, found na::Vector2<_>)

I can't make sense of this; shouldn't those types be the same?

Here's some compiler output:

$ rustc --version                                                                                                                                                                        
rustc 1.11.0 (9b21dcd6a 2016-08-15)
$ cd examples2d; cargo build --release                                                                                                                                                   
   Compiling nphysics-examples v0.1.0 (file:///q/x/nphysics/examples2d)
wall.rs:17:23: 17:46 collision_groups.rs:19:23: 19:46 error: mismatched types [E0308]
error: mismatched types [E0308]
collision_groups.rs:19     world.set_gravity(Vector2::new(0.0, 9.81));
                                             ^~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:19:23: 19:46 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:19:23: 19:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:19:23: 19:46 note:    found type `na::Vector2<_>`
wall.rs:17     world.set_gravity(Vector2::new(0.0, 9.81));
                                 ^~~~~~~~~~~~~~~~~~~~~~~
wall.rs:17:23: 17:46 help: run `rustc --explain E0308` to see a detailed explanation
wall.rs:17:23: 17:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
wall.rs:17:23: 17:46 note:    found type `na::Vector2<_>`
wall.rs:22:36: 22:46 collision_groups.rs:46:16: 46:26 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:46     let geom = Plane::new(Vector2::new(0.0, -1.0));
                                      ^~~~~~~~~~
collision_groups.rs:46:16: 46:26 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:46:16: 46:26 note: required by `ncollide::shape::Plane::new`
error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
wall.rs:22     let rb = RigidBody::new_static(Plane::new(Vector2::new(0.0, -1.0)), 0.3, 0.6);
                                              ^~~~~~~~~~
wall.rs:22:36: 22:46 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:22:36: 22:46 note: required by `ncollide::shape::Plane::new`
collision_groups.rs:47:26: 47:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:47     world.add_rigid_body(RigidBody::new_static(geom, 0.3, 0.6));
                                                manual_forces.rs:21:23: 21:46 ragdoll.rs:18:23: 18:46 ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:47:26: 47:47 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:47:26: 47:47 error: mismatched typesnote [E0308]: errorrequired by `nphysics2d::object::RigidBody::new_static`

: mismatched types [ragdoll.rs:18     world.set_gravity(Vector2::new(0.0, 9.81));
                                    ^~~~~~~~~~~~~~~~~~~~~~~
E0308]ragdoll.rs:18:23: 18:46 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:18:23: 18:46 note: expected type `nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:18:23: 18:46 note:    found type `na::Vector2<_>`

manual_forces.rs:21     world.set_gravity(Vector2::new(0.0, 9.81));
                                          ^~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:21:23: 21:46 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:21:23: 21:46 wall.rs:22:14: 22:35 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
wall.rs:22     let rb = RigidBody::new_static(Plane::new(Vector2::new(0.0, -1.0)), 0.3, 0.6);
                        ^~~~~~~~~~~~~~~~~~~~~
wall.rs:22:14: 22:35 help: run `rustc --explain E0271` to see a detailed explanation
wall.rs:22:14: 22:35 note: required by `nphysics2d::object::RigidBody::new_static`
note: expected type `nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:21:23: 21:46 note:    found type `na::Vector2<_>`
ragdoll.rs:23:23: 23:33 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:23     let ground_geom = Plane::new(Vector2::new(0.0, -1.0));
                                    ^~~~~~~~~~
ragdoll.rs:23:23: 23:33 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:23:23: 23:33 note: required by `ncollide::shape::Plane::new`
manual_forces.rs:26:40: 26:50 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:26     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(-1.0, -1.0)), 0.3, 0.6);
                                                           ^~~~~~~~~~
manual_forces.rs:26:40: 26:50 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:26:40: 26:50 note: required by `ncollide::shape::Plane::new`
collision_groups.rs:52:18: 52:29 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:52     let geom   = Cuboid::new(Vector2::new(10.0, 1.0));
                                        ^~~~~~~~~~~
collision_groups.rs:52:18: 52:29 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:52:18: 52:29 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:53:18: 53:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:53     let mut rb = RigidBody::new_static(geom, 0.3, 0.6);
                                        ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:53:18: 53:39 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:53:18: 53:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:56:27: 56:51 error: mismatched types [E0308]
collision_groups.rs:56     rb.append_translation(&Vector2::new(0.0, -5.0));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:56:27: 56:51 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:56:27: 56:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:56:27: 56:51 note:    found type `&na::Vector2<_>`
collision_groups.rs:59:43: 59:69 error: mismatched types [E0308]
collision_groups.rs:59     testbed.set_rigid_body_color(&handle, Point3::new(0.0, 1.0, 0.0));
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:59:43: 59:69 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:59:43: 59:69 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:59:43: 59:69 note:    found type `na::Point3<_>`
collision_groups.rs:64:18: 64:29 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:64     let geom   = Cuboid::new(Vector2::new(10.0, 1.0));
                                        ^~~~~~~~~~~
collision_groups.rs:64:18: 64:29 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:64:18: 64:29 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:65:18: 65:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:65     let mut rb = RigidBody::new_static(geom, 0.3, 0.6);
                                        ^~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:65:18: 65:39 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:65:18: 65:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:68:27: 68:52 error: mismatched types [E0308]
collision_groups.rs:68     rb.append_translation(&Vector2::new(0.0, -10.0));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:68:27: 68:52 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:68:27: 68:52 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:68:27: 68:52 note:    found type `&na::Vector2<_>`
manual_forces.rs:26:18: 26:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:26     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(-1.0, -1.0)), 0.3, 0.6);
                                     ^~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:26:18: 26:39 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:26:18: 26:39 note: required by `nphysics2d::object::RigidBody::new_static`
collision_groups.rs:71:43: 71:69 error: mismatched types [E0308]
collision_groups.rs:71     testbed.set_rigid_body_color(&handle, Point3::new(0.0, 0.0, 1.0));
                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:71:43: 71:69 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:71:43: 71:69 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:71:43: 71:69 note:    found type `na::Point3<_>`
ragdoll.rs:25:26: 25:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:25     world.add_rigid_body(RigidBody::new_static(ground_geom, 0.3, 0.6));
                                       ^~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:25:26: 25:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:25:26: 25:47 note: required by `nphysics2d::object::RigidBody::new_static`
manual_forces.rs:28:27: 28:51 error: mismatched types [E0308]
manual_forces.rs:28     rb.append_translation(&Vector2::new(0.0, 10.0));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:28:27: 28:51 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:28:27: 28:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:28:27: 28:51 note:    found type `&na::Vector2<_>`
manual_forces.rs:35:40: 35:50 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:35     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(1.0, -1.0)), 0.3, 0.6);
                                                           ^~~~~~~~~~
manual_forces.rs:35:40: 35:50 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:35:40: 35:50 note: required by `ncollide::shape::Plane::new`
manual_forces.rs:35:18: 35:39 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:35     let mut rb = RigidBody::new_static(Plane::new(Vector2::new(1.0, -1.0)), 0.3, 0.6);
                                     ^~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:35:18: 35:39 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:35:18: 35:39 note: required by `nphysics2d::object::RigidBody::new_static`
manual_forces.rs:37:27: 37:51 error: mismatched types [E0308]
manual_forces.rs:37     rb.append_translation(&Vector2::new(0.0, 10.0));
                                              ^~~~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:37:27: 37:51 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:37:27: 37:51 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:37:27: 37:51 note:    found type `&na::Vector2<_>`
ragdoll.rs:54:29: 54:61 error: mismatched types [E0308]
ragdoll.rs:54     head.append_translation(&(pos + Vector2::new(0.0, -2.4)));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:54:29: 54:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:54:29: 54:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:54:29: 54:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:57:25: 57:36 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:57     let     body_geom = Cuboid::new(Vector2::new(1.2, 0.5));
                                      ^~~~~~~~~~~
ragdoll.rs:57:25: 57:36 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:57:25: 57:36 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:58:25: 58:47 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:58     let mut body      = RigidBody::new_dynamic(body_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:58:25: 58:47 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:58:25: 58:47 help: the following implementations were found:
ragdoll.rs:58:25: 58:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:58:25: 58:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:58:25: 58:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:58:25: 58:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:58     let mut body      = RigidBody::new_dynamic(body_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:58:25: 58:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:58:25: 58:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:59:26: 59:64 error: mismatched types [E0308]
ragdoll.rs:59     body.append_rotation(&-Vector1::new(BaseFloat::frac_pi_2()));
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:59:26: 59:64 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:59:26: 59:64 note: expected type `&nalgebra::structs::vector::Vector1<_>`
ragdoll.rs:59:26: 59:64 note:    found type `&na::Vector1<_>`
ragdoll.rs:60:29: 60:33 error: mismatched types [E0308]
ragdoll.rs:60     body.append_translation(&pos);
                                          ^~~~
ragdoll.rs:60:29: 60:33 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:60:29: 60:33 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:60:29: 60:33 note:    found type `&na::Vector2<f32>`
ragdoll.rs:63:25: 63:36 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:63     let     rarm_geom = Cuboid::new(Vector2::new(1.6, 0.2));
                                      ^~~~~~~~~~~
ragdoll.rs:63:25: 63:36 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:63:25: 63:36 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:64:25: 64:47 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:64     let mut rarm      = RigidBody::new_dynamic(rarm_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:64:25: 64:47 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:64:25: 64:47 help: the following implementations were found:
ragdoll.rs:64:25: 64:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:64:25: 64:47 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:64:25: 64:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:64:25: 64:47 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:64     let mut rarm      = RigidBody::new_dynamic(rarm_geom, 1.0, 0.3, 0.5);
                                      ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:64:25: 64:47 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:64:25: 64:47 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:65:29: 65:61 error: mismatched types [E0308]
ragdoll.rs:65     rarm.append_translation(&(pos + Vector2::new(2.4, -1.0)));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:65:29: 65:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:65:29: 65:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:65:29: 65:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:69:29: 69:53 error: mismatched types [E0308]
ragdoll.rs:69     larm.append_translation(&Vector2::new(-4.8, 0.0));
                                          ^~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:69:29: 69:53 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:69:29: 69:53 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:69:29: 69:53 note:    found type `&na::Vector2<_>`
ragdoll.rs:72:26: 72:37 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
ragdoll.rs:72     let     rfoot_geom = Cuboid::new(Vector2::new(1.6, 0.2));
                                       ^~~~~~~~~~~
ragdoll.rs:72:26: 72:37 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:72:26: 72:37 note: required by `ncollide::shape::Cuboid::new`
ragdoll.rs:73:26: 73:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
ragdoll.rs:73     let mut rfoot      = RigidBody::new_dynamic(rfoot_geom, 1.0, 0.3, 0.5);
                                       ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:73:26: 73:48 help: run `rustc --explain E0277` to see a detailed explanation
ragdoll.rs:73:26: 73:48 help: the following implementations were found:
ragdoll.rs:73:26: 73:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
ragdoll.rs:73:26: 73:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
ragdoll.rs:73:26: 73:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:73:26: 73:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
ragdoll.rs:73     let mut rfoot      = RigidBody::new_dynamic(rfoot_geom, 1.0, 0.3, 0.5);
                                       ^~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:73:26: 73:48 help: run `rustc --explain E0271` to see a detailed explanation
ragdoll.rs:73:26: 73:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
ragdoll.rs:74:27: 74:65 error: mismatched types [E0308]
ragdoll.rs:74     rfoot.append_rotation(&-Vector1::new(BaseFloat::frac_pi_2()));
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:74:27: 74:65 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:74:27: 74:65 note: expected type `&nalgebra::structs::vector::Vector1<_>`
ragdoll.rs:74:27: 74:65 note:    found type `&na::Vector1<_>`
ragdoll.rs:75:30: 75:61 error: mismatched types [E0308]
ragdoll.rs:75     rfoot.append_translation(&(pos + Vector2::new(0.4, 3.0)));
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:75:30: 75:61 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:75:30: 75:61 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:75:30: 75:61 note:    found type `&na::Vector2<f32>`
ragdoll.rs:79:30: 79:54 error: mismatched types [E0308]
ragdoll.rs:79     lfoot.append_translation(&Vector2::new(-0.8, 0.0));
                                           ^~~~~~~~~~~~~~~~~~~~~~~~
ragdoll.rs:79:30: 79:54 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:79:30: 79:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
ragdoll.rs:79:30: 79:54 note:    found type `&na::Vector2<_>`
ragdoll.rs:103:41: 103:57 error: mismatched types [E0308]
ragdoll.rs:103     let head_joint  = BallInSocket::new(body_anchor_head,   head_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:103:41: 103:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:103:41: 103:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:103:41: 103:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:103:61: 103:72 error: mismatched types [E0308]
ragdoll.rs:103     let head_joint  = BallInSocket::new(body_anchor_head,   head_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:103:61: 103:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:103:61: 103:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:103:61: 103:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:104:41: 104:57 error: mismatched types [E0308]
ragdoll.rs:104     let rarm_joint  = BallInSocket::new(body_anchor_rarm,   rarm_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:104:41: 104:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:104:41: 104:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:104:41: 104:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:104:61: 104:72 error: mismatched types [E0308]
ragdoll.rs:104     let rarm_joint  = BallInSocket::new(body_anchor_rarm,   rarm_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:104:61: 104:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:104:61: 104:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:104:61: 104:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:105:41: 105:57 error: mismatched types [E0308]
ragdoll.rs:105     let larm_joint  = BallInSocket::new(body_anchor_larm,   larm_anchor);
                                                       ^~~~~~~~~~~~~~~~
ragdoll.rs:105:41: 105:57 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:105:41: 105:57 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:105:41: 105:57 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:105:61: 105:72 error: mismatched types [E0308]
ragdoll.rs:105     let larm_joint  = BallInSocket::new(body_anchor_larm,   larm_anchor);
                                                                           ^~~~~~~~~~~
ragdoll.rs:105:61: 105:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:105:61: 105:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:105:61: 105:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:106:41: 106:58 error: mismatched types [E0308]
ragdoll.rs:106     let rfoot_joint = BallInSocket::new(body_anchor_rfoot, rfoot_anchor);
                                                       ^~~~~~~~~~~~~~~~~
ragdoll.rs:106:41: 106:58 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:106:41: 106:58 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:106:41: 106:58 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:106:60: 106:72 error: mismatched types [E0308]
ragdoll.rs:106     let rfoot_joint = BallInSocket::new(body_anchor_rfoot, rfoot_anchor);
                                                                          ^~~~~~~~~~~~
ragdoll.rs:106:60: 106:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:106:60: 106:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:106:60: 106:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:107:41: 107:58 error: mismatched types [E0308]
ragdoll.rs:107     let lfoot_joint = BallInSocket::new(body_anchor_lfoot, lfoot_anchor);
                                                       ^~~~~~~~~~~~~~~~~
ragdoll.rs:107:41: 107:58 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:107:41: 107:58 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:107:41: 107:58 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
ragdoll.rs:107:60: 107:72 error: mismatched types [E0308]
ragdoll.rs:107     let lfoot_joint = BallInSocket::new(body_anchor_lfoot, lfoot_anchor);
                                                                          ^~~~~~~~~~~~
ragdoll.rs:107:60: 107:72 help: run `rustc --explain E0308` to see a detailed explanation
ragdoll.rs:107:60: 107:72 note: expected type `nphysics2d::detection::joint::Anchor<_, nalgebra::structs::point::Point2<_>>`
ragdoll.rs:107:60: 107:72 note:    found type `nphysics2d::detection::joint::Anchor<f32, na::Point2<_>>`
error: aborting due to 30 previous errors
Build failed, waiting for other jobs to finish...
manual_forces.rs:68:24: 68:35 error: the trait bound `na::Vector2<_>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
manual_forces.rs:68             let geom = Cuboid::new(Vector2::new(0.5, 0.5));
                                           ^~~~~~~~~~~
manual_forces.rs:68:24: 68:35 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:68:24: 68:35 note: required by `ncollide::shape::Cuboid::new`
manual_forces.rs:69:26: 69:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<_>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
manual_forces.rs:69             let mut rb = RigidBody::new_dynamic(geom, 0.1, 0.3, 0.6);
                                             ^~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:69:26: 69:48 help: run `rustc --explain E0277` to see a detailed explanation
manual_forces.rs:69:26: 69:48 help: the following implementations were found:
manual_forces.rs:69:26: 69:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
manual_forces.rs:69:26: 69:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
manual_forces.rs:69:26: 69:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
manual_forces.rs:69:26: 69:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<_>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
manual_forces.rs:69             let mut rb = RigidBody::new_dynamic(geom, 0.1, 0.3, 0.6);
                                             ^~~~~~~~~~~~~~~~~~~~~~
manual_forces.rs:69:26: 69:48 help: run `rustc --explain E0271` to see a detailed explanation
manual_forces.rs:69:26: 69:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
manual_forces.rs:70:35: 70:54 error: mismatched types [E0308]
manual_forces.rs:70             rb.append_translation(&Vector2::new(x, y));
                                                      ^~~~~~~~~~~~~~~~~~~
manual_forces.rs:70:35: 70:54 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:70:35: 70:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
manual_forces.rs:70:35: 70:54 note:    found type `&na::Vector2<f32>`
manual_forces.rs:111:50: 111:63 error: mismatched types [E0308]
manual_forces.rs:111                             obj.append_lin_force(force.clone());
                                                                      ^~~~~~~~~~~~~
manual_forces.rs:111:50: 111:63 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:111:50: 111:63 note: expected type `nalgebra::structs::vector::Vector2<f32>`
manual_forces.rs:111:50: 111:63 note:    found type `na::Vector2<f32>`
manual_forces.rs:134:50: 134:63 error: mismatched types [E0308]
manual_forces.rs:134                             obj.append_ang_force(force.clone());
                                                                      ^~~~~~~~~~~~~
manual_forces.rs:134:50: 134:63 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:134:50: 134:63 note: expected type `nalgebra::structs::vector::Vector1<f32>`
manual_forces.rs:134:50: 134:63 note:    found type `na::Vector1<f32>`
manual_forces.rs:148:55: 148:70 error: mismatched types [E0308]
manual_forces.rs:148                             obj.apply_central_impulse(impulse.clone());
                                                                           ^~~~~~~~~~~~~~~
manual_forces.rs:148:55: 148:70 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:148:55: 148:70 note: expected type `nalgebra::structs::vector::Vector2<f32>`
manual_forces.rs:148:55: 148:70 note:    found type `na::Vector2<f32>`
manual_forces.rs:163:56: 163:70 error: mismatched types [E0308]
manual_forces.rs:163                             obj.apply_angular_momentum(torque.clone());
                                                                            ^~~~~~~~~~~~~~
manual_forces.rs:163:56: 163:70 help: run `rustc --explain E0308` to see a detailed explanation
manual_forces.rs:163:56: 163:70 note: expected type `nalgebra::structs::vector::Vector1<f32>`
manual_forces.rs:163:56: 163:70 note:    found type `na::Vector1<f32>`
error: aborting due to 15 previous errors
Build failed, waiting for other jobs to finish...
wall.rs:42:49: 42:60 error: the trait bound `na::Vector2<f32>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                                           ^~~~~~~~~~~
wall.rs:42:49: 42:60 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:42:49: 42:60 note: required by `ncollide::shape::Cuboid::new`
wall.rs:42:26: 42:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<f32>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                    ^~~~~~~~~~~~~~~~~~~~~~
wall.rs:42:26: 42:48 help: run `rustc --explain E0277` to see a detailed explanation
wall.rs:42:26: 42:48 help: the following implementations were found:
wall.rs:42:26: 42:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
wall.rs:42:26: 42:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
wall.rs:42:26: 42:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
wall.rs:42:26: 42:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<f32>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
wall.rs:42             let mut rb = RigidBody::new_dynamic(Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04)), 1.0, 0.3, 0.6);
                                    ^~~~~~~~~~~~~~~~~~~~~~
wall.rs:42:26: 42:48 help: run `rustc --explain E0271` to see a detailed explanation
wall.rs:42:26: 42:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
wall.rs:44:35: 44:54 error: mismatched types [E0308]
wall.rs:44             rb.append_translation(&Vector2::new(x, y));
                                             ^~~~~~~~~~~~~~~~~~~
wall.rs:44:35: 44:54 help: run `rustc --explain E0308` to see a detailed explanation
wall.rs:44:35: 44:54 note: expected type `&nalgebra::structs::vector::Vector2<_>`
wall.rs:44:35: 44:54 note:    found type `&na::Vector2<f32>`
error: aborting due to 7 previous errors
Build failed, waiting for other jobs to finish...
collision_groups.rs:87:26: 87:37 error: the trait bound `na::Vector2<f32>: ncollide::ncollide_math::Vector` is not satisfied [E0277]
collision_groups.rs:87             let geom   = Cuboid::new(Vector2::new(rad - 0.04, rad - 0.04));
                                                ^~~~~~~~~~~
collision_groups.rs:87:26: 87:37 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:87:26: 87:37 note: required by `ncollide::shape::Cuboid::new`
collision_groups.rs:88:26: 88:48 error: the trait bound `ncollide::shape::Cuboid<na::Vector2<f32>>: nphysics2d::volumetric::Volumetric<_, nalgebra::structs::point::Point2<_>, nalgebra::structs::matrix::Matrix1<_>>` is not satisfied [E0277]
collision_groups.rs:88             let mut rb = RigidBody::new_dynamic(geom, 1.0, 0.3, 0.5);
                                                ^~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:88:26: 88:48 help: run `rustc --explain E0277` to see a detailed explanation
collision_groups.rs:88:26: 88:48 help: the following implementations were found:
collision_groups.rs:88:26: 88:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector2<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point2<N>, nalgebra::structs::matrix::Matrix1<N>>>
collision_groups.rs:88:26: 88:48 help:   <ncollide::shape::Cuboid<nalgebra::structs::vector::Vector3<N>> as nphysics2d::volumetric::Volumetric<N, nalgebra::structs::point::Point3<N>, nalgebra::structs::matrix::Matrix3<N>>>
collision_groups.rs:88:26: 88:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
collision_groups.rs:88:26: 88:48 error: type mismatch resolving `<nalgebra::structs::point::Point2<_> as ncollide::ncollide_math::Point>::Vect == na::Vector2<f32>`:
 expected struct `nalgebra::structs::vector::Vector2`,
    found struct `na::Vector2` [E0271]
collision_groups.rs:88             let mut rb = RigidBody::new_dynamic(geom, 1.0, 0.3, 0.5);
                                                ^~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:88:26: 88:48 help: run `rustc --explain E0271` to see a detailed explanation
collision_groups.rs:88:26: 88:48 note: required by `nphysics2d::object::RigidBody::new_dynamic`
collision_groups.rs:90:35: 90:55 error: mismatched types [E0308]
collision_groups.rs:90             rb.append_translation(&Vector2::new(x, -y));
                                                         ^~~~~~~~~~~~~~~~~~~~
collision_groups.rs:90:35: 90:55 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:90:35: 90:55 note: expected type `&nalgebra::structs::vector::Vector2<_>`
collision_groups.rs:90:35: 90:55 note:    found type `&na::Vector2<f32>`
collision_groups.rs:96:55: 96:81 error: mismatched types [E0308]
collision_groups.rs:96                 testbed.set_rigid_body_color(&handle, Point3::new(0.0, 1.0, 0.0));
                                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:96:55: 96:81 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:96:55: 96:81 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:96:55: 96:81 note:    found type `na::Point3<_>`
collision_groups.rs:101:55: 101:81 error: mismatched types [E0308]
collision_groups.rs:101                 testbed.set_rigid_body_color(&handle, Point3::new(0.0, 0.0, 1.0));
                                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
collision_groups.rs:101:55: 101:81 help: run `rustc --explain E0308` to see a detailed explanation
collision_groups.rs:101:55: 101:81 note: expected type `nalgebra::structs::point::Point3<f32>`
collision_groups.rs:101:55: 101:81 note:    found type `na::Point3<_>`
error: aborting due to 17 previous errors
error: Could not compile `nphysics-examples`.

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

Build error on osx

nphysics ➤ make examples                                                                                                                          git:master
mkdir -p bin
make -C examples
mkdir -p ../bin
rustc -L../lib -L../ncollide/lib -L../ncollide/nalgebra/lib -L./lib/kiss3d/lib -L./lib/kiss3d/lib/glfw-rs/lib -L./lib/kiss3d/lib/gl-rs/lib -L./lib/kiss3d/lib/rust-stb-image/ -L./lib/rust-sfml/lib/ -L./lib/kiss3d/lib/rust-freetype/ -L./lib/kiss3d/lib/rust-ffmpeg/lib -L./lib/kiss3d/lib/nprocgen/lib -Llib --out-dir lib --opt-level 3 ./graphics3d/graphics3d.rs
#rustc -L../lib -L../ncollide/lib -L../ncollide/nalgebra/lib -L./lib/kiss3d/lib -L./lib/kiss3d/lib/glfw-rs/lib -L./lib/kiss3d/lib/gl-rs/lib -L./lib/kiss3d/lib/rust-stb-image/ -L./lib/rust-sfml/lib/ -L./lib/kiss3d/lib/rust-freetype/ -L./lib/kiss3d/lib/rust-ffmpeg/lib -L./lib/kiss3d/lib/nprocgen/lib -Llib -C link-args=-lglfw --out-dir ../bin --opt-level 3 ./bezier_bezier3d.rs
rustc -L../lib -L../ncollide/lib -L../ncollide/nalgebra/lib -L./lib/kiss3d/lib -L./lib/kiss3d/lib/glfw-rs/lib -L./lib/kiss3d/lib/gl-rs/lib -L./lib/kiss3d/lib/rust-stb-image/ -L./lib/rust-sfml/lib/ -L./lib/kiss3d/lib/rust-freetype/ -L./lib/kiss3d/lib/rust-ffmpeg/lib -L./lib/kiss3d/lib/nprocgen/lib -Llib -C link-args=-lglfw --out-dir ../bin --opt-level 3 ./bezier_balls3d.rs
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-o' '../bin/bezier_balls3d' '../bin/bezier_balls3d.o' '-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a' '-nodefaultlibs' '-Wl,-dead_strip' '/Users/bzabarauskas/dev/nphysics/examples/lib/libgraphics3d-b51e7474-0.0.rlib' '/Users/bzabarauskas/dev/nphysics/examples/lib/kiss3d/lib/libkiss3d-a01c0371-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/examples/lib/kiss3d/lib/rust-freetype/libfreetype-c590fda6-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/examples/lib/kiss3d/lib/glfw-rs/lib/libglfw-38369174-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/examples/lib/kiss3d/lib/gl-rs/lib/libgl-8febb75e-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/examples/lib/kiss3d/lib/rust-stb-image/libstb_image-30b28982-0.1.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libnative-1fb5e2c0-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libsemver-e49a2dee-0.11.0-pre.rlib' '/Users/bzabarauskas/dev/nphysics/lib/libnphysics3df32-070aed32-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/ncollide/lib/libncollide3df32-22e69683-0.1.rlib' '/Users/bzabarauskas/dev/nphysics/ncollide/nalgebra/lib/libnalgebra-75c3c94d-0.1.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtest-a79f950d-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libregex-77385931-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtime-4bb3739b-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libterm-4e4945a5-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libserialize-0352aab7-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblog-cd053230-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-c94737d1-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-59beb4f7-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libsync-305341d2-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustrt-d8560cb2-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-2ea8f361-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-d412c0c4-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1085c790-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-c5ed6fb4-0.11.0-pre.rlib' '/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4f9a876d-0.11.0-pre.rlib' '-L' 'lib/kiss3d/lib/rust-stb-image' '-L' 'lib/kiss3d/lib/rust-ffmpeg/lib' '-L' '../lib' '-L' 'lib' '-L' '../ncollide/nalgebra/lib' '-L' 'lib/kiss3d/lib/rust-freetype' '-L' 'lib/kiss3d/lib/nprocgen/lib' '-L' 'lib/kiss3d/lib/glfw-rs/lib' '-L' 'lib/kiss3d/lib' '-L' 'lib/rust-sfml/lib' '-L' 'lib/kiss3d/lib/gl-rs/lib' '-L' '../ncollide/lib' '-L' '/Users/bzabarauskas/dev/nphysics/examples/.rust' '-L' '/Users/bzabarauskas/dev/nphysics/examples' '-lfreetype' '-lglfw3' '-framework' 'Cocoa' '-framework' 'OpenGL' '-framework' 'IOKit' '-framework' 'CoreFoundation' '-framework' 'CoreVideo' '-lstb-image' '-lSystem' '-lpthread' '-lc' '-lm' '-Wl,-rpath,@loader_path/../examples/lib/kiss3d/lib/rust-freetype' '-Wl,-rpath,@loader_path/../examples/lib/kiss3d/lib/glfw-rs/lib' '-Wl,-rpath,@loader_path/../examples/lib/kiss3d/lib/rust-stb-image' '-Wl,-rpath,@loader_path/../../../../../usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-Wl,-rpath,@loader_path/../ncollide/nalgebra/lib' '-Wl,-rpath,/usr/local/lib/rustlib/x86_64-apple-darwin/lib' '-lcompiler-rt' '-lglfw'
note: ld: warning: directory not found for option '-Llib/kiss3d/lib/rust-ffmpeg/lib'
ld: warning: directory not found for option '-Llib/kiss3d/lib/nprocgen/lib'
ld: warning: directory not found for option '-L/Users/bzabarauskas/dev/nphysics/examples/.rust'
ld: library not found for -lglfw
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error
make[1]: *** [examples] Error 101
make: *** [examples] Error 2

I'm pretty sure I have glfw.

Cannot compile with cargo

Hi, here is my cargo configuration:

[dependencies.nphysics2df32]
git = "https://github.com/sebcrozet/nphysics"
features = ["2d","f32"]

Is this correct?

Here are the error messages:

    Updating git repository `https://github.com/sebcrozet/nphysics`
    Updating git repository `https://github.com/sebcrozet/nalgebra`
    Updating git repository `https://github.com/sebcrozet/ncollide`
   Compiling nalgebra v0.1.0 (https://github.com/sebcrozet/nalgebra#3317e057)
   Compiling ncollide v0.2.0 (https://github.com/sebcrozet/ncollide#ef64011e)
   Compiling nphysics2df32 v0.1.0 (https://github.com/sebcrozet/nphysics#0ff3decd)
../../src/detection/activation_manager.rs:10:29: 10:33 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
../../src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                         ^~~~
../../src/detection/activation_manager.rs:10:35: 10:57 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
../../src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                               ^~~~~~~~~~~~~~~~~~~~~~
../../src/detection/activation_manager.rs:10:59: 10:74 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
../../src/detection/activation_manager.rs:10 use detection::constraint::{RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                       ^~~~~~~~~~~~~~~
../../src/resolution/constraint/accumulated_impulse_solver.rs:7:41: 7:45 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
../../src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                        ^~~~
../../src/resolution/constraint/accumulated_impulse_solver.rs:7:47: 7:69 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
../../src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                              ^~~~~~~~~~~~~~~~~~~~~~
../../src/resolution/constraint/accumulated_impulse_solver.rs:7:71: 7:86 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
../../src/resolution/constraint/accumulated_impulse_solver.rs:7 use detection::constraint::{Constraint, RBRB, BallInSocketConstraint, FixedConstraint};
                                                                                                                                      ^~~~~~~~~~~~~~~
../../src/object/mod.rs:3:58: 3:64 error: unresolved import `object::rigid_body::Static`. There is no `Static` in `object::rigid_body`
../../src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                   ^~~~~~
../../src/object/mod.rs:3:66: 3:73 error: unresolved import `object::rigid_body::Dynamic`. There is no `Dynamic` in `object::rigid_body`
../../src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                           ^~~~~~~
../../src/object/mod.rs:3:75: 3:82 error: unresolved import `object::rigid_body::Deleted`. There is no `Deleted` in `object::rigid_body`
../../src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                                    ^~~~~~~
../../src/object/mod.rs:3:84: 3:90 error: unresolved import `object::rigid_body::Active`. There is no `Active` in `object::rigid_body`
../../src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                                             ^~~~~~
../../src/object/mod.rs:3:92: 3:100 error: unresolved import `object::rigid_body::Inactive`. There is no `Inactive` in `object::rigid_body`
../../src/object/mod.rs:3 pub use object::rigid_body::{RigidBody, RigidBodyHandle, Static, Dynamic, Deleted, Active, Inactive,
                                                                                                                     ^~~~~~~~
../../src/detection/bodies_bodies.rs:12:41: 12:45 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
../../src/detection/bodies_bodies.rs:12 use detection::constraint::{Constraint, RBRB};
                                                                                ^~~~
../../src/detection/joint/joint_manager.rs:11:41: 11:63 error: unresolved import `detection::constraint::BallInSocketConstraint`. There is no `BallInSocketConstraint` in `detection::constraint`
../../src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                      ^~~~~~~~~~~~~~~~~~~~~~
../../src/detection/joint/joint_manager.rs:11:65: 11:80 error: unresolved import `detection::constraint::FixedConstraint`. There is no `FixedConstraint` in `detection::constraint`
../../src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                                              ^~~~~~~~~~~~~~~
../../src/detection/joint/joint_manager.rs:11:82: 11:86 error: unresolved import `detection::constraint::RBRB`. There is no `RBRB` in `detection::constraint`
../../src/detection/joint/joint_manager.rs:11 use detection::constraint::{Constraint, BallInSocketConstraint, FixedConstraint, RBRB};
                                                                                                                               ^~~~
../../src/resolution/mod.rs:5:52: 5:71 error: unresolved import `resolution::constraint::contact_equation::VelocityAndPosition`. There is no `VelocityAndPosition` in `resolution::constraint::contact_equation`
../../src/resolution/mod.rs:5 pub use resolution::constraint::contact_equation::{VelocityAndPosition, Velocity,
                                                                                 ^~~~~~~~~~~~~~~~~~~
../../src/resolution/mod.rs:5:73: 5:81 error: unresolved import `resolution::constraint::contact_equation::Velocity`. There is no `Velocity` in `resolution::constraint::contact_equation`
../../src/resolution/mod.rs:5 pub use resolution::constraint::contact_equation::{VelocityAndPosition, Velocity,
                                                                                                      ^~~~~~~~
../../src/resolution/mod.rs:6:52: 6:79 error: unresolved import `resolution::constraint::contact_equation::VelocityAndPositionThresold`. There is no `VelocityAndPositionThresold` in `resolution::constraint::contact_equation`
../../src/resolution/mod.rs:6                                                    VelocityAndPositionThresold, CorrectionMode};
                                                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/world/world.rs:18:52: 18:71 error: unresolved import (maybe you meant `VelocityAndPosition::*`?)
../../src/world/world.rs:18 use resolution::{Solver, AccumulatedImpulseSolver, VelocityAndPosition};
                                                                               ^~~~~~~~~~~~~~~~~~~
../../src/detection/activation_manager.rs:12:25: 12:32 error: unresolved import (maybe you meant `Deleted::*`?)
../../src/detection/activation_manager.rs:12 use object::{RigidBody, Deleted};
                                                                     ^~~~~~~
error: aborting due to 20 previous errors
Could not compile `nphysics2df32`.

Thanks for your help!

Online docs need rebuilt

The on-line documentation linked in README.md is outdated and does not refer to the correct types in ncollide or nalgebra.

Surprising simulation results

Simulating a ball bouncing between two stationary paddles results in some surprising output. Everything has a restitution of 1, the ball starts with a velocity 20 towards one paddle. A few of the anomalies are that after the second bounce the velocity more than doubles, and that it reaches a velocity of over 400 for an extended period of time. Code demonstrating this is here, output of the code is here.

I assume this isn't the intended behavior? Unfortunately I'm not experienced enough with physics engines to try and debug this.

Does not compile with Rust nightly (ffc111889 2014-12-12)

Installing as a dependency of kiss3d, I get the following compilation errors:

   Compiling ncollide v0.2.0 (https://github.com/sebcrozet/ncollide#faa3ad89)
src/broad_phase/dbvt_broad_phase.rs:189:35: 189:46 error: cannot move out of dereference of `&`-pointer
src/broad_phase/dbvt_broad_phase.rs:189                         Pair::new(*proxy_key1, *proxy_key2),
                                                                          ^~~~~~~~~~~
src/broad_phase/dbvt_broad_phase.rs:189:48: 189:59 error: cannot move out of dereference of `&`-pointer
src/broad_phase/dbvt_broad_phase.rs:189                         Pair::new(*proxy_key1, *proxy_key2),
                                                                                       ^~~~~~~~~~~
src/broad_phase/dbvt_broad_phase.rs:230:31: 230:35 error: cannot move out of dereference of `&`-pointer
src/broad_phase/dbvt_broad_phase.rs:230                     let ids = elts[id].key;
                                                                      ^~~~
src/broad_phase/dbvt_broad_phase.rs:230:25: 230:28 note: attempting to move value to here
src/broad_phase/dbvt_broad_phase.rs:230                     let ids = elts[id].key;
                                                                ^~~
src/broad_phase/dbvt_broad_phase.rs:230:25: 230:28 help: to prevent the move, use `ref ids` or `ref mut ids` to capture value by reference
src/broad_phase/dbvt_broad_phase.rs:230                     let ids = elts[id].key;
                                                                ^~~
src/utils/data/has_uid_map.rs:197:60: 197:68 error: use of moved value: `fast_key`
src/utils/data/has_uid_map.rs:197                         let old_value = self.values.insert(fast_key.uid(), (key, value));
                                                                                             ^~~~~~~~
src/utils/data/has_uid_map.rs:195:43: 195:51 note: `fast_key` moved here because it has type `utils::data::has_uid_map::FastKey`, which is non-copyable
src/utils/data/has_uid_map.rs:195                         let _ = entry.set(fast_key);
                                                                            ^~~~~~~~
src/utils/data/has_uid_map.rs:200:26: 200:34 error: use of moved value: `fast_key`
src/utils/data/has_uid_map.rs:200                         (fast_key, None)
                                                           ^~~~~~~~
src/utils/data/has_uid_map.rs:195:43: 195:51 note: `fast_key` moved here because it has type `utils::data::has_uid_map::FastKey`, which is non-copyable
src/utils/data/has_uid_map.rs:195                         let _ = entry.set(fast_key);
                                                                            ^~~~~~~~
src/world/collision_objects_dispatcher.rs:121:29: 121:33 error: cannot move out of dereference of `&`-pointer
src/world/collision_objects_dispatcher.rs:121         let key = Pair::new(*fk1, *fk2);
                                                                          ^~~~
src/world/collision_objects_dispatcher.rs:121:35: 121:39 error: cannot move out of dereference of `&`-pointer
src/world/collision_objects_dispatcher.rs:121         let key = Pair::new(*fk1, *fk2);
                                                                                ^~~~
error: aborting due to 7 previous errors
Could not compile `ncollide`.

Should I downgrade Rust to 0.12?

apply_central_impulse and friends don't wake bodies up

As in title, if you call apply_central_impulse (or apply_angular_momentum, etc.) on a sleeping body nothing will happen, which is inconsistent with what happens when elements bump into eachother. For my usecase I just have

if &ActivationState::Inactive == handle.activation_state() {
     handle.activate(1.);
}

Above my calls to these methods, but that's obviously not The Right Thing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.