Public Member Functions | Public Attributes | Friends
IceMaths::Matrix3x3 Class Reference

#include <OPC_IceHook.h>

List of all members.

Public Member Functions

inline_ void Add (const Matrix3x3 &mat)
 Add another matrix.
inline_ void Add (const Matrix3x3 &a, const Matrix3x3 &b)
inline_ void Copy (const Matrix3x3 &source)
 Copy from a Matrix3x3.
float Determinant () const
 Compute the determinant of the matrix. We use the rule of Sarrus.
Matrix3x3Exp (const Matrix3x3 &a)
 this = exp(a)
void FromQuat (const Quat &q)
void FromQuatL2 (const Quat &q, float l2)
Matrix3x3FromTo (const Point &from, const Point &to)
 Makes a rotation matrix mapping vector "from" to vector "to".
inline_ void GetCol (const udword c, Point &p) const
 Returns a column.
inline_ void GetRow (const udword r, Point &p) const
 Returns a row.
inline_ const PointGetRow (const udword r) const
 Returns a row.
inline_ PointGetRow (const udword r)
 Returns a row.
inline_ void Identity ()
 Sets the identity matrix.
Matrix3x3Invert ()
 Invert the matrix. Determinant must be different from zero, else matrix can't be inverted.
inline_ bool IsIdentity () const
 Checks for identity.
inline_ BOOL IsValid () const
 Checks matrix validity.
inline_ void Mac (const Matrix3x3 &a, const Matrix3x3 &b, float s)
 Mac.
inline_ void Mac (const Matrix3x3 &a, float s)
 Mac.
inline_ Matrix3x3 ()
 Empty constructor.
inline_ Matrix3x3 (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
 Constructor from 9 values.
inline_ Matrix3x3 (const Matrix3x3 &mat)
 Copy constructor.
inline_ void Mult (const Matrix3x3 &a, float s)
 this = A * s
inline_ void Mult (const Matrix3x3 &a, const Matrix3x3 &b)
 this = a * b
inline_ void MultABt (const Matrix3x3 &a, const Matrix3x3 &b)
 this = a * transpose(b)
inline_ void MultAtB (const Matrix3x3 &a, const Matrix3x3 &b)
 this = transpose(a) * b
inline_ void Neg ()
 Negates the matrix.
inline_ void Neg (const Matrix3x3 &mat)
 Neg from another matrix.
Matrix3x3Normalize ()
 operator Matrix4x4 () const
 Cast a Matrix3x3 to a Matrix4x4.
 operator Quat () const
 Cast a Matrix3x3 to a Quat.
inline_ Matrix3x3 operator* (const Matrix3x3 &mat) const
 Operator for Matrix3x3 Mul = Matrix3x3 * Matrix3x3;.
inline_ Point operator* (const Point &v) const
 Operator for Point Mul = Matrix3x3 * Point;.
inline_ Matrix3x3 operator* (float s) const
 Operator for Matrix3x3 Mul = Matrix3x3 * float;.
inline_ Matrix3x3operator*= (const Matrix3x3 &mat)
 Operator for Matrix3x3 *= Matrix3x3.
inline_ Matrix3x3operator*= (float s)
 Operator for Matrix3x3 *= float.
inline_ Matrix3x3 operator+ (const Matrix3x3 &mat) const
 Operator for Matrix3x3 Plus = Matrix3x3 + Matrix3x3;.
inline_ Matrix3x3operator+= (const Matrix3x3 &mat)
 Operator for Matrix3x3 += Matrix3x3.
inline_ Matrix3x3 operator- (const Matrix3x3 &mat) const
 Operator for Matrix3x3 Minus = Matrix3x3 - Matrix3x3;.
inline_ Matrix3x3operator-= (const Matrix3x3 &mat)
 Operator for Matrix3x3 -= Matrix3x3.
inline_ Matrix3x3 operator/ (float s) const
 Operator for Matrix3x3 Div = Matrix3x3 / float;.
inline_ Matrix3x3operator/= (float s)
 Operator for Matrix3x3 /= float.
inline_ const Pointoperator[] (int row) const
inline_ Pointoperator[] (int row)
Matrix3x3Rot (float angle, const Point &axis)
 Make a rotation matrix about an arbitrary axis.
void RotX (float angle)
void RotY (float angle)
void RotYX (float y, float x)
void RotZ (float angle)
inline_ void Scale (const Point &p)
 Scales from a Point. Each row is multiplied by a component.
inline_ void Scale (float sx, float sy, float sz)
 Scales from floats. Each row is multiplied by a value.
inline_ void Set (float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
 Assign values.
inline_ void SetCol (const udword c, const Point &p)
 Sets a column.
inline_ void SetRow (const udword r, const Point &p)
 Sets a row.
inline_ void SetScale (const Point &p)
 Sets the scale from a Point. The point is put on the diagonal.
inline_ void SetScale (float sx, float sy, float sz)
 Sets the scale from floats. Values are put on the diagonal.
inline_ void SkewSymmetric (const Point &a)
inline_ void Sub (const Matrix3x3 &mat)
 Sub another matrix.
inline_ void Sub (const Matrix3x3 &a, const Matrix3x3 &b)
inline_ float Trace () const
 Computes the trace. The trace is the sum of the 3 diagonal components.
void Transpose ()
 Transpose the matrix.
void Transpose (const Matrix3x3 &a)
 this = Transpose(a)
inline_ void Zero ()
 Clears the matrix.
inline_ ~Matrix3x3 ()
 Destructor.

Public Attributes

float m [3][3]

Friends

inline_ friend Matrix3x3 operator* (float s, const Matrix3x3 &mat)
 Operator for Matrix3x3 Mul = float * Matrix3x3;.
inline_ friend Matrix3x3 operator/ (float s, const Matrix3x3 &mat)
 Operator for Matrix3x3 Div = float / Matrix3x3;.

Detailed Description

Definition at line 21 of file OPC_IceHook.h.


Constructor & Destructor Documentation

Empty constructor.

Definition at line 25 of file OPC_IceHook.h.

inline_ IceMaths::Matrix3x3::Matrix3x3 ( float  m00,
float  m01,
float  m02,
float  m10,
float  m11,
float  m12,
float  m20,
float  m21,
float  m22 
) [inline]

Constructor from 9 values.

Definition at line 27 of file OPC_IceHook.h.

Copy constructor.

Definition at line 34 of file OPC_IceHook.h.

Destructor.

Definition at line 36 of file OPC_IceHook.h.


Member Function Documentation

Add another matrix.

Definition at line 160 of file OPC_IceHook.h.

Definition at line 205 of file OPC_IceHook.h.

Copy from a Matrix3x3.

Definition at line 69 of file OPC_IceHook.h.

float IceMaths::Matrix3x3::Determinant ( ) const [inline]

Compute the determinant of the matrix. We use the rule of Sarrus.

Definition at line 304 of file OPC_IceHook.h.

this = exp(a)

void IceMaths::Matrix3x3::FromQuatL2 ( const Quat &  q,
float  l2 
)

Makes a rotation matrix mapping vector "from" to vector "to".

inline_ void IceMaths::Matrix3x3::GetCol ( const udword  c,
Point p 
) const [inline]

Returns a column.

Definition at line 81 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::GetRow ( const udword  r,
Point p 
) const [inline]

Returns a row.

Definition at line 73 of file OPC_IceHook.h.

Returns a row.

Definition at line 75 of file OPC_IceHook.h.

Returns a row.

Definition at line 77 of file OPC_IceHook.h.

Sets the identity matrix.

Definition at line 90 of file OPC_IceHook.h.

Invert the matrix. Determinant must be different from zero, else matrix can't be inverted.

Definition at line 318 of file OPC_IceHook.h.

inline_ bool IceMaths::Matrix3x3::IsIdentity ( ) const [inline]

Checks for identity.

Definition at line 92 of file OPC_IceHook.h.

Checks matrix validity.

Definition at line 110 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::Mac ( const Matrix3x3 a,
const Matrix3x3 b,
float  s 
) [inline]

Mac.

Definition at line 175 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::Mac ( const Matrix3x3 a,
float  s 
) [inline]

Mac.

Definition at line 190 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::Mult ( const Matrix3x3 a,
float  s 
) [inline]

this = A * s

Definition at line 198 of file OPC_IceHook.h.

this = a * b

Definition at line 220 of file OPC_IceHook.h.

this = a * transpose(b)

Definition at line 248 of file OPC_IceHook.h.

this = transpose(a) * b

Definition at line 234 of file OPC_IceHook.h.

Negates the matrix.

Definition at line 144 of file OPC_IceHook.h.

Neg from another matrix.

Definition at line 152 of file OPC_IceHook.h.

Matrix3x3::operator Matrix4x4 ( ) const

Cast a Matrix3x3 to a Matrix4x4.

Definition at line 41 of file IceMatrix3x3.cpp.

IceMaths::Matrix3x3::operator Quat ( ) const

Cast a Matrix3x3 to a Quat.

inline_ Matrix3x3 IceMaths::Matrix3x3::operator* ( const Matrix3x3 mat) const [inline]

Operator for Matrix3x3 Mul = Matrix3x3 * Matrix3x3;.

Definition at line 367 of file OPC_IceHook.h.

inline_ Point IceMaths::Matrix3x3::operator* ( const Point v) const [inline]

Operator for Point Mul = Matrix3x3 * Point;.

Definition at line 384 of file OPC_IceHook.h.

inline_ Matrix3x3 IceMaths::Matrix3x3::operator* ( float  s) const [inline]

Operator for Matrix3x3 Mul = Matrix3x3 * float;.

Definition at line 387 of file OPC_IceHook.h.

inline_ Matrix3x3& IceMaths::Matrix3x3::operator*= ( const Matrix3x3 mat) [inline]

Operator for Matrix3x3 *= Matrix3x3.

Definition at line 442 of file OPC_IceHook.h.

inline_ Matrix3x3& IceMaths::Matrix3x3::operator*= ( float  s) [inline]

Operator for Matrix3x3 *= float.

Definition at line 464 of file OPC_IceHook.h.

inline_ Matrix3x3 IceMaths::Matrix3x3::operator+ ( const Matrix3x3 mat) const [inline]

Operator for Matrix3x3 Plus = Matrix3x3 + Matrix3x3;.

Definition at line 349 of file OPC_IceHook.h.

inline_ Matrix3x3& IceMaths::Matrix3x3::operator+= ( const Matrix3x3 mat) [inline]

Operator for Matrix3x3 += Matrix3x3.

Definition at line 424 of file OPC_IceHook.h.

inline_ Matrix3x3 IceMaths::Matrix3x3::operator- ( const Matrix3x3 mat) const [inline]

Operator for Matrix3x3 Minus = Matrix3x3 - Matrix3x3;.

Definition at line 358 of file OPC_IceHook.h.

inline_ Matrix3x3& IceMaths::Matrix3x3::operator-= ( const Matrix3x3 mat) [inline]

Operator for Matrix3x3 -= Matrix3x3.

Definition at line 433 of file OPC_IceHook.h.

inline_ Matrix3x3 IceMaths::Matrix3x3::operator/ ( float  s) const [inline]

Operator for Matrix3x3 Div = Matrix3x3 / float;.

Definition at line 405 of file OPC_IceHook.h.

inline_ Matrix3x3& IceMaths::Matrix3x3::operator/= ( float  s) [inline]

Operator for Matrix3x3 /= float.

Definition at line 473 of file OPC_IceHook.h.

inline_ const Point& IceMaths::Matrix3x3::operator[] ( int  row) const [inline]

Definition at line 488 of file OPC_IceHook.h.

inline_ Point& IceMaths::Matrix3x3::operator[] ( int  row) [inline]

Definition at line 489 of file OPC_IceHook.h.

Matrix3x3& IceMaths::Matrix3x3::Rot ( float  angle,
const Point axis 
)

Make a rotation matrix about an arbitrary axis.

void IceMaths::Matrix3x3::RotX ( float  angle)

Set a rotation matrix around the X axis. 1 0 0 RX = 0 cx sx 0 -sx cx

void IceMaths::Matrix3x3::RotY ( float  angle)

Set a rotation matrix around the Y axis. cy 0 -sy RY = 0 1 0 sy 0 cy

void IceMaths::Matrix3x3::RotYX ( float  y,
float  x 
)

cy sx.sy -sy.cx RY.RX 0 cx sx sy -sx.cy cx.cy

void IceMaths::Matrix3x3::RotZ ( float  angle)

Set a rotation matrix around the Z axis. cz sz 0 RZ = -sz cz 0 0 0 1

Scales from a Point. Each row is multiplied by a component.

Definition at line 53 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::Scale ( float  sx,
float  sy,
float  sz 
) [inline]

Scales from floats. Each row is multiplied by a value.

Definition at line 61 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::Set ( float  m00,
float  m01,
float  m02,
float  m10,
float  m11,
float  m12,
float  m20,
float  m21,
float  m22 
) [inline]

Assign values.

Definition at line 39 of file OPC_IceHook.h.

Sets a column.

Definition at line 83 of file OPC_IceHook.h.

Sets a row.

Definition at line 79 of file OPC_IceHook.h.

Sets the scale from a Point. The point is put on the diagonal.

Definition at line 47 of file OPC_IceHook.h.

inline_ void IceMaths::Matrix3x3::SetScale ( float  sx,
float  sy,
float  sz 
) [inline]

Sets the scale from floats. Values are put on the diagonal.

Definition at line 50 of file OPC_IceHook.h.

Makes a skew-symmetric matrix (a.k.a. Star(*) Matrix) [ 0.0 -a.z a.y ] [ a.z 0.0 -a.x ] [ -a.y a.x 0.0 ] This is also called a "cross matrix" since for any vectors A and B, A^B = Skew(A) * B = - B * Skew(A);

Definition at line 128 of file OPC_IceHook.h.

Sub another matrix.

Definition at line 168 of file OPC_IceHook.h.

Definition at line 212 of file OPC_IceHook.h.

inline_ float IceMaths::Matrix3x3::Trace ( ) const [inline]

Computes the trace. The trace is the sum of the 3 diagonal components.

Definition at line 86 of file OPC_IceHook.h.

Transpose the matrix.

Definition at line 288 of file OPC_IceHook.h.

this = Transpose(a)

Definition at line 296 of file OPC_IceHook.h.

Clears the matrix.

Definition at line 88 of file OPC_IceHook.h.


Friends And Related Function Documentation

inline_ friend Matrix3x3 operator* ( float  s,
const Matrix3x3 mat 
) [friend]

Operator for Matrix3x3 Mul = float * Matrix3x3;.

Definition at line 396 of file OPC_IceHook.h.

inline_ friend Matrix3x3 operator/ ( float  s,
const Matrix3x3 mat 
) [friend]

Operator for Matrix3x3 Div = float / Matrix3x3;.

Definition at line 415 of file OPC_IceHook.h.


Member Data Documentation

Definition at line 493 of file OPC_IceHook.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:22