public class JLMatrixMaker
extends java.lang.Object
| Constructor and Description |
|---|
JLMatrixMaker() |
| Modifier and Type | Method and Description |
|---|---|
static JLMatrix |
create(CallMatrix3D matrix)
Create a JLMatrix from a Creo Matrix3D object
|
static JLMatrix |
create(CallTransform3D trans)
Create a JLMatrix from a Creo Transform3D object
|
static JLMatrix |
create(JLTransform xf)
Create a JLMatrix from a JShell JLTransform object
|
static double |
degreesToRadians(double degrees)
Convert degrees to radians
|
static void |
dot(JLMatrix m1,
JLMatrix m2)
Perform a dot-product of two matrices.
|
static CallMatrix3D |
export(JLMatrix m)
Create a Creo Matrix3D object from a JLMatrix
|
static void |
init(JLMatrix m)
Initialize a JLMatrix to an origin matrix
|
static void |
print(JLMatrix m)
Print out a matrix (for debugging)
|
static double |
radiansToDegrees(double radians)
Convert radians to degrees
|
static void |
rotateX(JLMatrix old,
double angle)
Rotate a matrix on the X axis
|
static void |
rotateY(JLMatrix old,
double angle)
Rotate a matrix on the Y axis
|
static void |
rotateZ(JLMatrix old,
double angle)
Rotate a matrix on the Z axis
|
static void |
setOrigin(JLMatrix m,
double x,
double y,
double z)
Set the Origin of a matrix
|
static void |
setXVector(JLMatrix m,
double x,
double y,
double z)
Set the X-Vector of a matrix
|
static void |
setYVector(JLMatrix m,
double x,
double y,
double z)
Set the Y-Vector of a matrix
|
static void |
setZVector(JLMatrix m,
double x,
double y,
double z)
Set the Z-Vector of a matrix
|
static void |
showTransform(CallTransform3D trans)
Print out a Creo Transform3D object (for debugging)
|
static JLInertia |
writeInertia(CallInertia inertia)
Convert a Creo Inertia object to a JLInertia
|
static JLTransform |
writeTransformTable(CallTransform3D featTrans)
Convert a Creo Transform3D object to a JLTransform
|
static JLTransform |
writeTransformTable(JLMatrix m)
Convert a JLMatrix to a JLTransform
|
public static JLMatrix create(CallMatrix3D matrix) throws JLIException
matrix - The Creo matrixJLIExceptionpublic static JLMatrix create(CallTransform3D trans) throws JLIException
trans - The Creo transformJLIExceptionpublic static JLMatrix create(JLTransform xf) throws JLIException
xf - The JShell transform objectJLIExceptionpublic static void init(JLMatrix m)
m - The matrix to initializepublic static CallMatrix3D export(JLMatrix m) throws com.ptc.cipjava.jxthrowable
m - The JShell matrix to exportcom.ptc.cipjava.jxthrowablepublic static void setXVector(JLMatrix m, double x, double y, double z)
m - The JShell matrix to updatex - Vector's X coordinatey - Vector's Y coordinatez - Vector's Z coordinatepublic static void setYVector(JLMatrix m, double x, double y, double z)
m - The JShell matrix to updatex - Vector's X coordinatey - Vector's Y coordinatez - Vector's Z coordinatepublic static void setZVector(JLMatrix m, double x, double y, double z)
m - The JShell matrix to updatex - Vector's X coordinatey - Vector's Y coordinatez - Vector's Z coordinatepublic static void setOrigin(JLMatrix m, double x, double y, double z)
m - The JShell matrix to updatex - Origin's X coordinatey - Origin's Y coordinatez - Origin's Z coordinatepublic static void dot(JLMatrix m1, JLMatrix m2)
m1 - The first matrix. This one will be updated.m2 - The second matrix. This one will NOT be updated.public static void rotateX(JLMatrix old, double angle)
x-axis rotation: [ 1 0 0 ] [ 0 cos(a) sin(a)] [ 0 -sin(a) cos(a)]
old - The matrix to updateangle - The angle to rotate, in radianspublic static void rotateY(JLMatrix old, double angle)
y-axis rotation: [ cos(a) 0 -sin(a)] [ 0 1 0 ] [ sin(a) 0 cos(a)]
old - The matrix to updateangle - The angle to rotate, in radianspublic static void rotateZ(JLMatrix old, double angle)
z-axis rotation: [ cos(a) sin(a) 0 ] [ -sin(a) cos(a) 0 ] [ 0 0 1 ]
old - The matrix to updateangle - The angle to rotate, in radianspublic static double degreesToRadians(double degrees)
degrees - An angle in degreespublic static double radiansToDegrees(double radians)
radians - An angle in radianspublic static void print(JLMatrix m)
m - The matrix to printpublic static JLTransform writeTransformTable(JLMatrix m) throws JLIException
m - The JShell matrix to convertJLIExceptionpublic static JLTransform writeTransformTable(CallTransform3D featTrans) throws JLIException
featTrans - The Creo transformJLIExceptionpublic static JLInertia writeInertia(CallInertia inertia) throws com.ptc.cipjava.jxthrowable
inertia - The Creo inertia objectcom.ptc.cipjava.jxthrowablepublic static void showTransform(CallTransform3D trans) throws com.ptc.cipjava.jxthrowable
trans - The Creo transform to printcom.ptc.cipjava.jxthrowable