Package org.robwork.sdurw_math
Class InertiaMatrixf
- java.lang.Object
-
- org.robwork.sdurw_math.InertiaMatrixf
-
public class InertiaMatrixf extends java.lang.Object
A 3x3 inertia matrix
-
-
Constructor Summary
Constructors Constructor Description InertiaMatrixf()
constructor - where only the diagonal is set
InertiaMatrixf(float i)
constructor - where only the diagonal is setInertiaMatrixf(float i, float j)
constructor - where only the diagonal is setInertiaMatrixf(float i, float j, float k)
constructor - where only the diagonal is setInertiaMatrixf(float r11, float r12, float r13, float r21, float r22, float r23, float r31, float r32, float r33)
InertiaMatrixf(long cPtr, boolean cMemoryOwn)
InertiaMatrixf(EigenMatrix3f r)
Construct an internal matrix from a Eigen::MatrixBase
It is the responsibility of the user that 3x3 matrix is indeed an
inertia matrix.InertiaMatrixf(Vector3Df i, Vector3Df j, Vector3Df k)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InertiaMatrixf
add(InertiaMatrixf I2)
Calculates the addition between the two InertiaMatricesvoid
delete()
Vector3Df
diag()
get The diagonal of the MatrixEigenMatrix3f
e()
Returns reference to the internal 3x3 matrixboolean
equals(InertiaMatrixf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
float
get(long row, long column)
static long
getCPtr(InertiaMatrixf obj)
static InertiaMatrixf
makeCuboidInertia(float mass, float x, float y, float z)
calculates the inertia of a cuboid where the reference frame is in the
center of the cuboid withstatic InertiaMatrixf
makeHollowSphereInertia(float mass, float radi)
Make inertia matrix for a hollow sphere.static InertiaMatrixf
makeSolidSphereInertia(float mass, float radi)
Make inertia matrix for a solid sphere.InertiaMatrixf
multiply(Rotation3Df bRc)
Vector3Df
multiply(Vector3Df bVc)
Calculates \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}}boolean
notEqual(InertiaMatrixf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
void
set(long row, long column, float d)
java.lang.String
toString()
-
-
-
Constructor Detail
-
InertiaMatrixf
public InertiaMatrixf(long cPtr, boolean cMemoryOwn)
-
InertiaMatrixf
public InertiaMatrixf(float r11, float r12, float r13, float r21, float r22, float r23, float r31, float r32, float r33)
-
InertiaMatrixf
public InertiaMatrixf(float i, float j, float k)
constructor - where only the diagonal is set- Parameters:
i
- [in] m(0,0)j
- [in] m(1,1)k
- [in] m(2,2)
-
InertiaMatrixf
public InertiaMatrixf(float i, float j)
constructor - where only the diagonal is set- Parameters:
i
- [in] m(0,0)j
- [in] m(1,1)
-
InertiaMatrixf
public InertiaMatrixf(float i)
constructor - where only the diagonal is set- Parameters:
i
- [in] m(0,0)
-
InertiaMatrixf
public InertiaMatrixf()
constructor - where only the diagonal is set
-
InertiaMatrixf
public InertiaMatrixf(EigenMatrix3f r)
Construct an internal matrix from a Eigen::MatrixBase
It is the responsibility of the user that 3x3 matrix is indeed an
inertia matrix.
-
-
Method Detail
-
getCPtr
public static long getCPtr(InertiaMatrixf obj)
-
delete
public void delete()
-
get
public float get(long row, long column)
-
set
public void set(long row, long column, float d)
-
e
public EigenMatrix3f e()
Returns reference to the internal 3x3 matrix
-
multiply
public InertiaMatrixf multiply(Rotation3Df bRc)
-
add
public InertiaMatrixf add(InertiaMatrixf I2)
Calculates the addition between the two InertiaMatrices
-
multiply
public Vector3Df multiply(Vector3Df bVc)
Calculates \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}}- Parameters:
bVc
- [in] \robabx{b}{c}{\mathbf{v}}- Returns:
- \robabx{a}{c}{\mathbf{v}}
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(InertiaMatrixf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
- Parameters:
rhs
- [in] InertiaMatrix to compare with- Returns:
- True if equal.
-
notEqual
public boolean notEqual(InertiaMatrixf rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true if any of the elements are different.
- Parameters:
rhs
- [in] InertiaMatrix to compare with- Returns:
- True if not equal.
-
makeSolidSphereInertia
public static InertiaMatrixf makeSolidSphereInertia(float mass, float radi)
Make inertia matrix for a solid sphere.- Parameters:
mass
- [in] mass of solid sphere.radi
- [in] radius of sphere.- Returns:
- the inertia matrix.
-
makeHollowSphereInertia
public static InertiaMatrixf makeHollowSphereInertia(float mass, float radi)
Make inertia matrix for a hollow sphere.- Parameters:
mass
- [in] mass of hollow sphere.radi
- [in] radius of sphere.- Returns:
- the inertia matrix.
-
makeCuboidInertia
public static InertiaMatrixf makeCuboidInertia(float mass, float x, float y, float z)
calculates the inertia of a cuboid where the reference frame is in the
center of the cuboid with- Parameters:
mass
-x
-y
-z
-- Returns:
-
diag
public Vector3Df diag()
get The diagonal of the Matrix- Returns:
- Vector3D< T >
-
-