Package org.jbox2d.common
Class Transform
- java.lang.Object
-
- org.jbox2d.common.Transform
-
- All Implemented Interfaces:
java.io.Serializable
public class Transform extends java.lang.Object implements java.io.SerializableA transform contains translation and rotation. It is used to represent the position and orientation of rigid frames.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Transformmul(Transform A, Transform B)static Vec2mul(Transform T, Vec2 v)static voidmulToOut(Transform A, Transform B, Transform out)static voidmulToOut(Transform T, Vec2 v, Vec2 out)static voidmulToOutUnsafe(Transform A, Transform B, Transform out)static voidmulToOutUnsafe(Transform T, Vec2 v, Vec2 out)static TransformmulTrans(Transform A, Transform B)static Vec2mulTrans(Transform T, Vec2 v)static voidmulTransToOut(Transform A, Transform B, Transform out)static voidmulTransToOut(Transform T, Vec2 v, Vec2 out)static voidmulTransToOutUnsafe(Transform A, Transform B, Transform out)static voidmulTransToOutUnsafe(Transform T, Vec2 v, Vec2 out)Transformset(Transform xf)Set this to equal another transform.voidset(Vec2 p, float angle)Set this based on the position and angle.voidsetIdentity()Set this to the identity transform.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
p
public final Vec2 p
The translation caused by the transform
-
q
public final Rot q
A matrix representing a rotation
-
pool
private static Vec2 pool
-
-
Method Detail
-
set
public final void set(Vec2 p, float angle)
Set this based on the position and angle.- Parameters:
p-angle-
-
setIdentity
public final void setIdentity()
Set this to the identity transform.
-
mulTransToOutUnsafe
public static final void mulTransToOutUnsafe(Transform A, Transform B, Transform out)
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-