GlobalTransform – Aspose.3D FOSS for Java
General
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.
GlobalTransform representa la transformació de l’espai mundial en lectura única d’un nod de escena. Es produeix mitjançant la crida a ⌒node.getGlobalTransform()ヽ i reflecteix l ’efecte cumulatiu de totes les transformacions ancestrals des de la raí del punt de vista fins al node.
Package: com.aspose.threed
Totes les propietats són de només lectura. Per canviar la posició o orientació d’un node, modifica el Transform escrivible del node en comptes.
Referència de classe
| Class | Description |
|---|---|
GlobalTransform | Read-only world-space transform snapshot. Exposes the composed translation, rotation, scale, and matrix of a node in world space. |
| 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. |
transformMatrix | Matrix4 | Read | Returns the full 4x4 world-space transformation matrix. |
| Signature | Description |
|---|---|
getTranslation() to Vector3 | Returns the world-space translation of the node. |
getRotation() to Vector3 | Returns the world-space rotation of the node. |
getScale() to Vector3 | Returns the world-space scale of the node. |
getTransformMatrix() to Matrix4 | Returns the full 4x4 world-space transformation matrix. |
Exemple ràpid
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.getTransformMatrix()); // full 4x4 matrixVeure també
- `Transformar ̋ referència de classe
Nodereferència de classeMatriu4referència de classe