The Transform struct is a fundamental component in the s&box engine, encapsulating a position, rotation, and scale. It is widely used to describe the spatial properties of entities, bones, and scene objects.
The Transform struct is a fundamental component in the s&box engine, encapsulating a position, rotation, and scale. It is widely used to describe the spatial properties of entities, bones, and scene objects.
Member Name | Summary |
---|---|
Zero | Represents a zero transform, with a scale of 1, position of Vector3.Zero, and rotation of Rotation.Identity. |
Lerp | Interpolates between two transforms. |
Concat | Concatenates two transforms. |
Parse | Parses a string to create a transform. |
Member Name | Summary |
---|---|
PointToLocal | Converts a world point to local space. |
NormalToLocal | Converts a world normal to local space. |
RotationToLocal | Converts a world rotation to local space. |
PointToWorld | Converts a local point to world space. |
NormalToWorld | Converts a local normal to world space. |
RotationToWorld | Converts a local rotation to world space. |
ToLocal | Converts a child transform to local space. |
ToWorld | Converts a child transform to world space. |
LerpTo | Interpolates this transform towards a target transform. |
Add | Adds a position to this transform. |
WithPosition | Sets the position of this transform. |
WithRotation | Sets the rotation of this transform. |
WithScale | Sets the scale of this transform. |
RotateAround | Rotates this transform around a specified point. |
Member Name | Summary |
---|---|
UniformScale | A uniform scale component, typically accessed via the .x component. |
Forward | The forward direction vector of the transform. |
Backward | The backward direction vector of the transform. |
Up | The upward direction vector of the transform. |
Down | The downward direction vector of the transform. |
Right | The right direction vector of the transform. |
Left | The left direction vector of the transform. |
IsValid | Indicates if the position, scale, and rotation are valid. |
ForwardRay | Returns a ray from this transform, extending along the forward direction. |
Position | The position of the transform. |
Scale | The scale of the transform. |
Rotation | The rotation of the transform. |