VR-Link JAVA API Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
List of all members | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes
com.mak.vrlj.math.Matrix3d Class Reference

A 3x3 matrix. More...

+ Inheritance diagram for com.mak.vrlj.math.Matrix3d:
+ Collaboration diagram for com.mak.vrlj.math.Matrix3d:

Public Member Functions

 Matrix3d ()
 No-arg constructor. More...
 
 Matrix3d (ConstMatrix3d original)
 Copy constructor. More...
 
 Matrix3d (double r1c1, double r1c2, double r1c3, double r2c1, double r2c2, double r2c3, double r3c1, double r3c2, double r3c3)
 Construct a matrix from primitive elements. More...
 
void assignFrom (ConstMatrix3d other)
 Assign element values for this matrix from another. More...
 
boolean equals (Object obj)
 
double get (int r, int c)
 Get the value of a matrix element by row and column. More...
 
ConstTaitBryan getBodyToRef_to_Euler ()
 Get this rotation matrix as a TaitBryan. More...
 
Vector3d getColumn (int column)
 Get a column of this matrix as a vector. More...
 
Vector3d getColumn1 ()
 Get a column of this matrix as a vector. More...
 
Vector3d getColumn2 ()
 Get a column of this matrix as a vector. More...
 
Vector3d getColumn3 ()
 Get a column of this matrix as a vector. More...
 
double getDeterminant ()
 Gets the determinant of this matrix. More...
 
Vector3d getDiagonal ()
 Gets the diagonal elements of this matrix. More...
 
ConstMatrix3d getInverse ()
 Gets the inverse of this matrix. More...
 
double getR1C1 ()
 Get a single, specific matrix element. More...
 
double getR1C2 ()
 Get a single, specific matrix element. More...
 
double getR1C3 ()
 Get a single, specific matrix element. More...
 
double getR2C1 ()
 Get a single, specific matrix element. More...
 
double getR2C2 ()
 Get a single, specific matrix element. More...
 
double getR2C3 ()
 Get a single, specific matrix element. More...
 
double getR3C1 ()
 Get a single, specific matrix element. More...
 
double getR3C2 ()
 Get a single, specific matrix element. More...
 
double getR3C3 ()
 Get a single, specific matrix element. More...
 
Vector3d getRow (int row)
 Get a row of this matrix as a Vector3d. More...
 
Vector3d getRow1 ()
 Gets row 1 of this matrix. More...
 
Vector3d getRow2 ()
 Gets row 2 of this matrix. More...
 
Vector3d getRow3 ()
 Gets row 3 of this matrix. More...
 
double getTrace ()
 Return the trace of this matrix. More...
 
int hashCode ()
 
void multiply (ConstMatrix3d left, ConstMatrix3d right)
 Multiple two matricies and store the result in this matrix. More...
 
void multiply (double scalar)
 Multiply this matrix by a scalar. More...
 
void normalize ()
 Normalize this matrix by dividing all elements by the determinant of this matrix. More...
 
void postMultiplyByVector (ConstVector3d vec, Vector3d result)
 Postmultiply this matrix by a vector, and store the result. More...
 
void postMultiplyByVector (ConstVector3f vec, Vector3f result)
 Postmultiply this matrix by a vector, and store the result. More...
 
void set (int row, int column, double value)
 Set a matrix element by its row and column numbers. More...
 
void setR1C1 (double r1c1)
 Sets the row 1, column 1 element. More...
 
void setR1C2 (double r1c2)
 Sets the row 1, column 2 element. More...
 
void setR1C3 (double r1c3)
 Sets the row 1, column 3 element. More...
 
void setR2C1 (double r2c1)
 Sets the row 2, column 1 element. More...
 
void setR2C2 (double r2c2)
 Sets the row 2, column 2 element. More...
 
void setR2C3 (double r2c3)
 Sets the row 2, column 3 element. More...
 
void setR3C1 (double r3c1)
 Sets the row 3, column 1 element. More...
 
void setR3C2 (double r3c2)
 Sets the row 3, column 2 element. More...
 
void setR3C3 (double r3c3)
 Sets the row 3, column 3 element. More...
 
String toString ()
 
void transpose ()
 Convert this matrix to its transpose. More...
 

Static Public Attributes

static final ConstMatrix3d zero = new Matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0)
 Matrix with all zeroes. More...
 
static final ConstMatrix3d identity = new Matrix3d(1, 0, 0, 0, 1, 0, 0, 0, 1)
 Identity matrix with all zeroes except ones on its diagonal. More...
 

Private Attributes

double R1C1
 
double R1C2
 
double R1C3
 
double R2C1
 
double R2C2
 
double R2C3
 
double R3C1
 
double R3C2
 
double R3C3
 

Static Private Attributes

static final double REAL_BIG = 1e6
 

Detailed Description

A 3x3 matrix.

Constructor & Destructor Documentation

com.mak.vrlj.math.Matrix3d.Matrix3d ( )
inline
com.mak.vrlj.math.Matrix3d.Matrix3d ( ConstMatrix3d  original)
inline

Copy constructor.

Parameters
originalsource for copy.

References com.mak.vrlj.math.Matrix3d.assignFrom().

com.mak.vrlj.math.Matrix3d.Matrix3d ( double  r1c1,
double  r1c2,
double  r1c3,
double  r2c1,
double  r2c2,
double  r2c3,
double  r3c1,
double  r3c2,
double  r3c3 
)
inline

Construct a matrix from primitive elements.

Parameters
r1c1row 1, column 1 element.
r1c2row 1, column 2 element.
r1c3row 1, column 3 element.
r2c1row 2, column 1 element.
r2c2row 2, column 2 element.
r2c3row 2, column 3 element.
r3c1row 3, column 1 element.
r3c2row 3, column 2 element.
r3c3row 3, column 3 element.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R1C2, com.mak.vrlj.math.Matrix3d.R1C3, com.mak.vrlj.math.Matrix3d.R2C1, com.mak.vrlj.math.Matrix3d.R2C2, com.mak.vrlj.math.Matrix3d.R2C3, com.mak.vrlj.math.Matrix3d.R3C1, com.mak.vrlj.math.Matrix3d.R3C2, and com.mak.vrlj.math.Matrix3d.R3C3.

Member Function Documentation

void com.mak.vrlj.math.Matrix3d.assignFrom ( ConstMatrix3d  other)
inline
boolean com.mak.vrlj.math.Matrix3d.equals ( Object  obj)
inline
double com.mak.vrlj.math.Matrix3d.get ( int  row,
int  column 
)
inlinevirtual
ConstTaitBryan com.mak.vrlj.math.Matrix3d.getBodyToRef_to_Euler ( )
inlinevirtual
Vector3d com.mak.vrlj.math.Matrix3d.getColumn ( int  column)
inlinevirtual

Get a column of this matrix as a vector.

Parameters
columncolumn number.
Returns
column as a Vector3d

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.getColumn1(), com.mak.vrlj.math.Matrix3d.getColumn2(), and com.mak.vrlj.math.Matrix3d.getColumn3().

Vector3d com.mak.vrlj.math.Matrix3d.getColumn1 ( )
inlinevirtual

Get a column of this matrix as a vector.

Returns
column 1

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R2C1, and com.mak.vrlj.math.Matrix3d.R3C1.

Referenced by com.mak.vrlj.math.Matrix3d.getColumn().

Vector3d com.mak.vrlj.math.Matrix3d.getColumn2 ( )
inlinevirtual

Get a column of this matrix as a vector.

Returns
column 2

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C2, com.mak.vrlj.math.Matrix3d.R2C2, and com.mak.vrlj.math.Matrix3d.R3C2.

Referenced by com.mak.vrlj.math.Matrix3d.getColumn().

Vector3d com.mak.vrlj.math.Matrix3d.getColumn3 ( )
inlinevirtual

Get a column of this matrix as a vector.

Returns
column 3

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C3, com.mak.vrlj.math.Matrix3d.R2C3, and com.mak.vrlj.math.Matrix3d.R3C3.

Referenced by com.mak.vrlj.math.Matrix3d.getColumn().

double com.mak.vrlj.math.Matrix3d.getDeterminant ( )
inlinevirtual
Vector3d com.mak.vrlj.math.Matrix3d.getDiagonal ( )
inlinevirtual

Gets the diagonal elements of this matrix.

Returns
the diagonal elements of this matrix as a Vector3d.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R2C2, and com.mak.vrlj.math.Matrix3d.R3C3.

ConstMatrix3d com.mak.vrlj.math.Matrix3d.getInverse ( )
inlinevirtual

Gets the inverse of this matrix.

Returns
the inverse of this matrix.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.get(), and com.mak.vrlj.math.Matrix3d.Matrix3d().

double com.mak.vrlj.math.Matrix3d.getR1C1 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R1C1.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C1.

double com.mak.vrlj.math.Matrix3d.getR1C2 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R1C2.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C2.

double com.mak.vrlj.math.Matrix3d.getR1C3 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R1C3.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C3.

double com.mak.vrlj.math.Matrix3d.getR2C1 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R2C1.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R2C1.

double com.mak.vrlj.math.Matrix3d.getR2C2 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R2C2.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R2C2.

double com.mak.vrlj.math.Matrix3d.getR2C3 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R2C3.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R2C3.

double com.mak.vrlj.math.Matrix3d.getR3C1 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R3C1.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R3C1.

double com.mak.vrlj.math.Matrix3d.getR3C2 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R3C2.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R3C2.

double com.mak.vrlj.math.Matrix3d.getR3C3 ( )
inlinevirtual

Get a single, specific matrix element.

Returns
the value of element R3C3.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R3C3.

Vector3d com.mak.vrlj.math.Matrix3d.getRow ( int  row)
inlinevirtual

Get a row of this matrix as a Vector3d.

Parameters
rowrow number.
Returns
row of this matrix as a Vector3d.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.getRow1(), com.mak.vrlj.math.Matrix3d.getRow2(), and com.mak.vrlj.math.Matrix3d.getRow3().

Vector3d com.mak.vrlj.math.Matrix3d.getRow1 ( )
inlinevirtual

Gets row 1 of this matrix.

Returns
row 1 of this matrix as a Vector3d.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R1C2, and com.mak.vrlj.math.Matrix3d.R1C3.

Referenced by com.mak.vrlj.math.Matrix3d.getRow().

Vector3d com.mak.vrlj.math.Matrix3d.getRow2 ( )
inlinevirtual

Gets row 2 of this matrix.

Returns
row 2 of this matrix as a Vector3d.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R2C1, com.mak.vrlj.math.Matrix3d.R2C2, and com.mak.vrlj.math.Matrix3d.R2C3.

Referenced by com.mak.vrlj.math.Matrix3d.getRow().

Vector3d com.mak.vrlj.math.Matrix3d.getRow3 ( )
inlinevirtual

Gets row 3 of this matrix.

Returns
row 3 of this matrix as a Vector3d.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R3C1, com.mak.vrlj.math.Matrix3d.R3C2, and com.mak.vrlj.math.Matrix3d.R3C3.

Referenced by com.mak.vrlj.math.Matrix3d.getRow().

double com.mak.vrlj.math.Matrix3d.getTrace ( )
inlinevirtual

Return the trace of this matrix.

Returns
the sum of the diagonal elements.

Implements com.mak.vrlj.math.ConstMatrix3d.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R2C2, and com.mak.vrlj.math.Matrix3d.R3C3.

int com.mak.vrlj.math.Matrix3d.hashCode ( )
inline
void com.mak.vrlj.math.Matrix3d.multiply ( ConstMatrix3d  left,
ConstMatrix3d  right 
)
inline
void com.mak.vrlj.math.Matrix3d.multiply ( double  scalar)
inline
void com.mak.vrlj.math.Matrix3d.normalize ( )
inline
void com.mak.vrlj.math.Matrix3d.postMultiplyByVector ( ConstVector3d  vec,
Vector3d  result 
)
inlinevirtual
void com.mak.vrlj.math.Matrix3d.postMultiplyByVector ( ConstVector3f  vec,
Vector3f  result 
)
inlinevirtual
void com.mak.vrlj.math.Matrix3d.set ( int  row,
int  column,
double  value 
)
inline

Set a matrix element by its row and column numbers.

Parameters
rowthe row of the element.
columnthe column of the element.
valuethe new value to store in the element.

References com.mak.vrlj.math.Matrix3d.R1C1, com.mak.vrlj.math.Matrix3d.R1C2, com.mak.vrlj.math.Matrix3d.R1C3, com.mak.vrlj.math.Matrix3d.R2C1, com.mak.vrlj.math.Matrix3d.R2C2, com.mak.vrlj.math.Matrix3d.R2C3, com.mak.vrlj.math.Matrix3d.R3C1, com.mak.vrlj.math.Matrix3d.R3C2, and com.mak.vrlj.math.Matrix3d.R3C3.

void com.mak.vrlj.math.Matrix3d.setR1C1 ( double  r1c1)
inline

Sets the row 1, column 1 element.

Parameters
r1c1new element value.

References com.mak.vrlj.math.Matrix3d.R1C1.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR1C2 ( double  r1c2)
inline

Sets the row 1, column 2 element.

Parameters
r1c2new element value.

References com.mak.vrlj.math.Matrix3d.R1C2.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR1C3 ( double  r1c3)
inline

Sets the row 1, column 3 element.

Parameters
r1c3new element value.

References com.mak.vrlj.math.Matrix3d.R1C3.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR2C1 ( double  r2c1)
inline

Sets the row 2, column 1 element.

Parameters
r2c1new element value.

References com.mak.vrlj.math.Matrix3d.R2C1.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR2C2 ( double  r2c2)
inline

Sets the row 2, column 2 element.

Parameters
r2c2new element value.

References com.mak.vrlj.math.Matrix3d.R2C2.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR2C3 ( double  r2c3)
inline

Sets the row 2, column 3 element.

Parameters
r2c3new element value.

References com.mak.vrlj.math.Matrix3d.R2C3.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR3C1 ( double  r3c1)
inline

Sets the row 3, column 1 element.

Parameters
r3c1new element value.

References com.mak.vrlj.math.Matrix3d.R3C1.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR3C2 ( double  r3c2)
inline

Sets the row 3, column 2 element.

Parameters
r3c2new element value.

References com.mak.vrlj.math.Matrix3d.R3C2.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

void com.mak.vrlj.math.Matrix3d.setR3C3 ( double  r3c3)
inline

Sets the row 3, column 3 element.

Parameters
r3c3new element value.

References com.mak.vrlj.math.Matrix3d.R3C3.

Referenced by com.mak.vrlj.math.Matrix3d.assignFrom(), com.mak.vrlj.math.Matrix3d.multiply(), and com.mak.vrlj.math.Matrix3d.transpose().

String com.mak.vrlj.math.Matrix3d.toString ( )
inline
void com.mak.vrlj.math.Matrix3d.transpose ( )
inline

Member Data Documentation

final ConstMatrix3d com.mak.vrlj.math.Matrix3d.identity = new Matrix3d(1, 0, 0, 0, 1, 0, 0, 0, 1)
static

Identity matrix with all zeroes except ones on its diagonal.

Referenced by com.mak.vrlj.math.TaitBryan.eulerToEuler(), and com.mak.vrlj.coord.Smoother.rotMatrixFromRotRatesAndTime().

double com.mak.vrlj.math.Matrix3d.R1C1
private
double com.mak.vrlj.math.Matrix3d.R1C2
private
double com.mak.vrlj.math.Matrix3d.R1C3
private
double com.mak.vrlj.math.Matrix3d.R2C1
private
double com.mak.vrlj.math.Matrix3d.R2C2
private
double com.mak.vrlj.math.Matrix3d.R2C3
private
double com.mak.vrlj.math.Matrix3d.R3C1
private
double com.mak.vrlj.math.Matrix3d.R3C2
private
double com.mak.vrlj.math.Matrix3d.R3C3
private
final double com.mak.vrlj.math.Matrix3d.REAL_BIG = 1e6
staticprivate
final ConstMatrix3d com.mak.vrlj.math.Matrix3d.zero = new Matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0)
static

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

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)