Class Transform

Transform class

A transform contains information that allow access to object’s translate/scale/rotation or transform matrix at minimum cost This is used by local transform.

public class Transform : A3DObject

Properties

NameDescription
EulerAngles { get; set; }Gets or sets the rotation represented in Euler angles, measured in degree
GeometricRotation { get; set; }Gets or 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.
GeometricScaling { get; set; }Gets or 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.
GeometricTranslation { get; set; }Gets or 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.
virtual Name { get; set; }Gets or sets the name.(Inherited from A3DObject.)
PostRotation { get; set; }Gets or sets the post-rotation represented in degree
PreRotation { get; set; }Gets or sets the pre-rotation represented in degree
Properties { get; }Gets the collection of all properties.(Inherited from A3DObject.)
Rotation { get; set; }Gets or sets the rotation represented in quaternion.
RotationOffset { get; set; }Gets or sets the rotation offset
RotationPivot { get; set; }Gets or sets the rotation pivot
Scaling { get; set; }Gets or sets the scaling
ScalingOffset { get; set; }Gets or sets the scaling offset
ScalingPivot { get; set; }Gets or sets the scaling pivot
TransformMatrix { get; set; }Gets or sets the transform matrix.
Translation { get; set; }Gets or sets the translation

Methods

NameDescription
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)(Inherited from A3DObject.)
GetProperty(string)Get the value of specified property(Inherited from A3DObject.)
RemoveProperty(Property)Removes a dynamic property.(Inherited from A3DObject.)
RemoveProperty(string)Remove the specified property identified by name(Inherited from A3DObject.)
SetEulerAngles(double, double, double)Sets the Euler angles in degrees of current transform.
SetGeometricRotation(double, double, 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.
SetGeometricScaling(double, double, 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.
SetGeometricTranslation(double, double, 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.
SetPostRotation(double, double, double)Sets the post-rotation represented in degree
SetPreRotation(double, double, double)Sets the pre-rotation represented in degree
SetProperty(string, object)Sets the value of specified property(Inherited from A3DObject.)
SetRotation(double, double, double, double)Sets the rotation(as quaternion components) of current transform.
SetScale(double, double, double)Sets the scale of current transform.
SetTranslation(double, double, double)Sets the translation of current transform.

Examples

The following code shows how to change the transform of the node:

Scene scene = new Scene();
var boxNode = scene.RootNode.CreateChildNode(new Box());
//place the box at (10, 0, 0)
boxNode.Transform.Translation = new Vector3(10, 0, 0);

See Also