forked from M-Labs/nalgebra
parent
21c163db3a
commit
664658760a
@ -35,6 +35,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
* Implement `Extend<Matrix<...>>` for matrices with dynamic storage. This will concatenate the columns of both matrices.
|
* Implement `Extend<Matrix<...>>` for matrices with dynamic storage. This will concatenate the columns of both matrices.
|
||||||
* Implement `Into<Vec>` for the `MatrixVec` storage.
|
* Implement `Into<Vec>` for the `MatrixVec` storage.
|
||||||
* Implement `Hash` for all matrices.
|
* Implement `Hash` for all matrices.
|
||||||
|
* Add a `.len()` method to retrieve the size of a `MatrixVec`.
|
||||||
|
|
||||||
### Modified
|
### Modified
|
||||||
* The orthographic projection no longer require that `bottom < top`, that `left < right`, and that `znear < zfar`. The
|
* The orthographic projection no longer require that `bottom < top`, that `left < right`, and that `znear < zfar`. The
|
||||||
@ -47,6 +48,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
This is for the case of `Unit`, `Transform`, `Orthographic3`, `Perspective3`, `Rotation`.
|
This is for the case of `Unit`, `Transform`, `Orthographic3`, `Perspective3`, `Rotation`.
|
||||||
* Deprecate several functions at the root of the crate (replaced by methods).
|
* Deprecate several functions at the root of the crate (replaced by methods).
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* Remove the `Deref` impl for `MatrixVec` as it could cause hard-to-understand compilation errors.
|
||||||
|
|
||||||
### nalgebra-glm
|
### nalgebra-glm
|
||||||
* Add several alternative projection computations, e.g., `ortho_lh`, `ortho_lh_no`, `perspective_lh`, etc.
|
* Add several alternative projection computations, e.g., `ortho_lh`, `ortho_lh_no`, `perspective_lh`, etc.
|
||||||
* Add features matching those of nalgebra, in particular: `serde-serialize`, `abmonation-serialize`, std` (enabled by default).
|
* Add features matching those of nalgebra, in particular: `serde-serialize`, `abmonation-serialize`, std` (enabled by default).
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#[cfg(feature = "abomonation-serialize")]
|
#[cfg(feature = "abomonation-serialize")]
|
||||||
use std::io::{Result as IOResult, Write};
|
use std::io::{Result as IOResult, Write};
|
||||||
use std::ops::Deref;
|
|
||||||
|
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
@ -81,14 +80,11 @@ impl<N, R: Dim, C: Dim> VecStorage<N, R, C> {
|
|||||||
|
|
||||||
self.data
|
self.data
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
impl<N, R: Dim, C: Dim> Deref for VecStorage<N, R, C> {
|
|
||||||
type Target = Vec<N>;
|
|
||||||
|
|
||||||
|
/// The number of elements on the underlying vector.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn deref(&self) -> &Self::Target {
|
pub fn len(&self) -> usize {
|
||||||
&self.data
|
self.data.len()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +141,7 @@ where DefaultAllocator: Allocator<N, Dynamic, C, Buffer = Self>
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_slice(&self) -> &[N] {
|
fn as_slice(&self) -> &[N] {
|
||||||
&self[..]
|
&self.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +185,7 @@ where DefaultAllocator: Allocator<N, R, Dynamic, Buffer = Self>
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn as_slice(&self) -> &[N] {
|
fn as_slice(&self) -> &[N] {
|
||||||
&self[..]
|
&self.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user