GlobalTransform – Aspose.3D FOSS for Java

Γενική Επισκόπηση

GlobalTransform αντιπροσωπεύει το μόνο ανάγνωση Η μετατροπή του παγκόσμιου χώρου ενός κόμβου σκηνής. node.getGlobalTransform() και αντανακλά το σωρευτικό αποτέλεσμα όλων των μετασχηματισμών προγόνου από τη ρίζα της σκηνής μέχρι τον κόμβο.

Πακέτο: com.aspose.threed

Για να αλλάξετε τη θέση ή τον προσανατολισμό ενός κόμβου, τροποποιήστε το γραπτό του κόμπου. Transform Αντίθετα.


Κλασική αναφορά

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.

Γρήγορο παράδειγμα

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

Βλέπε επίσης:

 Ελληνικά