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

ClassDescription
GlobalTransformRead-only world-space transform snapshot. Exposes the composed translation, rotation, scale, and matrix of a node in world space.
NameTypeAccessDescription
translationVector3ReadReturns the world-space translation (position) of the node.
rotationVector3ReadReturns the world-space rotation (Euler angles) of the node.
scaleVector3ReadReturns the world-space scale of the node.
transformMatrixMatrix4ReadReturns the full 4x4 world-space transformation matrix.
SignatureDescription
getTranslation() to Vector3Returns the world-space translation of the node.
getRotation() to Vector3Returns the world-space rotation of the node.
getScale() to Vector3Returns the world-space scale of the node.
getTransformMatrix() to Matrix4Returns 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 matrix

Veure també

  • `Transformar ̋ referència de classe
  • Node referència de classe
  • Matriu4 referència de classe
 Català