GlobalTransform

GlobalTransform

Metody

Methods GlobalTransform class zapewnia widok tylko do odczytu macierzy transformacji w przestrzeni świata węzła. Jest ona obliczana poprzez składanie lokalnych transformacji wszystkich węzłów nadrzędnych od korzenia aż do bieżącego węzła.

Dostęp przez node.GlobalTransform. Jedyną właściwością jest Matrix (typ Matrix4), który zawiera złożoną transformację w przestrzeni świata.

using Aspose.ThreeD;

var scene = new Scene();
var parent = scene.RootNode.CreateChildNode("Parent");
parent.Transform.Translation = new FVector3(10, 0, 0);

var child = parent.CreateChildNode("Child");
child.Transform.Translation = new FVector3(5, 0, 0);

// Access the composed world-space matrix
Matrix4 worldMatrix = child.GlobalTransform.Matrix;

Metody

NameTypeAccessDescription
TranslationVector3ReadGets the translation
ScaleVector3ReadGets the scale
EulerAnglesVector3ReadGets the rotation represented in Euler angles, measured in degree
RotationQuaternionReadGets the rotation represented in quaternion.
TransformMatrixMatrix4ReadGets the transform matrix.

Zobacz także

 Polski