s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Common Structs
Transform
chevron_left
Common Structs
struct
Transform
search
Constructors
functions
Transform
Fields
crop_din
Position
crop_din
Rotation
crop_din
Scale
Properties
data_object
Backward
data_object
Down
data_object
Forward
data_object
ForwardRay
data_object
IsValid
data_object
Left
data_object
Right
data_object
UniformScale
data_object
Up
Methods
functions
Add
functions
AlmostEqual
functions
LerpTo
functions
Mirror
functions
NormalToLocal
functions
NormalToWorld
functions
PointToLocal
functions
PointToWorld
functions
RotateAround
functions
RotationToLocal
functions
RotationToWorld
functions
ToLocal
functions
ToWorld
functions
WithPosition
functions
WithRotation
functions
WithScale
Static Fields
crop_din
Zero
Static Methods
functions
Concat
functions
Lerp
functions
Parse
menu
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.
struct
sealed
Sandbox.System
build
Constructors
1
Transform
(
pos
)
crop_din
Fields
3
Position
Vector3
Position of the transform.
Rotation
Rotation
Rotation of this transform.
Scale
Vector3
Scale of the transform. Does not itself scale Transform.Position or Transform.Rotation.
data_object
Properties
9
Backward
Vector3
Down
Vector3
Forward
Vector3
ForwardRay
Ray
Return a ray from this transform, which goes from the center along the Forward
IsValid
bool
Returns true if position, scale and rotation are valid
Left
Vector3
Right
Vector3
UniformScale
float
A uniform scale component. Generally the scale is uniform, and we'll just access the .x component.
Up
Vector3
functions
Methods
16
Add
(
position
,
worldSpace
)
Transform
Add a position to this transform and return the result.
AlmostEqual
(
tx
,
delta
)
bool
Returns true if we're nearly equal to the passed transform.
LerpTo
(
target
,
t
,
clamp
)
Transform
Linearly interpolate from this transform to given transform.
Mirror
(
plane
)
Transform
Create a transform that is the mirror of this
NormalToLocal
(
worldNormal
)
Vector3
Convert a world normal to a local normal
NormalToWorld
(
localNormal
)
Vector3
Convert a local normal to a world normal
PointToLocal
(
worldPoint
)
Vector3
Convert a point in world space to a point in this transform's local space
PointToWorld
(
localPoint
)
Vector3
Convert a point in this transform's local space to a point in world space
RotateAround
(
center
,
rot
)
Transform
Rotate this transform around given point by given rotation and return the result.
RotationToLocal
(
worldRot
)
Rotation
Convert a world rotation to a local rotation
RotationToWorld
(
localRotation
)
Rotation
Convert a local rotation to a world rotation
ToLocal
(
child
)
Transform
Convert child transform from the world to a local transform
ToWorld
(
child
)
Transform
Convert child transform from local to the world
WithPosition
(
position
)
Transform
Return this transform with a new position.
WithRotation
(
rotation
)
Transform
Return this transform with a new rotation.
WithScale
(
scale
)
Transform
Return this transform with a new scale.
crop_din
Static Fields
1
Zero
Transform
Represents a zero transform, that being, a transform with scale of 1, position of Vector3.Zero and rotation of Rotation.Identity.
functions
Static Methods
3
Concat
(
parent
,
local
)
Transform
Concatenate (add together) the 2 given transforms and return a new resulting transform.
Lerp
(
a
,
b
,
t
,
clamp
)
Transform
Perform linear interpolation from one transform to another.
Parse
(
str
)
Transform
Given a string, try to convert this into a transform. The format is
"px,py,pz,rx,ry,rz,rw"
.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.