GlobalTransform – Aspose.3D FOSS for Java

Resumo geral

GlobalTransform representa o somente leitura transformação do mundo-espaço de um nó da cena. É obtido chamando node.getGlobalTransform() e reflete o efeito cumulativo de todas as transformações ancestrais da raiz do cenário até ao nó.

Pacote de produtos: com.aspose.threed

Todas as propriedades são somente leitura. Para alterar a posição ou orientação de um nó, modifique o código escritível do nó Transform Em vez disso.


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.

Um exemplo rápido

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

Ver também:

 Português