Transform

Phương pháp

Methods Transform lớp định nghĩa phép biến đổi cục bộ của một Node trong đồ thị cảnh. Nó lưu trữ phép dịch, phép quay (dưới dạng một Quaternion), và tỉ lệ như các thuộc tính riêng biệt. Ma trận biến đổi đã hợp thành được sử dụng nội bộ để tính vị trí không gian toàn cục của nút thông qua 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);

Phương pháp

NameTypeAccessDescription
TranslationVector3Read/WriteGets or sets the translation.
ScalingVector3Read/WriteGets or sets the scaling.
ScalingOffsetVector3Read/WriteGets or sets the scaling offset.
ScalingPivotVector3Read/WriteGets or sets the scaling pivot.
PreRotationVector3Read/WriteGets or sets the pre rotation.
RotationOffsetVector3Read/WriteGets or sets the rotation offset.
RotationPivotVector3Read/WriteGets or sets the rotation pivot.
PostRotationVector3Read/WriteGets or sets the post rotation.
EulerAnglesVector3Read/WriteGets or sets the euler angles.
RotationQuaternionRead/WriteGets or sets the rotation.
TransformMatrixMatrix4Read/WriteGets or sets the transform matrix.
GeometricTranslationVector3Read/WriteGets or sets the geometric translation.
GeometricScalingVector3Read/WriteGets or sets the geometric scaling.
GeometricRotationVector3Read/WriteGets or sets the geometric rotation.
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the properties.
SignatureDescription
SetGeometricTranslation(x: double, y: double, z: double)Sets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
SetGeometricScaling(sx: double, sy: double, sz: double)Sets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
SetGeometricRotation(rx: double, ry: double, rz: double)Sets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
SetTranslation(tx: double, ty: double, tz: double)Sets the translation of current transform.
SetScale(sx: double, sy: double, sz: double)Sets the scale of current transform.
SetEulerAngles(rx: double, ry: double, rz: double)Sets the Euler angles in degrees of current transform.
SetRotation(rw: double, rx: double, ry: double, rz: double)Sets the rotation(as quaternion components) of current transform.
SetPreRotation(rx: double, ry: double, rz: double)Sets the pre-rotation represented in degree
SetPostRotation(rx: double, ry: double, rz: double)Sets the post-rotation represented in degree
A3DObject()
RemoveProperty(property: Property)Removes a dynamic property.
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Xem thêm

 Tiếng Việt