-
-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use meshloader to support multiple file formats loading #744
Conversation
Co-authored-by: Tin Lai <[email protected]>
let vertices: Vec<_> = raw_mesh | ||
.vertices | ||
.iter() | ||
.map(|xyz| Point::new(xyz[0], xyz[1], xyz[2])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work?
.map(|xyz| Point::new(xyz[0], xyz[1], xyz[2])) | |
.map(Point::from) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your suggestion doesn´t work with the following error:
error[E0277]: the trait bound
OPoint<_, Const<3>>: From<&[f32; 3]>
is not satisfied
I can fix it with cloned()
, or could make an upstream pr to support that conversion?
mesh-loader
is added to a more generic crate.CHANGELOG.md
for a list of changesrapier/crates/rapier3d-meshloader/CHANGELOG.md
Lines 1 to 13 in fb8a7c7