struct Transform

book_4_sparkGenerated
code_blocksInput

Description

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.

Members

Static Members

Member NameSummary
ZeroRepresents a zero transform, with a scale of 1, position of Vector3.Zero, and rotation of Rotation.Identity.
LerpInterpolates between two transforms.
ConcatConcatenates two transforms.
ParseParses a string to create a transform.

Instance Members

Member NameSummary
PointToLocalConverts a world point to local space.
NormalToLocalConverts a world normal to local space.
RotationToLocalConverts a world rotation to local space.
PointToWorldConverts a local point to world space.
NormalToWorldConverts a local normal to world space.
RotationToWorldConverts a local rotation to world space.
ToLocalConverts a child transform to local space.
ToWorldConverts a child transform to world space.
LerpToInterpolates this transform towards a target transform.
AddAdds a position to this transform.
WithPositionSets the position of this transform.
WithRotationSets the rotation of this transform.
WithScaleSets the scale of this transform.
RotateAroundRotates this transform around a specified point.

Properties

Member NameSummary
UniformScaleA uniform scale component, typically accessed via the .x component.
ForwardThe forward direction vector of the transform.
BackwardThe backward direction vector of the transform.
UpThe upward direction vector of the transform.
DownThe downward direction vector of the transform.
RightThe right direction vector of the transform.
LeftThe left direction vector of the transform.
IsValidIndicates if the position, scale, and rotation are valid.
ForwardRayReturns a ray from this transform, extending along the forward direction.
PositionThe position of the transform.
ScaleThe scale of the transform.
RotationThe rotation of the transform.