Transform — Aspose.3D FOSS for .NET
Example
Example Transform 类定义了局部变换 Node 在场景图中。它存储平移、旋转(作为一个 Quaternion),以及缩放,作为独立的属性。组合的变换矩阵在内部用于通过 GlobalTransform.
using Aspose.ThreeD;
var scene = new Scene();
var node = scene.RootNode.CreateChildNode("Moved");
node.Transform.Translation = new FVector3(5, 0, 0);
node.Transform.Scale = new FVector3(2, 2, 2);Example
| Example | Example | Example | Example |
|---|---|---|---|
Translation | FVector3 | 获取/设置 | 本地位置偏移 |
Rotation | Quaternion | 获取/设置 | 本地旋转,作为单位四元数 |
Scale | FVector3 | 获取/设置 | 本地缩放因子 |
Matrix | Matrix4 | 获取/设置 | 组合的本地变换矩阵 |