| Modifier and Type | Field and Description |
|---|---|
| private static final double | |
| private boolean | |
| protected double[] | |
| private Vec3d |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static boolean | |
| pack-priv static boolean | |
| public double | |
| public GeneralTransform3D | |
| public double | |
| public double[] | Returns: an array of 16 valuesthe return value, or null rv)Returns a copy of an array of 16 values that contains the 4x4 matrix of this transform. |
| public double | |
| public GeneralTransform3D | |
| private GeneralTransform3D | |
| public boolean | |
| public boolean | |
| pack-priv boolean | |
| private static void | luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2)
Solves a set of linear equations. |
| private static boolean | Returns: true if the matrix is nonsingular, or false otherwise.Given a 4x4 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself. |
| public GeneralTransform3D | Returns: this transformthe other transform t1)Sets the value of this transform to the result of multiplying itself with transform t1 : this = this * t1. |
| public GeneralTransform3D | Returns: this transformthe other transform t1)Sets the value of this transform to the result of multiplying itself with transform t1 : this = this * t1. |
| public GeneralTransform3D | Returns: this transformthe vertical line on the left edge of the near
clipping plane mapped to the left edge of the graphics window left, double the vertical line on the right edge of the near
clipping plane mapped to the right edge of the graphics window right, double the horizontal line on the bottom edge of the near
clipping plane mapped to the bottom edge of the graphics window bottom, double the horizontal line on the top edge of the near
clipping plane mapped to the top edge of the graphics window top, double the distance to the frustum's near clipping plane
(the value -near is the location of the near clip plane) near, double the distance to the frustum's far clipping plane far)Sets the value of this transform to an orthographic (parallel) projection transform. |
| public GeneralTransform3D | Returns: this transformspecifies whether the fov is vertical (Y direction). verticalFOV, double specifies the field of view in radians fov, double specifies the aspect ratio. The aspect ratio is the ratio
of width to height. aspect, double the distance to the frustum's near clipping plane.
This value must be positive, (the value -zNear is the location of the
near clip plane). zNear, double the distance to the frustum's far clipping plane zFar)Sets the value of this transform to a perspective projection transform. |
| public GeneralTransform3D | Returns: this transformthe X coordinate scale factor sx, double the Y coordinate scale factor sy, double the Z coordinate scale factor sz)Sets the value of this transform to the result of multiplying itself with a scale transform:
scaletx =
[ sx 0 0 0 ]
[ 0 sy 0 0 ]
[ 0 0 sz 0 ]
[ 0 0 0 1 ].
|
| public GeneralTransform3D | Returns: this transformthe transform to copy into this transform. t1)Sets the value of this transform to the specified transform. |
| public GeneralTransform3D | Returns: this transforman array of 16 values to copy into this transform in
row major order. m)Sets the matrix values of this transform to the values in the specified array. |
| public GeneralTransform3D | |
| public String | Returns: the matrix elements of this transformOverrides java. Returns the matrix elements of this transform as a string. |
| public BaseBounds | |
| public Point2D | |
| public Vec3d | Returns: the transformed pointthe input point to be transformed point, Vec3d the transformed point pointOut)Implements com. Transforms the point parameter with this transform and places the result into pointOut. |
| public Vec3d | |
| public Vec3f | Returns: the transformed normalthe input normal to be transformed normal, Vec3f the transformed normal normalOut)Transforms the normal parameter by this transform and places the value into normalOut. |
| public Vec3f | Returns: the transformed normalthe input normal to be transformed normal)Transforms the normal parameter by this transform and places the value back into normal. |
| private void |
| EPSILON_ABSOLUTE | back to summary |
|---|---|
| private static final double EPSILON_ABSOLUTE | |
| identity | back to summary |
|---|---|
| private boolean identity | |
| mat | back to summary |
|---|---|
| protected double[] mat | |
| tempV3d | back to summary |
|---|---|
| private Vec3d tempV3d | |
| GeneralTransform3D | back to summary |
|---|---|
| public GeneralTransform3D() Constructs and initializes a transform to the identity matrix. | |
| almostOne | back to summary |
|---|---|
| pack-priv static boolean almostOne(double a) | |
| almostZero | back to summary |
|---|---|
| pack-priv static boolean almostZero(double a) | |
| computeClipZCoord | back to summary |
|---|---|
| public double computeClipZCoord() | |
| copy | back to summary |
|---|---|
| public GeneralTransform3D copy() | |
| determinant | back to summary |
|---|---|
| public double determinant() Computes the determinant of this transform.
| |
| get | back to summary |
|---|---|
| public double[] get(double[] rv) Returns a copy of an array of 16 values that contains the 4x4 matrix of this transform. The first four elements of the array will contain the top row of the transform matrix, etc.
| |
| get | back to summary |
|---|---|
| public double get(int index) | |
| invert | back to summary |
|---|---|
| public GeneralTransform3D invert() Inverts this transform in place.
| |
| invert | back to summary |
|---|---|
| private GeneralTransform3D invert(GeneralTransform3D t1) General invert routine. Inverts t1 and places the result in "this". Note that this routine handles both the "this" version and the non-"this" version. Also note that since this routine is slow anyway, we won't worry about allocating a little bit of garbage. | |
| isAffine | back to summary |
|---|---|
| public boolean isAffine() Returns true if the transform is affine. A transform is considered to be affine if the last row of its matrix is (0,0,0,1). Note that an instance of AffineTransform3D is always affine. | |
| isIdentity | back to summary |
|---|---|
| public boolean isIdentity() Returns true if the transform is identity. A transform is considered to be identity if the diagonal elements of its matrix is all 1s otherwise 0s. | |
| isInfOrNaN | back to summary |
|---|---|
| pack-priv boolean isInfOrNaN() | |
| luBacksubstitution | back to summary |
|---|---|
| private static void luBacksubstitution(double[] matrix1, int[] row_perm, double[] matrix2) Solves a set of linear equations. The input parameters "matrix1", and "row_perm" come from luDecompostionD4x4 and do not change here. The parameter "matrix2" is a set of column vectors assembled into a 4x4 matrix of floating-point values. The procedure takes each column of "matrix2" in turn and treats it as the right-hand side of the matrix equation Ax = LUx = b. The solution vector replaces the original column of the matrix. If "matrix2" is the identity matrix, the procedure replaces its contents with the inverse of the matrix from which "matrix1" was originally derived. | |
| luDecomposition | back to summary |
|---|---|
| private static boolean luDecomposition(double[] matrix0, int[] row_perm) Given a 4x4 array "matrix0", this function replaces it with the LU decomposition of a row-wise permutation of itself. The input parameters are "matrix0" and "dimen". The array "matrix0" is also an output parameter. The vector "row_perm[4]" is an output parameter that contains the row permutations resulting from partial pivoting. The output parameter "even_row_xchg" is 1 when the number of row exchanges is even, or -1 otherwise. Assumes data type is always double. This function is similar to luDecomposition, except that it is tuned specifically for 4x4 matrices.
| |
| mul | back to summary |
|---|---|
| public GeneralTransform3D mul(BaseTransform t1) Sets the value of this transform to the result of multiplying itself with transform t1 : this = this * t1.
| |
| mul | back to summary |
|---|---|
| public GeneralTransform3D mul(GeneralTransform3D t1) Sets the value of this transform to the result of multiplying itself with transform t1 : this = this * t1.
| |
| ortho | back to summary |
|---|---|
| public GeneralTransform3D ortho(double left, double right, double bottom, double top, double near, double far) Sets the value of this transform to an orthographic (parallel) projection transform. This transform maps coordinates from Eye Coordinates (EC) to Clipping Coordinates (CC). Note that unlike the similar function in OpenGL, the clipping coordinates generated by the resulting transform are in a right-handed coordinate system.
| |
| perspective | back to summary |
|---|---|
| public GeneralTransform3D perspective(boolean verticalFOV, double fov, double aspect, double zNear, double zFar) Sets the value of this transform to a perspective projection transform. This transform maps points from Eye Coordinates (EC) to Clipping Coordinates (CC). Note that the field of view is specified in radians.
| |
| scale | back to summary |
|---|---|
| public GeneralTransform3D scale(double sx, double sy, double sz) Sets the value of this transform to the result of multiplying itself with a scale transform:
scaletx =
[ sx 0 0 0 ]
[ 0 sy 0 0 ]
[ 0 0 sz 0 ]
[ 0 0 0 1 ].
this = this * scaletx.
| |
| set | back to summary |
|---|---|
| public GeneralTransform3D set(GeneralTransform3D t1) Sets the value of this transform to the specified transform.
| |
| set | back to summary |
|---|---|
| public GeneralTransform3D set(double[] m) Sets the matrix values of this transform to the values in the specified array.
| |
| setIdentity | back to summary |
|---|---|
| public GeneralTransform3D setIdentity() Sets this transform to the identity matrix.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the matrix elements of this transform as a string. | |
| transform | back to summary |
|---|---|
| public BaseBounds transform(BaseBounds src, BaseBounds dst) | |
| transform | back to summary |
|---|---|
| public Point2D transform(Point2D point, Point2D pointOut) Transform 2D point (with z == 0) | |
| transform | back to summary |
|---|---|
| public Vec3d transform(Vec3d point, Vec3d pointOut) Implements com. Transforms the point parameter with this transform and places the result into pointOut. The fourth element of the point input parameter is assumed to be one. | |
| transform | back to summary |
|---|---|
| public Vec3d transform(Vec3d point) Transforms the point parameter with this transform and places the result back into point. The fourth element of the point input parameter is assumed to be one. | |
| transformNormal | back to summary |
|---|---|
| public Vec3f transformNormal(Vec3f normal, Vec3f normalOut) Transforms the normal parameter by this transform and places the value into normalOut. The fourth element of the normal is assumed to be zero. Note For correct lighting results, if a transform has uneven scaling surface normals should transformed by the inverse transpose of the transform. This the responsibility of the application and is not done automatically by this method. | |
| transformNormal | back to summary |
|---|---|
| public Vec3f transformNormal(Vec3f normal) Transforms the normal parameter by this transform and places the value back into normal. The fourth element of the normal is assumed to be zero. Note For correct lighting results, if a transform has uneven scaling surface normals should transformed by the inverse transpose of the transform. This the responsibility of the application and is not done automatically by this method. | |
| updateState | back to summary |
|---|---|
| private void updateState() | |