Fovia's .NET Client/Server API
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
com.fovia.hdrcsrv.MATRIX44D Class Reference

Public Member Functions

void assign (double m11, double m21, double m31, double m41, double m12, double m22, double m32, double m42, double m13, double m23, double m33, double m43, double m14, double m24, double m34, double m44)
 
void assignT (double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44)
 
double getM11 ()
 
double getM12 ()
 
double getM13 ()
 
double getM14 ()
 
double getM21 ()
 
double getM22 ()
 
double getM23 ()
 
double getM24 ()
 
double getM31 ()
 
double getM32 ()
 
double getM33 ()
 
double getM34 ()
 
double getM41 ()
 
double getM42 ()
 
double getM43 ()
 
double getM44 ()
 
VECTOR3D getOffsetVector ()
 
MATRIX44D getTranspose ()
 
VECTOR3D getXVector ()
 
VECTOR3D getYVector ()
 
VECTOR3D getZVector ()
 
 MATRIX44D ()
 
 MATRIX44D (MATRIX44D copy)
 
 MATRIX44D (VECTOR3D vecX, VECTOR3D vecY, VECTOR3D vecZ, VECTOR3D vecLoc)
 
 MATRIX44D (double m11, double m21, double m31, double m41, double m12, double m22, double m32, double m42, double m13, double m23, double m33, double m43, double m14, double m24, double m34, double m44)
 
 MATRIX44D (double m11, double m12, double m13, double m14, double m21, double m22, double m23, double m24, double m31, double m32, double m33, double m34, double m41, double m42, double m43, double m44, boolean bTransposed)
 
MATRIX44D mul (MATRIX44D B)
 
VECTOR3D mul (VECTOR3D V)
 
void read (hdrcSerializer ser) throws IOException
 
void setIdentity ()
 
void setM11 (double m11)
 
void setM12 (double m12)
 
void setM13 (double m13)
 
void setM14 (double m14)
 
void setM21 (double m21)
 
void setM22 (double m22)
 
void setM23 (double m23)
 
void setM24 (double m24)
 
void setM31 (double m31)
 
void setM32 (double m32)
 
void setM33 (double m33)
 
void setM34 (double m34)
 
void setM41 (double m41)
 
void setM42 (double m42)
 
void setM43 (double m43)
 
void setM44 (double m44)
 
void setOffsetVector (VECTOR3D v)
 
void setOffsetVector (double x, double y, double z)
 
void setXVector (VECTOR3D v)
 
void setXVector (double x, double y, double z)
 
void setYVector (VECTOR3D v)
 
void setYVector (double x, double y, double z)
 
void setZVector (VECTOR3D v)
 
void setZVector (double x, double y, double z)
 
QUATD toQuat ()
 
String toString ()
 
void write (hdrcSerializer ser) throws IOException
 

Static Public Member Functions

static MATRIX44D createRotateMatrix (double amt, double x, double y, double z)
 
static MATRIX44D createRotateXMatrix (double amt)
 
static MATRIX44D createRotateYMatrix (double amt)
 
static MATRIX44D createRotateZMatrix (double amt)
 
static MATRIX44D createScaleMatrix (double sx, double sy, double sz)
 
static MATRIX44D createTranslateMatrix (double tx, double ty, double tz)
 

Public Attributes

double m11
 
double m12
 
double m13
 
double m14
 
double m21
 
double m22
 
double m23
 
double m24
 
double m31
 
double m32
 
double m33
 
double m34
 
double m41
 
double m42
 
double m43
 
double m44
 

Detailed Description

A double precision 4x4 matrix. See RENDER_PARAMS::Transform for the most common usage of this type.

$ \left| \begin{array}{cccc} m11 & m12 & m13 & m14 \\ m21 & m22 & m23 & m24 \\ m31 & m32 & m33 & m34 \\ m41 & m42 & m43 & m44 \\ \end{array} \right| $

Constructor & Destructor Documentation

com.fovia.hdrcsrv.MATRIX44D.MATRIX44D ( )
com.fovia.hdrcsrv.MATRIX44D.MATRIX44D ( MATRIX44D  copy)

Constructs a new matrix and copies the member fields from copy into this objects member fields.

Parameters
copyThe matrix from which to copy the member fields.
com.fovia.hdrcsrv.MATRIX44D.MATRIX44D ( VECTOR3D  vecX,
VECTOR3D  vecY,
VECTOR3D  vecZ,
VECTOR3D  vecLoc 
)

Constructs a new matrix by populating the member fields with the corresponding orientation and offset vectors. See RENDER_PARAMS::Transform for a description of how these vectors are inserted into the matrix.

Parameters
vecXThe X orientation vector.
vecYThe Y orientation vector.
vecZThe Z orientation vector.
vecLocThe offset vector.
com.fovia.hdrcsrv.MATRIX44D.MATRIX44D ( double  m11,
double  m21,
double  m31,
double  m41,
double  m12,
double  m22,
double  m32,
double  m42,
double  m13,
double  m23,
double  m33,
double  m43,
double  m14,
double  m24,
double  m34,
double  m44 
)

Constructs a new matrix by populating the member fields with the corresponding input parameter.

References com.fovia.hdrcsrv.MATRIX44D.assign().

com.fovia.hdrcsrv.MATRIX44D.MATRIX44D ( double  m11,
double  m12,
double  m13,
double  m14,
double  m21,
double  m22,
double  m23,
double  m24,
double  m31,
double  m32,
double  m33,
double  m34,
double  m41,
double  m42,
double  m43,
double  m44,
boolean  bTransposed 
)

This is identical to the other constructor that accepts 16 doubles except that the parameter order is transposed for easy entry of matrices that are entered row-major. The bTransposed parameter is ignored. It is only there to differentiate the overloads.

References com.fovia.hdrcsrv.MATRIX44D.assign().

Member Function Documentation

void com.fovia.hdrcsrv.MATRIX44D.assign ( double  m11,
double  m21,
double  m31,
double  m41,
double  m12,
double  m22,
double  m32,
double  m42,
double  m13,
double  m23,
double  m33,
double  m43,
double  m14,
double  m24,
double  m34,
double  m44 
)

Assigns the values in the parameters to the member fields of this matrix.

Referenced by com.fovia.hdrcsrv.MATRIX44D.MATRIX44D(), and com.fovia.hdrcsrv.MATRIX44D.setIdentity().

void com.fovia.hdrcsrv.MATRIX44D.assignT ( double  m11,
double  m12,
double  m13,
double  m14,
double  m21,
double  m22,
double  m23,
double  m24,
double  m31,
double  m32,
double  m33,
double  m34,
double  m41,
double  m42,
double  m43,
double  m44 
)

Similar to the transposed constructor, this assigns the parameters into the corresponding member fields, but does so with a row-major parameter order.

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createRotateMatrix ( double  amt,
double  x,
double  y,
double  z 
)
static

Returns a new matrix that represents a rotation along the arbitrary axis specified by the x, y and z parameters. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
xThe x component of the axis of rotation.
yThe y component of the axis of rotation.
zThe z component of the axis of rotation.
amtThe amount to rotate in radians.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createRotateXMatrix ( double  amt)
static

Returns a new matrix that represents a rotation along the X axis as specified in amt. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
amtThe amount to rotate in radians.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createRotateYMatrix ( double  amt)
static

Returns a new matrix that represents a rotation along the Y axis as specified in amt. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
amtThe amount to rotate in radians.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createRotateZMatrix ( double  amt)
static

Returns a new matrix that represents a rotation along the Z axis as specified in amt. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
amtThe amount to rotate in radians.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createScaleMatrix ( double  sx,
double  sy,
double  sz 
)
static

Returns a new matrix that represents a scaling along the X, Y and Z axes as specified in sx, sy and sz respectively. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
sxThe scaling in the X direction.
syThe scaling in the Y direction.
szThe scaling in the Z direction.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

static MATRIX44D com.fovia.hdrcsrv.MATRIX44D.createTranslateMatrix ( double  tx,
double  ty,
double  tz 
)
static

Returns a new matrix that represents a translation along the X, Y and Z axes as specified in tx, ty and tz respectively. Multiplying a vector by this homogeneous matrix (see MATRIX44D::mul(VECTOR3D) ) will apply this transformation to the vector. Multiplying this matrix by another matrix (see MATRIX44D::mul(MATRIX44D) ) will concatenate them into a single matrix representing both transformations applied in the order in which they were multiplied. This can be very useful because it can save a large amount of computational time.

Parameters
txThe translation in the X direction.
tyThe translation in the Y direction.
tzThe translation in the Z direction.
Returns
The new matrix that represents the transformation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

VECTOR3D com.fovia.hdrcsrv.MATRIX44D.getOffsetVector ( )

Returns a VECTOR3D that represents the offset vector from this transform matrix. See RENDER_PARAMS::Transform for details on the vectors contained in a transform matrix.

Returns
The offset vector contained in this matrix.

Referenced by com.fovia.hdrc.utils.interpolation.hdrcInterpolation.interpolate().

MATRIX44D com.fovia.hdrcsrv.MATRIX44D.getTranspose ( )

Returns the transpose of this matrix. In other words, for every member mXY, that member will be inserted into the new matrix as the member mYX.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

VECTOR3D com.fovia.hdrcsrv.MATRIX44D.getXVector ( )

Returns a VECTOR3D that represents the X orientation vector from this transform matrix. See RENDER_PARAMS::Transform for details on the vectors contained in a transform matrix.

Returns
The X vector contained in this matrix.
VECTOR3D com.fovia.hdrcsrv.MATRIX44D.getYVector ( )

Returns a VECTOR3D that represents the Y orientation vector from this transform matrix. See RENDER_PARAMS::Transform for details on the vectors contained in a transform matrix.

Returns
The Y vector contained in this matrix.
VECTOR3D com.fovia.hdrcsrv.MATRIX44D.getZVector ( )

Returns a VECTOR3D that represents the Z orientation vector from this transform matrix. See RENDER_PARAMS::Transform for details on the vectors contained in a transform matrix.

Returns
The Z vector contained in this matrix.
MATRIX44D com.fovia.hdrcsrv.MATRIX44D.mul ( MATRIX44D  B)

Returns the result of multiplying this matrix by the matrix contained in B. Note that this is an $O(N^3)$ and should be optimized or paralleled if it is intended to be used on a huge number of matrices.

Parameters
BThe right hand side of the matrix multiply operation.
Returns
The result of the matrix multiply operation.

References com.fovia.hdrcsrv.MATRIX44D.MATRIX44D().

VECTOR3D com.fovia.hdrcsrv.MATRIX44D.mul ( VECTOR3D  V)

Multiplies the vector V by this matrix in the homogeneous vector space. Specifically, V is expanded to (x,y,z,1), multiplied by this matrix, then x,y and z are divided by the 4th member of the intermediate 4D vector. The resulting x,y,z values are returned in a 3D vector.

Parameters
VThe vector to multiply through this matrix.
Returns
The result of the multiply operation.
void com.fovia.hdrcsrv.MATRIX44D.setIdentity ( )

Mutable member function that assigns the identity matrix to this object.

References com.fovia.hdrcsrv.MATRIX44D.assign().

void com.fovia.hdrcsrv.MATRIX44D.setOffsetVector ( VECTOR3D  v)

Sets the members fields corresponding to the offset vector in this matrix to the values contained in v.

Parameters
vThe new offset vector.
void com.fovia.hdrcsrv.MATRIX44D.setOffsetVector ( double  x,
double  y,
double  z 
)

Sets the members fields corresponding to the offset vector in this matrix to the values of this function's parameters.

Parameters
xThe x value of the new offset vector.
yThe y value of the new offset vector.
zThe z value of the new offset vector.
void com.fovia.hdrcsrv.MATRIX44D.setXVector ( VECTOR3D  v)

Sets the members fields corresponding to the X orientation vector in this matrix to the values contained in v.

Parameters
vThe new X orientation vector.
void com.fovia.hdrcsrv.MATRIX44D.setXVector ( double  x,
double  y,
double  z 
)

Sets the members fields corresponding to the X orientation vector in this matrix to the values of this function's parameters.

Parameters
xThe x value of the new X orientation vector.
yThe y value of the new X orientation vector.
zThe z value of the new X orientation vector.
void com.fovia.hdrcsrv.MATRIX44D.setYVector ( VECTOR3D  v)

Sets the members fields corresponding to the Y orientation vector in this matrix to the values contained in v.

Parameters
vThe new Y orientation vector.
void com.fovia.hdrcsrv.MATRIX44D.setYVector ( double  x,
double  y,
double  z 
)

Sets the members fields corresponding to the Y orientation vector in this matrix to the values of this function's parameters.

Parameters
xThe x value of the new Y orientation vector.
yThe y value of the new Y orientation vector.
zThe z value of the new Y orientation vector.
void com.fovia.hdrcsrv.MATRIX44D.setZVector ( VECTOR3D  v)

Sets the members fields corresponding to the Z orientation vector in this matrix to the values contained in v.

Parameters
vThe new Z orientation vector.
void com.fovia.hdrcsrv.MATRIX44D.setZVector ( double  x,
double  y,
double  z 
)

Sets the members fields corresponding to the Z orientation vector in this matrix to the values of this function's parameters.

Parameters
xThe x value of the new Z orientation vector.
yThe y value of the new Z orientation vector.
zThe z value of the new Z orientation vector.
String com.fovia.hdrcsrv.MATRIX44D.toString ( )

Returns a string describing the values contained in this object.

Returns
The string describing this object.