pub struct Symmetric3 { /* private fields */ }Expand description
A symmetric 3x3 matrix.
The matrix is stored in a compact form, only keeping the unique elements.
Implementations§
Source§impl Symmetric3
impl Symmetric3
Sourcepub fn new(m11: f64, m22: f64, m33: f64, m12: f64, m13: f64, m23: f64) -> Self
pub fn new(m11: f64, m22: f64, m33: f64, m12: f64, m13: f64, m23: f64) -> Self
Creates a new Symmetric3 matrix from the given elements.
§Arguments
m11,m22,m33- The diagonal elements.m12,m13,m23- The off-diagonal elements.
Sourcepub fn from_diagonal(diag: &[f64; 3]) -> Self
pub fn from_diagonal(diag: &[f64; 3]) -> Self
Creates a diagonal symmetric matrix from the given diagonal elements.
§Arguments
diag- A vector containing the diagonal elements [m11, m22, m33].
Sourcepub fn skew_square(v: &Vector3D) -> Symmetric3
pub fn skew_square(v: &Vector3D) -> Symmetric3
Constructs the skew symmetric matrix associated to the given 3D vector.
Sourcepub fn rotate(&self, rotation: &SpatialRotation) -> Symmetric3
pub fn rotate(&self, rotation: &SpatialRotation) -> Symmetric3
Trait Implementations§
Source§impl Add for Symmetric3
impl Add for Symmetric3
Source§type Output = Symmetric3
type Output = Symmetric3
The resulting type after applying the
+ operator.Source§impl Clone for Symmetric3
impl Clone for Symmetric3
Source§fn clone(&self) -> Symmetric3
fn clone(&self) -> Symmetric3
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Symmetric3
impl Debug for Symmetric3
Source§impl Default for Symmetric3
impl Default for Symmetric3
Source§fn default() -> Symmetric3
fn default() -> Symmetric3
Returns the “default value” for a type. Read more
Source§impl Mul<&Vector3D> for &Symmetric3
impl Mul<&Vector3D> for &Symmetric3
Source§impl Mul<Symmetric3> for f64
impl Mul<Symmetric3> for f64
Source§type Output = Symmetric3
type Output = Symmetric3
The resulting type after applying the
* operator.Source§impl Mul<f64> for Symmetric3
impl Mul<f64> for Symmetric3
Source§impl PartialEq for Symmetric3
impl PartialEq for Symmetric3
Source§impl Sub for Symmetric3
impl Sub for Symmetric3
Source§type Output = Symmetric3
type Output = Symmetric3
The resulting type after applying the
- operator.impl Copy for Symmetric3
impl StructuralPartialEq for Symmetric3
Auto Trait Implementations§
impl Freeze for Symmetric3
impl RefUnwindSafe for Symmetric3
impl Send for Symmetric3
impl Sync for Symmetric3
impl Unpin for Symmetric3
impl UnsafeUnpin for Symmetric3
impl UnwindSafe for Symmetric3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.