GlobalTransform — Aspose.3D FOSS for Java
Overview
GlobalTransform represents the read-only world-space transformation of a scene node. It is obtained by calling node.getGlobalTransform() and reflects the cumulative effect of all ancestor transforms from the scene root down to the node.
Package: com.aspose.threed
All properties are read-only. To change a node’s position or orientation, modify the node’s writable Transform instead.
Description
GlobalTransform is a class in the Aspose.3D FOSS library for Java that exposes 4 methods and 4 properties for programmatic use.
Core capabilities include: vector3; vector3; vector3. These operations enable developers to integrate globaltransform functionality directly into Java applications.
The class also provides the translation property (returns the world-space translation (position) of the node), the rotation property (returns the world-space rotation (euler angles) of the node), the scale property (returns the world-space scale of the node).
Instances are created through a single constructor that initializes the object with default values.
Class Reference
| Class | Description |
|---|---|
GlobalTransform | Read-only world-space transform snapshot. Exposes the composed translation, rotation, scale, and matrix of a node in world space. |
Properties
| Name | Type | Access | Description |
|---|---|---|---|
translation | Vector3 | Read | Returns the world-space translation (position) of the node. |
rotation | Vector3 | Read | Returns the world-space rotation (Euler angles) of the node. |
scale | Vector3 | Read | Returns the world-space scale of the node. |
matrix | Matrix4 | Read | Returns the full 4×4 world-space transformation matrix. |
Methods
| Signature | Description |
|---|---|
getTranslation() → Vector3 | Returns the world-space translation of the node. |
getRotation() → Vector3 | Returns the world-space rotation of the node. |
getScale() → Vector3 | Returns the world-space scale of the node. |
getMatrix() → Matrix4 | Returns the full 4×4 world-space transformation matrix. |
Quick Example
import com.aspose.threed.Node;
import com.aspose.threed.GlobalTransform;
Node child = scene.getRootNode().createChildNode("child");
GlobalTransform gt = child.getGlobalTransform();
System.out.println(gt.getTranslation()); // world-space position
System.out.println(gt.getMatrix()); // full 4x4 matrix