4.7 KiB
Class: Transform
A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames. Initialize using a position vector and a rotation.
Constructors
new Transform()
new Transform(
position?,rotation?):Transform
Parameters
• position?: Vec2Value
• rotation?: number
Returns
Properties
p
p:
Vec2
position
q
q:
Rot
rotation
Methods
set()
set(position, rotation)
set(
position,rotation):void
Set position and angle
Parameters
• position: Vec2Value
• rotation: number
Returns
void
set(xf)
set(
xf):void
Copy from another transform
Parameters
• xf: TransformValue
Returns
void
setIdentity()
setIdentity():
void
Set this to the identity transform
Returns
void
setNum()
setNum(
position,rotation):void
Set position and angle
Parameters
• position: Vec2Value
• rotation: number
Returns
void
setTransform()
setTransform(
xf):void
Parameters
• xf: TransformValue
Returns
void
assert()
staticassert(o):void
Parameters
• o: any
Returns
void
clone()
staticclone(xf):Transform
Parameters
• xf: Transform
Returns
identity()
staticidentity():Transform
Returns
isValid()
staticisValid(obj):boolean
Parameters
• obj: any
Returns
boolean
mul()
mul(a, b)
staticmul(a,b):Vec2
Parameters
• a: TransformValue
• b: Vec2Value
Returns
mul(a, b)
staticmul(a,b):Transform
Parameters
• a: TransformValue
• b: TransformValue
Returns
mulAll()
mulAll(a, b)
staticmulAll(a,b):Vec2[]
Parameters
• a: Transform
• b: Vec2Value[]
Returns
Vec2[]
mulAll(a, b)
staticmulAll(a,b):Transform[]
Parameters
• a: Transform
• b: Transform[]
Returns
mulT()
mulT(a, b)
staticmulT(a,b):Vec2
Parameters
• a: TransformValue
• b: Vec2Value
Returns
mulT(a, b)
staticmulT(a,b):Transform
Parameters
• a: TransformValue
• b: TransformValue
Returns
mulTVec2()
staticmulTVec2(a,b):Vec2
Parameters
• a: TransformValue
• b: Vec2Value
Returns
mulTXf()
staticmulTXf(a,b):Transform
Parameters
• a: TransformValue
• b: TransformValue
Returns
mulVec2()
staticmulVec2(a,b):Vec2
Parameters
• a: TransformValue
• b: Vec2Value
Returns
mulXf()
staticmulXf(a,b):Transform
Parameters
• a: TransformValue
• b: TransformValue