public class SpatialData
extends java.lang.Object
Constructor and Description |
---|
SpatialData()
Constructs a SpatialData object without specifying the data.
|
SpatialData(double[] matrixData)
Constructs a SpatialData object.
|
Modifier and Type | Method and Description |
---|---|
Matrix4d |
getMatrix()
Returns the matrix which contains the spatial data.
|
double |
getPosX()
Returns the x-position.
|
double |
getPosY()
Returns the y-position.
|
double |
getPosZ()
Returns the z-position.
|
void |
resetRotation()
Resets the rotational data
|
void |
rotX(double angle)
Rotates the spatial attribute counter-clockwise about the x-axis.
|
void |
rotY(double angle)
Rotates the spatial attribute counter-clockwise about the y-axis.
|
void |
rotZ(double angle)
Rotates the spatial attribute counter-clockwise about the z-axis.
|
void |
setMatrix(Matrix4d matrixData)
Sets the matrix.
|
void |
setPosition(double x,
double y,
double z)
Sets a new Position.
|
public SpatialData()
public SpatialData(double[] matrixData)
matrixData
- The spatial data represented with a double[16] matrix. It begins with the first element in the first row, then the second element in the first row etc.public Matrix4d getMatrix()
public double getPosX()
public double getPosY()
public double getPosZ()
public void resetRotation()
public void rotX(double angle)
angle
- The angle to rotate in radians.public void rotY(double angle)
angle
- The angle to rotate in radians.public void rotZ(double angle)
angle
- The angle to rotate in radians.public void setMatrix(Matrix4d matrixData)
matrixData
- The new matrix in Matrix4d.public void setPosition(double x, double y, double z)
x
- x-positiony
- y-positionz
- z-position