Transform

Inheritance: java.lang.Object, com.aspose.threed.A3DObject

public class Transform extends A3DObject

A transform contains information that allow access to object’s translate/scale/rotation or transform matrix at minimum cost This is used by local transform. Example: The following code shows how to change the transform of the node:

Scene scene = new Scene();
     var boxNode = scene.getRootNode().createChildNode(new Box());
     //place the box at (10, 0, 0)
     boxNode.getTransform().setTranslation(new Vector3(10, 0, 0));

Methods

MethodDescription
equals(Object arg0)
findProperty(String propertyName)Finds the property.
getClass()
getEulerAngles()Gets the rotation represented in Euler angles, measured in degree Example:
getGeometricRotation()Gets the geometric Euler rotation(measured in degree).
getGeometricScaling()Gets the geometric scaling.
getGeometricTranslation()Gets the geometric translation.
getName()Gets the name.
getPostRotation()Gets the post-rotation represented in degree Example:
getPreRotation()Gets the pre-rotation represented in degree Example:
getProperties()Gets the collection of all properties.
getProperty(String property)Get the value of specified property
getRotation()Gets the rotation represented in quaternion.
getRotationOffset()Gets the rotation offset
getRotationPivot()Gets the rotation pivot
getScale()Gets the scale
getScaling()Gets the scaling Example:
getScalingOffset()Gets the scaling offset
getScalingPivot()Gets the scaling pivot
getTransformMatrix()Gets the transform matrix.
getTranslation()Gets the translation Example:
hashCode()
notify()
notifyAll()
removeProperty(Property property)Removes a dynamic property.
removeProperty(String property)Remove the specified property identified by name
setEulerAngles(Vector3 value)Sets the rotation represented in Euler angles, measured in degree
setEulerAngles(double rx, double ry, double rz)Sets the Euler angles in degrees of current transform.
setGeometricRotation(Vector3 value)Sets the geometric Euler rotation(measured in degree).
setGeometricRotation(double rx, double ry, double rz)Sets the geometric Euler rotation(measured in degree).
setGeometricScaling(Vector3 value)Sets the geometric scaling.
setGeometricScaling(double sx, double sy, double sz)Sets the geometric scaling.
setGeometricTranslation(Vector3 value)Sets the geometric translation.
setGeometricTranslation(double x, double y, double z)Sets the geometric translation.
setName(String value)Sets the name.
setPostRotation(Vector3 value)Sets the post-rotation represented in degree
setPostRotation(double rx, double ry, double rz)Sets the post-rotation represented in degree Example:
setPreRotation(Vector3 value)Sets the pre-rotation represented in degree
setPreRotation(double rx, double ry, double rz)Sets the pre-rotation represented in degree Example:
setProperty(String property, Object value)Sets the value of specified property
setRotation(Quaternion value)Sets the rotation represented in quaternion.
setRotation(double rw, double rx, double ry, double rz)Sets the rotation(as quaternion components) of current transform.
setRotationOffset(Vector3 value)Sets the rotation offset
setRotationPivot(Vector3 value)Sets the rotation pivot
setScale(Vector3 value)Sets the scale
setScale(double sx, double sy, double sz)Sets the scale of current transform.
setScaling(Vector3 value)Sets the scaling
setScalingOffset(Vector3 value)Sets the scaling offset
setScalingPivot(Vector3 value)Sets the scaling pivot
setTransformMatrix(Matrix4 value)Sets the transform matrix.
setTranslation(Vector3 value)Sets the translation
setTranslation(double tx, double ty, double tz)Sets the translation of current transform.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

ParameterTypeDescription
propertyNamejava.lang.StringProperty name.

Returns: Property - The property.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getEulerAngles()

public Vector3 getEulerAngles()

Gets the rotation represented in Euler angles, measured in degree Example:

Node node = new Node();
     node.getTransform().setEulerAngles(new Vector3(90, 0, 0));

Returns: Vector3

getGeometricRotation()

public Vector3 getGeometricRotation()

Gets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

Returns: Vector3

getGeometricScaling()

public Vector3 getGeometricScaling()

Gets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it. Example:

Node node = new Node();
     node.getTransform.setGeometricScaling(new Vector3(2, 2, 2));

Returns: Vector3

getGeometricTranslation()

public Vector3 getGeometricTranslation()

Gets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it. Example:

Node node = new Node();
     node.getTransform().setGeometricTranslation(new Vector3(10, 0, 0));

Returns: Vector3

getName()

public String getName()

Gets the name.

Returns: java.lang.String

getPostRotation()

public Vector3 getPostRotation()

Gets the post-rotation represented in degree Example:

Node node = new Node();
     node.getTransform().setPostRotation(new Vector3(90, 0, 0));

Returns: Vector3

getPreRotation()

public Vector3 getPreRotation()

Gets the pre-rotation represented in degree Example:

Node node = new Node();
     node.getTransform().setPreRotation(new Vector3(90, 0, 0));

Returns: Vector3

getProperties()

public PropertyCollection getProperties()

Gets the collection of all properties.

Returns: PropertyCollection

getProperty(String property)

public Object getProperty(String property)

Get the value of specified property

Parameters:

ParameterTypeDescription
propertyjava.lang.StringProperty name

Returns: java.lang.Object - The value of the found property

getRotation()

public Quaternion getRotation()

Gets the rotation represented in quaternion. Example:

Node node = new Node();
     node.getTransform().setRotation(new Quaternion(1, 0, 0, 0));

Returns: Quaternion

getRotationOffset()

public Vector3 getRotationOffset()

Gets the rotation offset

Returns: Vector3

getRotationPivot()

public Vector3 getRotationPivot()

Gets the rotation pivot

Returns: Vector3

getScale()

public Vector3 getScale()

Gets the scale

Returns: Vector3

getScaling()

public Vector3 getScaling()

Gets the scaling Example:

Node node = new Node();
     node.getTransform().setScaling(new Vector3(2, 2, 2));

Returns: Vector3

getScalingOffset()

public Vector3 getScalingOffset()

Gets the scaling offset

Returns: Vector3

getScalingPivot()

public Vector3 getScalingPivot()

Gets the scaling pivot

Returns: Vector3

getTransformMatrix()

public Matrix4 getTransformMatrix()

Gets the transform matrix. Remarks: Assign on this will reset the getTranslation, getScale and getRotation, the getGeometricRotation, getGeometricScaling and getGeometricTranslation will not be affected. Example:

Node node = new Node();
     node.getTransform().setTransformMatrix(Matrix4.getIdentity());

Returns: Matrix4

getTranslation()

public Vector3 getTranslation()

Gets the translation Example:

Node node = new Node();
     node.getTransform().setTranslation(new Vector3(10, 0, 0));

Returns: Vector3

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeProperty(Property property)

public boolean removeProperty(Property property)

Removes a dynamic property.

Parameters:

ParameterTypeDescription
propertyPropertyWhich property to remove

Returns: boolean - true if the property is successfully removed

removeProperty(String property)

public boolean removeProperty(String property)

Remove the specified property identified by name

Parameters:

ParameterTypeDescription
propertyjava.lang.String

Returns: boolean

setEulerAngles(Vector3 value)

public void setEulerAngles(Vector3 value)

Sets the rotation represented in Euler angles, measured in degree

Parameters:

ParameterTypeDescription
valueVector3New value Example:
Node node = new Node();
     node.getTransform().setEulerAngles(new Vector3(90, 0, 0));
``` |

### setEulerAngles(double rx, double ry, double rz) {#setEulerAngles-double-double-double-}

public Transform setEulerAngles(double rx, double ry, double rz)



Sets the Euler angles in degrees of current transform.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rx | double |  |
| ry | double |  |
| rz | double | **Example:**

Node node = new Node(); node.getTransform().setEulerAngles(90, 0, 0);


**Returns:**
[Transform](../../com.aspose.threed/transform)
### setGeometricRotation(Vector3 value) {#setGeometricRotation-com.aspose.threed.Vector3-}

public void setGeometricRotation(Vector3 value)



Sets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setGeometricRotation(double rx, double ry, double rz) {#setGeometricRotation-double-double-double-}

public Transform setGeometricRotation(double rx, double ry, double rz)



Sets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it. **Example:**

Node node = new Node(); node.getTransform().setGeometricRotation(90, 0, 0);


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rx | double |  |
| ry | double |  |
| rz | double |  |

**Returns:**
[Transform](../../com.aspose.threed/transform)
### setGeometricScaling(Vector3 value) {#setGeometricScaling-com.aspose.threed.Vector3-}

public void setGeometricScaling(Vector3 value)



Sets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform.setGeometricScaling(new Vector3(2, 2, 2));


### setGeometricScaling(double sx, double sy, double sz) {#setGeometricScaling-double-double-double-}

public Transform setGeometricScaling(double sx, double sy, double sz)



Sets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it. **Example:**

Node node = new Node(); node.getTransform().setGeometricScaling(2, 2, 2);


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| sx | double |  |
| sy | double |  |
| sz | double |  |

**Returns:**
[Transform](../../com.aspose.threed/transform)
### setGeometricTranslation(Vector3 value) {#setGeometricTranslation-com.aspose.threed.Vector3-}

public void setGeometricTranslation(Vector3 value)



Sets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform().setGeometricTranslation(new Vector3(10, 0, 0));


### setGeometricTranslation(double x, double y, double z) {#setGeometricTranslation-double-double-double-}

public Transform setGeometricTranslation(double x, double y, double z)



Sets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it. **Example:**

Node node = new Node(); node.getTransform().setGeometricTranslation(10, 0, 0);


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| x | double |  |
| y | double |  |
| z | double |  |

**Returns:**
[Transform](../../com.aspose.threed/transform)
### setName(String value) {#setName-java.lang.String-}

public void setName(String value)



Sets the name.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value |

### setPostRotation(Vector3 value) {#setPostRotation-com.aspose.threed.Vector3-}

public void setPostRotation(Vector3 value)



Sets the post-rotation represented in degree

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform().setPostRotation(new Vector3(90, 0, 0));


### setPostRotation(double rx, double ry, double rz) {#setPostRotation-double-double-double-}

public Transform setPostRotation(double rx, double ry, double rz)



Sets the post-rotation represented in degree **Example:**

Node node = new Node(); node.getTransform().setPostRotation(90, 0, 0);


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rx | double |  |
| ry | double |  |
| rz | double |  |

**Returns:**
[Transform](../../com.aspose.threed/transform)
### setPreRotation(Vector3 value) {#setPreRotation-com.aspose.threed.Vector3-}

public void setPreRotation(Vector3 value)



Sets the pre-rotation represented in degree

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform().setPreRotation(new Vector3(90, 0, 0));


### setPreRotation(double rx, double ry, double rz) {#setPreRotation-double-double-double-}

public Transform setPreRotation(double rx, double ry, double rz)



Sets the pre-rotation represented in degree **Example:**

Node node = new Node(); node.getTransform().setPreRotation(90, 0, 0);


**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rx | double |  |
| ry | double |  |
| rz | double |  |

**Returns:**
[Transform](../../com.aspose.threed/transform)
### setProperty(String property, Object value) {#setProperty-java.lang.String-java.lang.Object-}

public void setProperty(String property, Object value)



Sets the value of specified property

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| property | java.lang.String | Property name |
| value | java.lang.Object | The value of the property |

### setRotation(Quaternion value) {#setRotation-com.aspose.threed.Quaternion-}

public void setRotation(Quaternion value)



Sets the rotation represented in quaternion.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Quaternion](../../com.aspose.threed/quaternion) | New value **Example:**

Node node = new Node(); node.getTransform().setRotation(new Quaternion(1, 0, 0, 0));


### setRotation(double rw, double rx, double ry, double rz) {#setRotation-double-double-double-double-}

public Transform setRotation(double rw, double rx, double ry, double rz)



Sets the rotation(as quaternion components) of current transform.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| rw | double |  |
| rx | double |  |
| ry | double |  |
| rz | double | **Example:**

Node node = new Node(); node.getTransform().setRotation(1, 0, 0, 0);


**Returns:**
[Transform](../../com.aspose.threed/transform)
### setRotationOffset(Vector3 value) {#setRotationOffset-com.aspose.threed.Vector3-}

public void setRotationOffset(Vector3 value)



Sets the rotation offset

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setRotationPivot(Vector3 value) {#setRotationPivot-com.aspose.threed.Vector3-}

public void setRotationPivot(Vector3 value)



Sets the rotation pivot

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setScale(Vector3 value) {#setScale-com.aspose.threed.Vector3-}

public void setScale(Vector3 value)



Sets the scale

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setScale(double sx, double sy, double sz) {#setScale-double-double-double-}

public Transform setScale(double sx, double sy, double sz)



Sets the scale of current transform.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| sx | double |  |
| sy | double |  |
| sz | double | **Example:**

Node node = new Node(); node.getTransform().setScale(2, 2, 2);


**Returns:**
[Transform](../../com.aspose.threed/transform)
### setScaling(Vector3 value) {#setScaling-com.aspose.threed.Vector3-}

public void setScaling(Vector3 value)



Sets the scaling

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform().setScaling(new Vector3(2, 2, 2));


### setScalingOffset(Vector3 value) {#setScalingOffset-com.aspose.threed.Vector3-}

public void setScalingOffset(Vector3 value)



Sets the scaling offset

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setScalingPivot(Vector3 value) {#setScalingPivot-com.aspose.threed.Vector3-}

public void setScalingPivot(Vector3 value)



Sets the scaling pivot

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

### setTransformMatrix(Matrix4 value) {#setTransformMatrix-com.aspose.threed.Matrix4-}

public void setTransformMatrix(Matrix4 value)



Sets the transform matrix.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Matrix4](../../com.aspose.threed/matrix4) | New value **Remarks:** Assign on this will reset the [getTranslation](../../com.aspose.threed/transform\#getTranslation), [getScale](../../com.aspose.threed/transform\#getScale) and [getRotation](../../com.aspose.threed/transform\#getRotation), the [getGeometricRotation](../../com.aspose.threed/transform\#getGeometricRotation), [getGeometricScaling](../../com.aspose.threed/transform\#getGeometricScaling) and [getGeometricTranslation](../../com.aspose.threed/transform\#getGeometricTranslation) will not be affected. **Example:**

Node node = new Node(); node.getTransform().setTransformMatrix(Matrix4.getIdentity());


### setTranslation(Vector3 value) {#setTranslation-com.aspose.threed.Vector3-}

public void setTranslation(Vector3 value)



Sets the translation

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value **Example:**

Node node = new Node(); node.getTransform().setTranslation(new Vector3(10, 0, 0));


### setTranslation(double tx, double ty, double tz) {#setTranslation-double-double-double-}

public Transform setTranslation(double tx, double ty, double tz)



Sets the translation of current transform.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| tx | double |  |
| ty | double |  |
| tz | double | **Example:**

Node node = new Node(); node.getTransform().setTranslation(10, 0, 0);


**Returns:**
[Transform](../../com.aspose.threed/transform)
### toString() {#toString--}

public String toString()





**Returns:**
java.lang.String
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |