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

add glam feature #21

Merged
merged 1 commit into from
May 19, 2021
Merged

add glam feature #21

merged 1 commit into from
May 19, 2021

Conversation

jakobhellermann
Copy link
Contributor

This adds a glam feature which uses the glam crate instead of nalgebra to reduce the amount of dependencies for crates not using nalgebra (specifically the bevy engine).
Let me know if this is something you'd merge, otherwise if it is okay if I fork this repo and publish it using glam (#20).

Comment on lines +478 to +489
#[cfg(feature = "nalgebra")]
let mut vOs = (*pTriInfos.offset(f as isize)).vOs
- (n.dot(&(*pTriInfos.offset(f as isize)).vOs) * n);
vOt = (*pTriInfos.offset(f as isize)).vOt
#[cfg(feature = "nalgebra")]
let mut vOt = (*pTriInfos.offset(f as isize)).vOt
- (n.dot(&(*pTriInfos.offset(f as isize)).vOt) * n);
#[cfg(feature = "glam")]
let mut vOs = (*pTriInfos.offset(f as isize)).vOs
- (n.dot((*pTriInfos.offset(f as isize)).vOs) * n);
#[cfg(feature = "glam")]
let mut vOt = (*pTriInfos.offset(f as isize)).vOt
- (n.dot((*pTriInfos.offset(f as isize)).vOt) * n);
Copy link
Member

Choose a reason for hiding this comment

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

These lines look identical to me. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the nalgebra version needed to borrow the parameter of the n.dot(..) function.

@alteous alteous merged commit ee3fd02 into gltf-rs:master May 19, 2021
@jakobhellermann jakobhellermann deleted the glam-feature branch May 19, 2021 21:07
@jakobhellermann
Copy link
Contributor Author

jakobhellermann commented May 19, 2021

@alteous oh and one more thing, could you perhaps release a new version after merging #22? I believe this is a non-breaking change because of the default dependency.

@alteous
Copy link
Member

alteous commented May 22, 2021

Of course :)

@alteous
Copy link
Member

alteous commented May 22, 2021

The build seems to be broken and CI is no longer working. I need to confirm the library is working before I release a new version.

@james7132
Copy link

Following up on this, did you confirm whether this was fixed or not?

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.

3 participants