Struct heron::rapier_plugin::rapier2d::parry::utils::SdpMatrix3
source · pub struct SdpMatrix3<N> {
pub m11: N,
pub m12: N,
pub m13: N,
pub m22: N,
pub m23: N,
pub m33: N,
}
Expand description
A 3x3 symmetric-definite-positive matrix.
Fields
m11: N
The component at the first row and first column of this matrix.
m12: N
The component at the first row and second column of this matrix.
m13: N
The component at the first row and third column of this matrix.
m22: N
The component at the second row and second column of this matrix.
m23: N
The component at the second row and third column of this matrix.
m33: N
The component at the third row and third column of this matrix.
Implementations
sourceimpl<N> SdpMatrix3<N>where
N: SimdRealField + Copy,
impl<N> SdpMatrix3<N>where
N: SimdRealField + Copy,
sourcepub fn new(m11: N, m12: N, m13: N, m22: N, m23: N, m33: N) -> SdpMatrix3<N>
pub fn new(m11: N, m12: N, m13: N, m22: N, m23: N, m33: N) -> SdpMatrix3<N>
A new SDP 3x3 matrix with the given components.
Because the matrix is symmetric, only the lower off-diagonal components is required.
sourcepub fn from_sdp_matrix(
mat: Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> SdpMatrix3<N>
pub fn from_sdp_matrix(
mat: Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> SdpMatrix3<N>
Build an SdpMatrix3
structure from a plain matrix, assuming it is SDP.
No check is performed to ensure mat
is actually SDP.
sourcepub fn zero() -> SdpMatrix3<N>
pub fn zero() -> SdpMatrix3<N>
Create a new SDP matrix filled with zeros.
sourcepub fn diagonal(val: N) -> SdpMatrix3<N>
pub fn diagonal(val: N) -> SdpMatrix3<N>
Create a new SDP matrix with its diagonal filled with val
, and its off-diagonal elements set to zero.
sourcepub fn inverse_unchecked(&self) -> SdpMatrix3<N>
pub fn inverse_unchecked(&self) -> SdpMatrix3<N>
Compute the inverse of this SDP matrix without performing any inversibility check.
sourcepub fn quadform3x2(
&self,
m: &Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
) -> SdpMatrix2<N>
pub fn quadform3x2(
&self,
m: &Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
) -> SdpMatrix2<N>
Compute the quadratic form m.transpose() * self * m
.
sourcepub fn quadform(
&self,
m: &Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> SdpMatrix3<N>
pub fn quadform(
&self,
m: &Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> SdpMatrix3<N>
Compute the quadratic form m.transpose() * self * m
.
sourcepub fn add_diagonal(&self, elt: N) -> SdpMatrix3<N>
pub fn add_diagonal(&self, elt: N) -> SdpMatrix3<N>
Adds elt
to the diagonal components of self
.
Trait Implementations
sourceimpl<N> Add<SdpMatrix3<N>> for SdpMatrix3<N>where
N: Add<N>,
impl<N> Add<SdpMatrix3<N>> for SdpMatrix3<N>where
N: Add<N>,
type Output = SdpMatrix3<<N as Add<N>>::Output>
type Output = SdpMatrix3<<N as Add<N>>::Output>
+
operator.sourcefn add(self, rhs: SdpMatrix3<N>) -> <SdpMatrix3<N> as Add<SdpMatrix3<N>>>::Output
fn add(self, rhs: SdpMatrix3<N>) -> <SdpMatrix3<N> as Add<SdpMatrix3<N>>>::Output
+
operation. Read moresourceimpl<N> Clone for SdpMatrix3<N>where
N: Clone,
impl<N> Clone for SdpMatrix3<N>where
N: Clone,
sourcefn clone(&self) -> SdpMatrix3<N>
fn clone(&self) -> SdpMatrix3<N>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<N> Debug for SdpMatrix3<N>where
N: Debug,
impl<N> Debug for SdpMatrix3<N>where
N: Debug,
sourceimpl<T> From<[SdpMatrix3<f32>; 4]> for SdpMatrix3<T>where
T: From<[f32; 4]>,
impl<T> From<[SdpMatrix3<f32>; 4]> for SdpMatrix3<T>where
T: From<[f32; 4]>,
sourcefn from(data: [SdpMatrix3<f32>; 4]) -> SdpMatrix3<T>
fn from(data: [SdpMatrix3<f32>; 4]) -> SdpMatrix3<T>
sourceimpl<N> Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
impl<N> Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
type Output = Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
type Output = Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
*
operator.sourcefn mul(
self,
rhs: Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>>>::Output
fn mul(
self,
rhs: Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>>>::Output
*
operation. Read moresourceimpl<N> Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
impl<N> Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
type Output = Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
type Output = Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
*
operator.sourcefn mul(
self,
rhs: Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>>>::Output
fn mul(
self,
rhs: Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<2>, ArrayStorage<N, 3, 2>>>>::Output
*
operation. Read moresourceimpl<N> Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
impl<N> Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>> for SdpMatrix3<N>where
N: SimdRealField + Copy,
type Output = Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
type Output = Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
*
operator.sourcefn mul(
self,
rhs: Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>>>::Output
fn mul(
self,
rhs: Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>
) -> <SdpMatrix3<N> as Mul<Matrix<N, Const<3>, Const<3>, ArrayStorage<N, 3, 3>>>>::Output
*
operation. Read moresourceimpl Mul<f32> for SdpMatrix3<f32>
impl Mul<f32> for SdpMatrix3<f32>
sourceimpl<N> PartialEq<SdpMatrix3<N>> for SdpMatrix3<N>where
N: PartialEq<N>,
impl<N> PartialEq<SdpMatrix3<N>> for SdpMatrix3<N>where
N: PartialEq<N>,
sourcefn eq(&self, other: &SdpMatrix3<N>) -> bool
fn eq(&self, other: &SdpMatrix3<N>) -> bool
impl<N> Copy for SdpMatrix3<N>where
N: Copy,
impl<N> StructuralPartialEq for SdpMatrix3<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for SdpMatrix3<N>where
N: RefUnwindSafe,
impl<N> Send for SdpMatrix3<N>where
N: Send,
impl<N> Sync for SdpMatrix3<N>where
N: Sync,
impl<N> Unpin for SdpMatrix3<N>where
N: Unpin,
impl<N> UnwindSafe for SdpMatrix3<N>where
N: UnwindSafe,
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist. Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.