fu5ha / ultraviolet

A wide linear algebra crate for games and graphics.
https://crates.io/crates/ultraviolet
750 stars 81 forks source link

Implement `serde::Serialize` and `serde::Deserialize` for bivec and rotor types #74

Closed thenlevy closed 4 years ago

thenlevy commented 4 years ago

The serde traits are implemented for the vectors and matrices types. I think it would be usefull to have them also for bivec and rotor types.

I can try to write these implementations, using those of vector and matrices as model.

ritobanrc commented 4 years ago

Yes, I would appreciate this as well.

joeftiger commented 4 years ago

Actually, on 0.7.1, serde is not used at all (as far as I can see), even for Vec3's. As de-/serialization is crucial for me, I might opt for another crate, even though I really like this one.

fu5ha commented 4 years ago

Actually, on 0.7.1, serde is not used at all (as far as I can see), even for Vec3's. As de-/serialization is crucial for me, I might opt for another crate, even though I really like this one.

Support for serialization is gated under the serde feature, as noted in the readme. Currently it supports only scalar vector and matrix types, and the above pr will add support for rotors and bivectors.

joeftiger commented 4 years ago

Support for serialization is gated under the serde feature, as noted in the readme. Currently it supports only scalar vector and matrix types, and the above pr will add support for rotors and bivectors.

Yes, my bad. I am still new to Rust and don't know how to enable the optional dependencies. I am sorry :-)

fu5ha commented 4 years ago

Support for serialization is gated under the serde feature, as noted in the readme. Currently it supports only scalar vector and matrix types, and the above pr will add support for rotors and bivectors.

Yes, my bad. I am still new to Rust and don't know how to enable the optional dependencies. I am sorry :-)

No problem. See this section of the readme: https://github.com/termhn/ultraviolet#cargo-features

joeftiger commented 4 years ago

Thank you very much! FIgured it out :-)

fu5ha commented 4 years ago

75 merged and released as 0.7.2