ScriptModule
Public Slots | Public Member Functions | Properties | List of all members
Matrix4x4 Class Reference

The Matrix4x4 class defines a four by four matrix container. Matrix4x4 objects can be instantiated in the scripting environment. More...

#include <MathInterface.h>

Inheritance diagram for Matrix4x4:
Inheritance graph
[legend]
Collaboration diagram for Matrix4x4:
Collaboration graph
[legend]

Public Slots

double value (int row, int column) const
 Retrieve single value from Matrix4x4. More...
 
Vector3d axis (int idx)
 Retrieve reference to single value from Matrix4x4. More...
 
Point3d origin ()
 Retrieve Matrix4x4 origin. More...
 
bool isEmpty () const
 Test if Matrix4x4 is empty. More...
 
Matrix4x4clear ()
 Clear current Matrix4x4. More...
 
Matrix4x4normalize ()
 Normalize current Matrix4x4. More...
 
Matrix4x4multiplyEq (const Matrix4x4 m2)
 Multiply current Matrix4x4 with specified Matrix4x4. More...
 
QObject multiply (const Matrix4x4 m2)
 Multiply current Matrix4x4 with specified Matrix4x4. More...
 
Point3d multiply (const Point3d p)
 Multiply specified Point3d with current Matrix4x4. More...
 
QObject multiply (const Vector3d v)
 Multiply specified Vector3d with current Matrix4x4. More...
 
Matrix4x4translate (const Vector3d v)
 Translate current Matrix4x4 with specified Vector3d. More...
 
Matrix4x4translate (double dx, double dy, double dz=0.0)
 Translate current Matrix4x4. More...
 
Matrix4x4scale (double sx, double sy, double sz=1.0)
 Scale current Matrix4x4. More...
 
Matrix4x4rotatePlane (const Vector3d v, const Point3d p)
 Rotate current Matrix4x4. More...
 
Matrix4x4rotateRadians (double rad, Vector3d v)
 Rotate current Matrix4x4. More...
 
Matrix4x4rotateDegrees (double deg, Vector3d v)
 Rotate current Matrix4x4. More...
 
Matrix4x4skew (double sk)
 Shear current Matrix4x4. More...
 
Matrix4x4orthogonalProject (double left, double right, double bottom, double top, double zNear, double zFar)
 Calculate an orthogonal projection Matrix4x4. More...
 
Matrix4x4perspectiveProject (double left, double right, double bottom, double top, double zNear, double zFar)
 Calculate a perspective projection Matrix4x4. More...
 
Matrix4x4perspectiveProject (double fovy, double ratio, double zNear, double zFar)
 Calculate a perspective projection Matrix4x4. More...
 
Matrix4x4inverse ()
 Invert current Matrix4x4. More...
 
Matrix4x4 getInverse ()
 Invert current Matrix4x4. More...
 
Matrix4x4transpose ()
 Transpose current Matrix4x4. More...
 
Matrix4x4 getTranspose ()
 Transpose current Matrix4x4. More...
 
Point3d extractPosition (const Point3d *pivot=NULL, bool force3d=false)
 Extract position from matrix. More...
 
Point3d extractScale (const Point3d *pivot=NULL, bool force3d=false)
 Extract scale from matrix. More...
 
Point3d extractRotation (const Point3d *pivot=NULL, bool force3d=false)
 Extract rotation from matrix. More...
 
double extractSkew (const Point3d *pivot=NULL)
 Extract skew from matrix. More...
 
void print (String label) const
 

Public Member Functions

 Matrix4x4 ()
 Create a new empty Matrix4x4. More...
 

Properties

double m00
 1st row and 1st column value More...
 
double m01
 1st row and 2nd column value More...
 
double m02
 1st row and 3rd column value More...
 
double m03
 1st row and 4th column value More...
 
double m10
 2nd row and 1st column value More...
 
double m11
 2nd row and 2nd column value More...
 
double m12
 2nd row and 3rd column value More...
 
double m13
 2nd row and 4th column value More...
 
double m20
 3rd row and 1st column value More...
 
double m21
 3rd row and 2nd column value More...
 
double m22
 3rd row and 3rd column value More...
 
double m23
 3rd row and 4th column value More...
 
double m30
 4th row and 1st column value More...
 
double m31
 4th row and 2nd column value More...
 
double m32
 4th row and 3rd column value More...
 
double m33
 4th row and 4th column value More...
 

Detailed Description

The Matrix4x4 class defines a four by four matrix container. Matrix4x4 objects can be instantiated in the scripting environment.

You can use it in both Script Editor and scriptModule.

m = new Matrix4x4(); // create empty matrix
raxis = new Vector3d( 0,0,1 ); // create new axis Vector3d
m.rotateDegrees( 90, raxis ); // rotate matrix 90 degrees on z axis
m.scale( 2.0, 1.0, 2.0 ); // scale matrix non-uniformly

Constructor & Destructor Documentation

Matrix4x4::Matrix4x4 ( )

Create a new empty Matrix4x4.

Member Function Documentation

Vector3d Matrix4x4::axis ( int  idx)
slot

Retrieve reference to single value from Matrix4x4.

Parameters
rowRow value
columnColumn value
Returns
single Matrix4x4 valueRetrieve axis from Matrix4x4.
Parameters
idxAxis index
Returns
Vector3d axis
Matrix4x4& Matrix4x4::clear ( )
slot

Clear current Matrix4x4.

Returns
Matrix4x4 reference
Point3d Matrix4x4::extractPosition ( const Point3d pivot = NULL,
bool  force3d = false 
)
slot

Extract position from matrix.

Returns
Point3d that encapsulates the 3d position.
Point3d Matrix4x4::extractRotation ( const Point3d pivot = NULL,
bool  force3d = false 
)
slot

Extract rotation from matrix.

Returns
Point3d that encapsulates the 3d euler angle.
Point3d Matrix4x4::extractScale ( const Point3d pivot = NULL,
bool  force3d = false 
)
slot

Extract scale from matrix.

Returns
Point3d that encapsulates the 3d scale.
double Matrix4x4::extractSkew ( const Point3d pivot = NULL)
slot

Extract skew from matrix.

Returns
skew value.
Matrix4x4 Matrix4x4::getInverse ( )
slot

Invert current Matrix4x4.

Returns
new Matrix4x4
Matrix4x4 Matrix4x4::getTranspose ( )
slot

Transpose current Matrix4x4.

Returns
new Matrix4x4
Matrix4x4& Matrix4x4::inverse ( )
slot

Invert current Matrix4x4.

Returns
Matrix4x4 reference
bool Matrix4x4::isEmpty ( ) const
slot

Test if Matrix4x4 is empty.

Returns
Result of test
QObject Matrix4x4::multiply ( const Matrix4x4  m2)
slot

Multiply current Matrix4x4 with specified Matrix4x4.

Parameters
m2Second Matrix4x4
Returns
new Matrix4x4
Point3d Matrix4x4::multiply ( const Point3d  p)
slot

Multiply specified Point3d with current Matrix4x4.

Parameters
pPoint3d
Returns
new Point3d
QObject Matrix4x4::multiply ( const Vector3d  v)
slot

Multiply specified Vector3d with current Matrix4x4.

Parameters
vVector3d
Returns
new Vector3d
Matrix4x4& Matrix4x4::multiplyEq ( const Matrix4x4  m2)
slot

Multiply current Matrix4x4 with specified Matrix4x4.

Parameters
m2Second Matrix4x4
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::normalize ( )
slot

Normalize current Matrix4x4.

Returns
Matrix4x4 reference
Point3d Matrix4x4::origin ( )
slot

Retrieve Matrix4x4 origin.

Returns
Point3d origin
Matrix4x4& Matrix4x4::orthogonalProject ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
slot

Calculate an orthogonal projection Matrix4x4.

Parameters
leftLeft volume value
rightRight volume value
bottomBottom volume value
topTop volume value
zNearNear volume value
zFarFar volume value
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::perspectiveProject ( double  left,
double  right,
double  bottom,
double  top,
double  zNear,
double  zFar 
)
slot

Calculate a perspective projection Matrix4x4.

Parameters
leftLeft volume value
rightRight volume value
bottomBottom volume value
topTop volume value
zNearNear volume value
zFarFar volume value
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::perspectiveProject ( double  fovy,
double  ratio,
double  zNear,
double  zFar 
)
slot

Calculate a perspective projection Matrix4x4.

Parameters
fovyVertical field of view angle in radians
ratioScreen ratio
zNearNear clipping plane
zFarFar clipping plane
Returns
Matrix4x4 reference
void Matrix4x4::print ( String  label) const
slot
Matrix4x4& Matrix4x4::rotateDegrees ( double  deg,
Vector3d  v 
)
slot

Rotate current Matrix4x4.

Parameters
degAngle in degrees
vAxis of rotation
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::rotatePlane ( const Vector3d  v,
const Point3d  p 
)
slot

Rotate current Matrix4x4.

Parameters
vAxis of plane
pCenter of plane
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::rotateRadians ( double  rad,
Vector3d  v 
)
slot

Rotate current Matrix4x4.

Parameters
radAngle in radians
vAxis of rotation
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::scale ( double  sx,
double  sy,
double  sz = 1.0 
)
slot

Scale current Matrix4x4.

Parameters
sxScale value on x axis
syScale value on y axis
szScale value on z axis
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::skew ( double  sk)
slot

Shear current Matrix4x4.

Parameters
skShear value
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::translate ( const Vector3d  v)
slot

Translate current Matrix4x4 with specified Vector3d.

Parameters
vVector3d
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::translate ( double  dx,
double  dy,
double  dz = 0.0 
)
slot

Translate current Matrix4x4.

Parameters
dxTranslation distance on x axis
dyTranslation distance on y axis
dzTranslation distance on z axis
Returns
Matrix4x4 reference
Matrix4x4& Matrix4x4::transpose ( )
slot

Transpose current Matrix4x4.

Returns
Matrix4x4 reference
double Matrix4x4::value ( int  row,
int  column 
) const
slot

Retrieve single value from Matrix4x4.

Parameters
rowRow value
columnColumn value
Returns
single Matrix4x4 value

Property Documentation

double Matrix4x4::m00
readwriteprivate

1st row and 1st column value

double Matrix4x4::m01
readwriteprivate

1st row and 2nd column value

double Matrix4x4::m02
readwriteprivate

1st row and 3rd column value

double Matrix4x4::m03
readwriteprivate

1st row and 4th column value

double Matrix4x4::m10
readwriteprivate

2nd row and 1st column value

double Matrix4x4::m11
readwriteprivate

2nd row and 2nd column value

double Matrix4x4::m12
readwriteprivate

2nd row and 3rd column value

double Matrix4x4::m13
readwriteprivate

2nd row and 4th column value

double Matrix4x4::m20
readwriteprivate

3rd row and 1st column value

double Matrix4x4::m21
readwriteprivate

3rd row and 2nd column value

double Matrix4x4::m22
readwriteprivate

3rd row and 3rd column value

double Matrix4x4::m23
readwriteprivate

3rd row and 4th column value

double Matrix4x4::m30
readwriteprivate

4th row and 1st column value

double Matrix4x4::m31
readwriteprivate

4th row and 2nd column value

double Matrix4x4::m32
readwriteprivate

4th row and 3rd column value

double Matrix4x4::m33
readwriteprivate

4th row and 4th column value


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