Script
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 <math.h>

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

Public Slots

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

Public Member Functions

 Matrix4x4 ()
 Create a new empty Matrix4x4.
 

Properties

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

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 ( Point3d pivot = NULL)
slot

Extract position from matrix.

Returns
Point3d that encapsulates the 3d position.
Point3d Matrix4x4::extractRotation ( Point3d pivot = NULL)
slot

Extract rotation from matrix.

Returns
Point3d that encapsulates the 3d euler angle.
Point3d Matrix4x4::extractScale ( Point3d pivot = NULL)
slot

Extract scale from matrix.

Returns
Point3d that encapsulates the 3d scale.
double Matrix4x4::extractSkew ( 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 ( )
slot

Test if Matrix4x4 is empty.

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

Multiply current Matrix4x4 with specified Matrix4x4.

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

Multiply specified Point3d with current Matrix4x4.

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

Multiply specified Vector3d with current Matrix4x4.

Parameters
vVector3d
Returns
new Vector3d
Matrix4x4& Matrix4x4::multiplyEq ( 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)
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 ( Vector3d  v,
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 ( 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 
)
slot

Retrieve single value from Matrix4x4.

Parameters
rowRow value
columnColumn value
Returns
single Matrix4x4 value

Property Documentation

double Matrix4x4::m00
readwrite

1st row and 1st column value

double Matrix4x4::m01
readwrite

1st row and 2nd column value

double Matrix4x4::m02
readwrite

1st row and 3rd column value

double Matrix4x4::m03
readwrite

1st row and 4th column value

double Matrix4x4::m10
readwrite

2nd row and 1st column value

double Matrix4x4::m11
readwrite

2nd row and 2nd column value

double Matrix4x4::m12
readwrite

2nd row and 3rd column value

double Matrix4x4::m13
readwrite

2nd row and 4th column value

double Matrix4x4::m20
readwrite

3rd row and 1st column value

double Matrix4x4::m21
readwrite

3rd row and 2nd column value

double Matrix4x4::m22
readwrite

3rd row and 3rd column value

double Matrix4x4::m23
readwrite

3rd row and 4th column value

double Matrix4x4::m30
readwrite

4th row and 1st column value

double Matrix4x4::m31
readwrite

4th row and 2nd column value

double Matrix4x4::m32
readwrite

4th row and 3rd column value

double Matrix4x4::m33
readwrite

4th row and 4th column value


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