Add read-only accesse to a Transform subcomponents.

This commit is contained in:
Sébastien Crozet 2013-06-29 18:35:01 +00:00
parent 50d424a901
commit 364c16ca19
1 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,17 @@ impl<M, V> Transform<M, V>
{ Transform { submat: mat, subtrans: trans } } { Transform { submat: mat, subtrans: trans } }
} }
impl<M: Copy, V: Copy> Transform<M, V>
{
#[inline]
pub fn submat(&self) -> M
{ copy self.submat }
#[inline]
pub fn subtrans(&self) -> V
{ copy self.subtrans }
}
impl<M:Dim, V> Dim for Transform<M, V> impl<M:Dim, V> Dim for Transform<M, V>
{ {
#[inline] #[inline]