org.jbox2d.common
Class XForm

java.lang.Object
  extended by org.jbox2d.common.XForm

public class XForm
extends Object

A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames.


Field Summary
static XForm identity
           
 Vec2 position
          The translation caused by the transform
 Mat22 R
          A matrix representing a rotation
 
Constructor Summary
XForm()
          The default constructor.
XForm(Vec2 _position, Mat22 _R)
          Initialize using a position vector and a rotation matrix.
XForm(XForm xf)
          Initialize as a copy of another transform.
 
Method Summary
static Vec2 mul(XForm T, Vec2 v)
           
static void mulToOut(XForm T, Vec2 v, Vec2 out)
           
static Vec2 mulTrans(XForm T, Vec2 v)
           
static void mulTransToOut(XForm T, Vec2 v, Vec2 out)
           
 void set(XForm xf)
          Set this to equal another transform.
 void setIdentity()
          Set this to the identity transform.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

position

public Vec2 position
The translation caused by the transform


R

public Mat22 R
A matrix representing a rotation


identity

public static XForm identity
Constructor Detail

XForm

public XForm()
The default constructor.


XForm

public XForm(XForm xf)
Initialize as a copy of another transform.


XForm

public XForm(Vec2 _position,
             Mat22 _R)
Initialize using a position vector and a rotation matrix.

Method Detail

set

public final void set(XForm xf)
Set this to equal another transform.


setIdentity

public final void setIdentity()
Set this to the identity transform.


mul

public static final Vec2 mul(XForm T,
                             Vec2 v)

mulToOut

public static final void mulToOut(XForm T,
                                  Vec2 v,
                                  Vec2 out)

mulTrans

public static final Vec2 mulTrans(XForm T,
                                  Vec2 v)

mulTransToOut

public static final void mulTransToOut(XForm T,
                                       Vec2 v,
                                       Vec2 out)

toString

public final String toString()
Overrides:
toString in class Object