Feature-gate the VecN structure.

`rustc` is has a hard time compiling it from time to time.
This commit is contained in:
Sébastien Crozet 2016-03-24 19:37:56 +01:00
parent b4c6c99dd7
commit 60c0f32e1c
5 changed files with 25 additions and 10 deletions

View File

@ -6,8 +6,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [unreleased] [0.6.0]
### Added
* Dependency to [generic-array](https://crates.io/crates/generic-array)
* Staticly sized vectors with user-defined sizes: `VecN`.
* (feature=generic_sizes): Dependency to [generic-array](https://crates.io/crates/generic-array)
* (feature=ganedic_sizes): Staticly sized vectors with user-defined sizes: `VecN`.
* Similarity transformations (an uniform scale followed by a rotation followed
by a translation): `Sim2`, `Sim3`.

View File

@ -18,14 +18,21 @@ path = "src/lib.rs"
[features]
# Generate arbitrary instances of nalgebra types for testing with quickcheck
arbitrary = [ "quickcheck" ]
generic_sizes = [ "generic-array", "typenum" ]
[dependencies]
rustc-serialize = "0.3.*"
rand = "0.3.*"
num = "0.1.*"
generic-array = "0.2.*"
typenum = "1.3.*"
num = "0.1.*"
[dependencies.generic-array]
optional = true
version = "0.2.*"
[dependencies.typenum]
optional = true
version = "1.3.*"
[dependencies.quickcheck]
optional = true
version = "0.2.*"
version = "0.2.*"

View File

@ -45,7 +45,7 @@ fn main() {
an optimized set of tools for computer graphics and physics. Those features include:
* Vectors with predefined static sizes: `Vec1`, `Vec2`, `Vec3`, `Vec4`, `Vec5`, `Vec6`.
* Vector with a user-defined static size: `VecN`.
* Vector with a user-defined static size: `VecN` (available only with the `generic_sizes` feature).
* Points with static sizes: `Pnt1`, `Pnt2`, `Pnt3`, `Pnt4`, `Pnt5`, `Pnt6`.
* Square matrices with static sizes: `Mat1`, `Mat2`, `Mat3`, `Mat4`, `Mat5`, `Mat6 `.
* Rotation matrices: `Rot2`, `Rot3`

View File

@ -42,7 +42,7 @@ fn main() {
an optimized set of tools for computer graphics and physics. Those features include:
* Vectors with predefined static sizes: `Vec1`, `Vec2`, `Vec3`, `Vec4`, `Vec5`, `Vec6`.
* Vector with a user-defined static size: `VecN`.
* Vector with a user-defined static size: `VecN` (available only with the `generic_sizes` feature).
* Points with static sizes: `Pnt1`, `Pnt2`, `Pnt3`, `Pnt4`, `Pnt5`, `Pnt6`.
* Square matrices with static sizes: `Mat1`, `Mat2`, `Mat3`, `Mat4`, `Mat5`, `Mat6 `.
* Rotation matrices: `Rot2`, `Rot3`
@ -78,6 +78,8 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
extern crate rustc_serialize;
extern crate rand;
extern crate num;
#[cfg(feature="generic_sizes")]
extern crate generic_array;
#[cfg(feature="arbitrary")]
@ -136,6 +138,9 @@ pub use traits::{
UniformSphereSample
};
#[cfg(feature="generic_sizes")]
pub use structs::VecN;
pub use structs::{
Identity,
DMat, DMat1, DMat2, DMat3, DMat4, DMat5, DMat6,
@ -145,7 +150,7 @@ pub use structs::{
Mat1, Mat2, Mat3, Mat4,
Mat5, Mat6,
Rot2, Rot3,
VecN, Vec1, Vec2, Vec3, Vec4, Vec5, Vec6,
Vec1, Vec2, Vec3, Vec4, Vec5, Vec6,
Pnt1, Pnt2, Pnt3, Pnt4, Pnt5, Pnt6,
Persp3, PerspMat3,
Ortho3, OrthoMat3,

View File

@ -3,7 +3,6 @@
pub use self::dmat::{DMat, DMat1, DMat2, DMat3, DMat4, DMat5, DMat6};
pub use self::dvec::{DVec, DVec1, DVec2, DVec3, DVec4, DVec5, DVec6};
pub use self::vec::{Vec1, Vec2, Vec3, Vec4, Vec5, Vec6};
pub use self::vecn::VecN;
pub use self::pnt::{Pnt1, Pnt2, Pnt3, Pnt4, Pnt5, Pnt6};
pub use self::mat::{Identity, Mat1, Mat2, Mat3, Mat4, Mat5, Mat6};
pub use self::rot::{Rot2, Rot3};
@ -13,9 +12,13 @@ pub use self::persp::{Persp3, PerspMat3};
pub use self::ortho::{Ortho3, OrthoMat3};
pub use self::quat::{Quat, UnitQuat};
#[cfg(feature="generic_sizes")]
pub use self::vecn::VecN;
mod dmat_macros;
mod dmat;
mod vecn_macros;
#[cfg(feature="generic_sizes")]
mod vecn;
mod dvec_macros;
mod dvec;