struct Transform
in global
A struct containing a position, rotation and scale. This is commonly used in engine to describe entity position, bone position and scene object position.
public static Transform Zero
Represents a zero transform, that being, a transform with scale of 1, position of and rotation of .
public Vector3 Position
Position of the transform.
public Vector3 Scale
Scale of the transform. Does not itself scale or .
public float UniformScale { get; set; }
A uniform scale component. Generally the scale is uniform, and we'll just access the .x component.
public Rotation Rotation
Rotation of this transform.
public bool IsValid { get; }
Returns true if position, scale and rotation are valid
public Vector3 PointToLocal( ref Vector3 worldPoint )
Convert a point in world space to a point in this transform's local space
public Vector3 NormalToLocal( ref Vector3 worldNormal )
Convert a world normal to a local normal
public Rotation RotationToLocal( ref Rotation worldRot )
Convert a world rotation to a local rotation
public Vector3 PointToWorld( ref Vector3 localPoint )
Convert a point in this transform's local space to a point in world space
public Vector3 NormalToWorld( ref Vector3 localNormal )
Convert a local normal to a world normal
public Rotation RotationToWorld( ref Rotation localRotation )
Convert a local rotation to a world rotation
public Transform ToLocal( ref Transform child )
Convert child transform from the world to a local transform
public Transform ToWorld( ref Transform child )
Convert child transform from local to the world
public static Transform Lerp( ref Transform a, ref Transform b, float t, bool clamp )
Perform linear interpolation from one transform to another.
public Transform LerpTo( ref Transform target, float t, bool clamp = True )
Linearly interpolate from this transform to given transform.
public Transform Add( ref Vector3 position, bool worldSpace )
Add a position to this transform and return the result.
public Transform WithPosition( ref Vector3 position )
Return this transform with a new position.
public Transform WithPosition( ref Vector3 position, ref Rotation rotation )
Return this transform with a new position and rotation
public Transform WithRotation( ref Rotation rotation )
Return this transform with a new rotation.
public Transform WithScale( float scale )
Return this transform with a new scale.
public Transform WithScale( ref Vector3 scale )
Return this transform with a new scale.
public Ray ForwardRay { get; }
Return a ray from this transform, which goes from the center along the Forward
public Transform RotateAround( ref Vector3 center, ref Rotation rot )
Rotate this transform around given point by given rotation and return the result.
centerPoint to rotate around.rotHow much to rotate by. can be useful.- Returns The rotated transform.
public static Transform Concat( Transform parent, Transform local )
Concatenate (add together) the 2 given transforms and return a new resulting transform.
public static Transform Parse( string str )
Given a string, try to convert this into a transform. The format is "px,py,pz,rx,ry,rz,rw".
public bool AlmostEqual( ref Transform tx, float delta = 0.0001 )
Returns true if we're nearly equal to the passed transform.
txThe value to compare withdeltaThe max difference between component values- Returns True if nearly equal
public Vector3 Down { get; }
😔 No documentation found.
public Vector3 Forward { get; }
😔 No documentation found.
public Vector3 Backward { get; }
😔 No documentation found.
public Transform( Vector3 position, Rotation rotation, Vector3 scale )
😔 No documentation found.
public Transform( Vector3 position, Rotation rotation, float scale = 1 )
😔 No documentation found.
public Transform( )
😔 No documentation found.
public Transform( Vector3 pos = null )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public bool Equals( Transform o )
😔 No documentation found.
public Vector3 Left { get; }
😔 No documentation found.
public bool Equals( object obj )
😔 No documentation found.
public static bool op_Inequality( Transform left, Transform right )
😔 No documentation found.
public static bool op_Equality( Transform left, Transform right )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public Vector3 Up { get; }
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.
public Vector3 Right { get; }
😔 No documentation found.