The Transform struct is a fundamental component in the s&box engine, encapsulating a position, rotation, and scale. It is widely used to define 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 define 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. |
Add | Adds a position to the transform, optionally in world space. |
WithPosition | Sets the position of the transform. |
WithRotation | Sets the rotation of the transform. |
WithScale | Sets the scale of the transform. |
RotateAround | Rotates the transform around a specified point. |
Property Name | Summary |
---|---|
UniformScale | A uniform scale component, typically accessed via the x component. |
Forward | Gets the forward direction of the transform. |
Backward | Gets the backward direction of the transform. |
Up | Gets the upward direction of the transform. |
Down | Gets the downward direction of the transform. |
Right | Gets the rightward direction of the transform. |
Left | Gets the leftward direction of the transform. |
IsValid | Indicates if the transform's position, scale, and rotation are valid. |
ForwardRay | Returns a ray from the transform's center along the forward direction. |
Field Name | Summary |
---|---|
Position | Position of the transform. |
Scale | Scale of the transform, not affecting position or rotation. |
Rotation | Rotation of the transform. |