Skip to content
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

Merged
merged 7 commits into from
Nov 12, 2024

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz commented Sep 30, 2024

## Unreleased
Renamed the crate from `rapier3d-stl` to `rapier3d-meshloader`, to better reflect its support for multiple formats.
### Added
- Add optional support for Collada and Wavefront files through new feature flags `collada` and `wavefront`.
### Modified
- Support for STL is now optional through feature `stl`.
- Features `stl`, `wavefront` and `collada` are enabled by default.

crates/rapier3d-urdf/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-urdf/src/lib.rs Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
@Vrixyz Vrixyz marked this pull request as ready for review October 1, 2024 07:31
@Vrixyz Vrixyz changed the title Use meshloader to support multiple file formats loading for urdf Use meshloader to support multiple file formats loading Oct 1, 2024
@Vrixyz Vrixyz mentioned this pull request Oct 1, 2024
@Vrixyz Vrixyz requested a review from sebcrozet October 10, 2024 08:18
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
crates/rapier3d-meshloader/src/lib.rs Outdated Show resolved Hide resolved
let vertices: Vec<_> = raw_mesh
.vertices
.iter()
.map(|xyz| Point::new(xyz[0], xyz[1], xyz[2]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

Suggested change
.map(|xyz| Point::new(xyz[0], xyz[1], xyz[2]))
.map(Point::from)

Copy link
Contributor Author

@Vrixyz Vrixyz Nov 4, 2024

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?

crates/rapier3d-urdf/src/lib.rs Show resolved Hide resolved
@Vrixyz Vrixyz requested a review from sebcrozet November 8, 2024 09:00
@Vrixyz Vrixyz merged commit 71f65fe into dimforge:master Nov 12, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants