Giter Club home page Giter Club logo

mgf's People

Contributors

adotinthevoid avatar maplant 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

Watchers

 avatar  avatar

Forkers

danakj knosiz

mgf's Issues

Comparison with rhusics

This seems quite similar to @Rhuagh's rhusics. I guess the main difference is:

Rhusics is:

  • made for us with Specs
  • also supports 2D
  • uses collision-rs

Would be very helpful to have a short "Differences between mgf and {similar-projects}" paragraph or page somewhere.

Bump cgmath to 0.18.0

The new cgmath has some nice helpers added.

The CHANGELOG.md specifies a breaking change however: https://github.com/rustgd/cgmath/blob/master/CHANGELOG.md

Breaking: Quaternion memory layout changed to [x, y, z, w]. The From and Into impls for [S; 4] and (S, S, S, S) have been changed accordingly.

The data has moved from

pub struct Quaternion {
pub s: S,
pub v: Vector3,
}

To

pub struct Quaternion {
pub v: Vector3,
pub s: S,
}

I'm not sure if mgf depends on from/to [S;4] or (S,S,S,S). It seems unlikely to me, since those are mostly for interfacing to something like OpenGL, but I wanted to raise the issue here.

Instability near corners in non-convex meshses

As shown in mgf_demo/balls, some objects near the edge of the "box" exhibit instability and sink far to deeply into the floor. I have a few theories on why this happens, more than likely it is due to considering the wall and floor as the same physical object.

Can't compile demos

errors:
error[E0432]: unresolved import `rand::StdRng`
  --> world.rs:20:25
   |
20 | use rand::{SeedableRng, StdRng};
   |                         ^^^^^^ no `StdRng` in the root

error[E0432]: unresolved imports `rand::distributions::Range`, `rand::distributions::IndependentSample`
  --> world.rs:21:27
   |
21 | use rand::distributions::{Range, IndependentSample};
   |                           ^^^^^  ^^^^^^^^^^^^^^^^^ no `IndependentSample` in `distributions`
   |                           |
   |                           no `Range` in `distributions`

error[E0308]: mismatched types
  --> capsules.rs:69:20
   |
69 |                 a: Point3::new(-0.5, 0.0, 0.0),
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `mgf::cgmath::Point3`, found struct `cgmath::Point3`
   |
   = note: expected struct `mgf::cgmath::Point3<f32>`
              found struct `cgmath::Point3<{float}>`
   = note: perhaps two different versions of crate `cgmath` are being used?

error[E0308]: mismatched types
  --> capsules.rs:70:20
   |
70 |                 d: Vector3::new(1.0, 0.0, 0.0),
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `mgf::cgmath::Vector3`, found struct `cgmath::Vector3`
   |
   = note: expected struct `mgf::cgmath::Vector3<f32>`
              found struct `cgmath::Vector3<{float}>`
   = note: perhaps two different versions of crate `cgmath` are being used?

error[E0308]: mismatched types
  --> capsules.rs:90:28
   |
90 |                 rb.set_pos(Point3::new(x, y, z));
   |                            ^^^^^^^^^^^^^^^^^^^^ expected struct `mgf::cgmath::Point3`, found struct `cgmath::Point3`
   |
   = note: expected struct `mgf::cgmath::Point3<f32>`
              found struct `cgmath::Point3<f32>`
   = note: perhaps two different versions of crate `cgmath` are being used?

error[E0308]: mismatched types
   --> world.rs:131:36
    |
131 |             terrain_mesh.push_vert(Point3::from(vert.pos));
    |                                    ^^^^^^^^^^^^^^^^^^^^^^ expected struct `mgf::cgmath::Point3`, found struct `cgmath::Point3`
    |
    = note: expected struct `mgf::cgmath::Point3<f32>`
               found struct `cgmath::Point3<f32>`
    = note: perhaps two different versions of crate `cgmath` are being used?

error[E0308]: mismatched types
   --> world.rs:150:30
    |
150 |         terrain_mesh.set_pos(Point3::new(0.0, -10.0, 0.0));
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `mgf::cgmath::Point3`, found struct `cgmath::Point3`
    |
    = note: expected struct `mgf::cgmath::Point3<f32>`
               found struct `cgmath::Point3<{float}>`
    = note: perhaps two different versions of crate `cgmath` are being used?

error[E0308]: mismatched types
   --> world.rs:179:85
    |
179 |         let id: usize = self.bodies.add_body(collider, mass, restitution, friction, world_force).into();
    |                                                                                     ^^^^^^^^^^^ expected struct `mgf::cgmath::Vector3`, found struct `cgmath::Vector3`
    |
    = note: expected struct `mgf::cgmath::Vector3<f32>`
               found struct `cgmath::Vector3<f32>`
    = note: perhaps two different versions of crate `cgmath` are being used?

error[E0599]: no method named `to_vec` found for struct `mgf::cgmath::Point3<f32>` in the current scope
   --> world.rs:335:76
    |
335 |                         model: (Matrix4::from_translation(self.bodies.x[i].to_vec())
    |                                                                            ^^^^^^ method not found in `mgf::cgmath::Point3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::EuclideanSpace;`

error[E0599]: no method named `to_vec` found for struct `mgf::cgmath::Point3<f32>` in the current scope
   --> world.rs:351:63
    |
351 |                         model: (Matrix4::from_translation(c.a.to_vec())
    |                                                               ^^^^^^ method not found in `mgf::cgmath::Point3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::EuclideanSpace;`

error[E0599]: no method named `to_vec` found for struct `mgf::cgmath::Point3<f32>` in the current scope
   --> world.rs:360:63
    |
360 |                         model: (Matrix4::from_translation(c.a.to_vec() + c.d)
    |                                                               ^^^^^^ method not found in `mgf::cgmath::Point3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::EuclideanSpace;`

error[E0599]: no method named `to_vec` found for struct `mgf::cgmath::Point3<f32>` in the current scope
   --> world.rs:369:70
    |
369 |                         model: (Matrix4::from_translation(c.center().to_vec())
    |                                                                      ^^^^^^ method not found in `mgf::cgmath::Point3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::EuclideanSpace;`

error[E0277]: the trait bound `cgmath::Matrix4<_>: std::convert::From<mgf::cgmath::Quaternion<f32>>` is not satisfied
   --> world.rs:370:35
    |
370 | ...                   * Matrix4::from(self.bodies.q[i])
    |                         ^^^^^^^^^^^^^ the trait `std::convert::From<mgf::cgmath::Quaternion<f32>>` is not implemented for `cgmath::Matrix4<_>`
    |
    = help: the following implementations were found:
              <&'a cgmath::Matrix4<S> as std::convert::From<&'a [S; 16]>>
              <&'a cgmath::Matrix4<S> as std::convert::From<&'a [[S; 4]; 4]>>
              <&'a mut cgmath::Matrix4<S> as std::convert::From<&'a mut [S; 16]>>
              <&'a mut cgmath::Matrix4<S> as std::convert::From<&'a mut [[S; 4]; 4]>>
            and 9 others
    = note: required by `std::convert::From::from`

error[E0599]: no method named `magnitude` found for struct `mgf::cgmath::Vector3<f32>` in the current scope
   --> world.rs:371:75
    |
371 | ...                   * Matrix4::from_nonuniform_scale(c.r, c.d.magnitude(), c.r)).into(),
    |                                                                 ^^^^^^^^^ method not found in `mgf::cgmath::Vector3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::InnerSpace;`

error[E0599]: no method named `to_vec` found for struct `mgf::cgmath::Point3<f32>` in the current scope
   --> world.rs:385:68
    |
385 |             model: Matrix4::from_translation(self.terrain.center().to_vec()).into(),
    |                                                                    ^^^^^^ method not found in `mgf::cgmath::Point3<f32>`
    |
    = help: items from traits can only be used if the trait is in scope
    = note: the following trait is implemented but not in scope; perhaps add a `use` for it:
            `use mgf::cgmath::EuclideanSpace;`

error: aborting due to 15 previous errors

Some errors have detailed explanations: E0277, E0308, E0432, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `mgf_demo`.

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

is this project dead?

Pool container is incomplete

There are number of poor interface choices in Pool. PoolEntry for one should not be exposed, and Pool should implement some sort of Drain. All of these need to be fixed by implementing custom iterators.

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.