Summary

A struct containing a position, rotation and scale. This is commonly used in engine to describe entity position, bone position and scene object position.

Constructors

Transform

Fields

Position Position of the transform.
Rotation Rotation of this transform.
Scale Scale of the transform. Does not itself scale Transform.Position or Transform.Rotation.

Properties

Backward
Down
Forward
ForwardRay Return a ray from this transform, which goes from the center along the Forward
IsValid Returns true if position, scale and rotation are valid
Left
Right
UniformScale A uniform scale component. Generally the scale is uniform, and we'll just access the .x component.
Up

Methods

Add Add a position to this transform and return the result.
AlmostEqual Returns true if we're nearly equal to the passed transform.
LerpTo Linearly interpolate from this transform to given transform.
Mirror Create a transform that is the mirror of this
NormalToLocal Convert a world normal to a local normal
NormalToWorld Convert a local normal to a world normal
PointToLocal Convert a point in world space to a point in this transform's local space
PointToWorld Convert a point in this transform's local space to a point in world space
RotateAround Rotate this transform around given point by given rotation and return the result.
RotationToLocal Convert a world rotation to a local rotation
RotationToWorld Convert a local rotation to a world rotation
ToLocal Convert child transform from the world to a local transform
ToWorld Convert child transform from local to the world
WithPosition Return this transform with a new position.
WithRotation Return this transform with a new rotation.
WithScale Return this transform with a new scale.

Static Fields

Zero Represents a zero transform, that being, a transform with scale of 1, position of Vector3.Zero and rotation of Rotation.Identity.

Static Methods

Concat Concatenate (add together) the 2 given transforms and return a new resulting transform.
Lerp Perform linear interpolation from one transform to another.
Parse Given a string, try to convert this into a transform. The format is <c>"px,py,pz,rx,ry,rz,rw"</c>.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.