Struct b2Transform
public struct b2Transform
- Inherited Members
- Extension Methods
Remarks
Reference: Box2D/Common/b2Math.h.
Constructors
b2Transform(b2Vec2, b2Rot)
A transform of the given translation and rotation.
public b2Transform(b2Vec2 position, b2Rot rotation)
Parameters
Fields
p
The translation.
public b2Vec2 p
Field Value
q
The rotation.
public b2Rot q
Field Value
Properties
angle
The rotation's angle in radians (pybox2d's angle).
public float angle { readonly get; set; }
Property Value
position
The translation (pybox2d's position, Box2D's p).
public b2Vec2 position { readonly get; set; }
Property Value
Methods
Set(b2Vec2, float)
Sets the translation and the rotation's angle.
public void Set(b2Vec2 position, float angle)
Parameters
SetIdentity()
Sets this to the identity transform.
public void SetIdentity()
Operators
operator *(b2Transform, b2Vec2)
Maps a local point into the frame, as pybox2d's b2Transform.mul computes it:
(q.c * v.x - q.s * v.y) + p.x and (q.s * v.x + q.c * v.y) + p.y in float32. Gymnasium's
renderers place every fixture vertex with it.
public static b2Vec2 operator *(b2Transform t, b2Vec2 v)
Parameters
tb2TransformThe transform.
vb2Vec2The local point.
Returns
- b2Vec2
The world point.