# Transform

A struct containing a position, rotation and scale. This is commonly used in engine to describe
entity position, bone position and scene object position.

- Kind: struct
- Assembly: `Sandbox.System`
- Modifiers: sealed

## Constructors

- [`Transform`](/api/Transform/.ctor)

## Fields

- [`Position`](/api/Transform/Position): Position of the transform.
- [`Rotation`](/api/Transform/Rotation): Rotation of this transform.
- [`Scale`](/api/Transform/Scale): Scale of the transform. Does not itself scale [Transform.Position](/api/Transform/Position) or [Transform.Rotation](/api/Transform/Rotation).
- [`Zero`](/api/Transform/Zero): Represents a zero transform, that being, a transform with scale of 1, position of [Vector3.Zero](/api/Vector3/Zero) and rotation of [Rotation.Identity](/api/Rotation/Identity).

## Properties

- [`Backward`](/api/Transform/Backward)
- [`Down`](/api/Transform/Down)
- [`Forward`](/api/Transform/Forward)
- [`ForwardRay`](/api/Transform/ForwardRay): Return a ray from this transform, which goes from the center along the Forward
- [`IsValid`](/api/Transform/IsValid): Returns true if position, scale and rotation are valid
- [`Left`](/api/Transform/Left)
- [`Right`](/api/Transform/Right)
- [`UniformScale`](/api/Transform/UniformScale): A uniform scale component. Generally the scale is uniform, and we'll just access the .x component.
- [`Up`](/api/Transform/Up)

## Methods

- [`Add`](/api/Transform/Add): Add a position to this transform and return the result.
- [`AlmostEqual`](/api/Transform/AlmostEqual): Returns true if we're nearly equal to the passed transform.
- [`Concat`](/api/Transform/Concat): Concatenate (add together) the 2 given transforms and return a new resulting transform.
- [`Lerp`](/api/Transform/Lerp): Perform linear interpolation from one transform to another.
- [`LerpTo`](/api/Transform/LerpTo): Linearly interpolate from this transform to given transform.
- [`Mirror`](/api/Transform/Mirror): Create a transform that is the mirror of this
- [`NormalToLocal`](/api/Transform/NormalToLocal): Convert a world normal to a local normal
- [`NormalToWorld`](/api/Transform/NormalToWorld): Convert a local normal to a world normal
- [`Parse`](/api/Transform/Parse): Given a string, try to convert this into a transform. The format is `"px,py,pz,rx,ry,rz,rw"`.
- [`PointToLocal`](/api/Transform/PointToLocal): Convert a point in world space to a point in this transform's local space
- [`PointToWorld`](/api/Transform/PointToWorld): Convert a point in this transform's local space to a point in world space
- [`RotateAround`](/api/Transform/RotateAround): Rotate this transform around given point by given rotation and return the result.
- [`RotationToLocal`](/api/Transform/RotationToLocal): Convert a world rotation to a local rotation
- [`RotationToWorld`](/api/Transform/RotationToWorld): Convert a local rotation to a world rotation
- [`ToLocal`](/api/Transform/ToLocal): Convert child transform from the world to a local transform
- [`ToWorld`](/api/Transform/ToWorld): Convert child transform from local to the world
- [`WithPosition`](/api/Transform/WithPosition): Return this transform with a new position.
- [`WithRotation`](/api/Transform/WithRotation): Return this transform with a new rotation.
- [`WithScale`](/api/Transform/WithScale): Return this transform with a new scale.
