Click or drag to resize
Ab4d.SharpEngine logo

StandardTransform Class

StandardTransform defines a standard translate, rotate and scale transform. Rotate transform is defined by using rotation around x, y and z axes. To use quaternion rotation use the StandardQuaternionTransform. The scale and rotation is done by an optional PivotPoint.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.TransformationsTransform
    Ab4d.SharpEngine.TransformationsStandardTransform

Namespace: Ab4d.SharpEngine.Transformations
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class StandardTransform : Transform

The StandardTransform type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyPivotPoint Gets or sets a nullable Vector3 that sets a custom center of rotation and custom scale origin. For example, this can set to the center of the object's mesh (get by GetCenterPosition(Boolean, Boolean) method). PivotPoint is null by default. In this case all rotations and scales are done from the coordinate origin (0, 0, 0).
Public propertyRotateX Gets or sets a float that specified the rotation angle in degrees around the X axis (Attitude in SphericalCamera). By default the object is rotated around (0, 0, 0) position. To use a custom center of rotation set PivotPoint property, for example, this can set to the center of the object's mesh (get by GetMeshBoundingBox(Boolean) method).
Public propertyRotateY Gets or sets a float that specified the rotation angle in degrees around the Y axis (Heading in SphericalCamera). By default the object is rotated around (0, 0, 0) position. To use a custom center of rotation set PivotPoint property, for example, this can set to the center of the object's mesh (get by GetMeshBoundingBox(Boolean) method).
Public propertyRotateZ Gets or sets a float that specified the rotation angle in degrees around the Z axis (Bank in SphericalCamera). By default the object is rotated around (0, 0, 0) position. To use a custom center of rotation set PivotPoint property, for example, this can set to the center of the object's mesh (get by GetMeshBoundingBox(Boolean) method).
Public propertyScaleX Gets or sets a float that specified the scale in the direction of the X axis. By default the object is scaled from (0, 0, 0) position. To use a custom scale origin set PivotPoint property, for example, this can set to the center of the object's BoundingBox.
Public propertyScaleY Gets or sets a float that specified the scale in the direction of the Y axis. By default the object is scaled from (0, 0, 0) position. To use a custom scale origin set PivotPoint property, for example, this can set to the center of the object's BoundingBox.
Public propertyScaleZ Gets or sets a float that specified the scale in the direction of the Z axis. By default the object is scaled from (0, 0, 0) position. To use a custom scale origin set PivotPoint property, for example, this can set to the center of the object's BoundingBox.
Public propertyTranslateX Gets or sets a float that specified the translation in X direction.
Public propertyTranslateY Gets or sets a float that specified the translation in Y direction.
Public propertyTranslateZ Gets or sets a float that specified the translation in X direction.
Top
Methods
 NameDescription
Public methodGetAverageScale Returns an average scale that is calculated by averaging the ScaleX, ScaleY and ScaleZ.
Public methodGetScaleFactors Returns a Vector3 created from ScaleX, ScaleY, ScaleZ properties.
Public methodGetTranslateVector Returns a Vector3 created from TranslateX, TranslateY and TranslateZ properties.
Public methodGetTranslateVector3DObsolete.
Returns a Vector3 created from TranslateX, TranslateY and TranslateZ properties.
Public methodMove(Vector3) Updates the translate transformation by moving for the specified offsets and updates the transformation matrix.
Public methodMove(Single, Single, Single) Updates the translate transformation by moving for the specified offsets and updates the transformation matrix.
Public methodReset Reset method sets all translation and rotation to zero and all scales to 1.
Public methodRotate Adjusts the rotation angles for the specified rotation angles and updates the transformation matrix.
Public methodScale(Single) Scales the existing transformation by multiplying the current scale factors with the specified scaleFactor and updates the transformation matrix.
Public methodScale(Single, Single, Single) Scales the existing transformation by multiplying the current scale factors with the specified scale factors and updates the transformation matrix.
Public methodSetRotate Sets rotation angles to the specified values and updates the transformation matrix.
Public methodSetScale(Single) Sets scale factor for all x, y and z scale factors to the specified scale and updates the transformation matrix.
Public methodSetScale(Vector3) Sets the scale factors to the specified values and updates the transformation matrix.
Public methodSetScale(Single, Single, Single) Sets the scale factors to the specified values and updates the transformation matrix.
Public methodSetTranslate(Vector3) Sets translate transformation values to the specified values and updates the transformation matrix.
Public methodSetTranslate(Single, Single, Single) Sets translate transformation values to the specified values and updates the transformation matrix.
Public methodToString
(Overrides ObjectToString)
Protected methodUpdateMatrix Updates the Matrix4x4 that defines this transformation and is set to Value property.
Top
See Also