org.jbox2d.common
Class Transform

java.lang.Object
  extended by org.jbox2d.common.Transform
All Implemented Interfaces:
Serializable

public class Transform
extends Object
implements Serializable

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

See Also:
Serialized Form

Field Summary
 Vec2 p
          The translation caused by the transform
 Rot q
          A matrix representing a rotation
 
Constructor Summary
Transform()
          The default constructor.
Transform(Transform xf)
          Initialize as a copy of another transform.
Transform(Vec2 _position, Rot _R)
          Initialize using a position vector and a rotation matrix.
 
Method Summary
static Transform mul(Transform A, Transform B)
           
static Vec2 mul(Transform T, Vec2 v)
           
static void mulToOut(Transform A, Transform B, Transform out)
           
static void mulToOut(Transform T, Vec2 v, Vec2 out)
           
static void mulToOutUnsafe(Transform A, Transform B, Transform out)
           
static void mulToOutUnsafe(Transform T, Vec2 v, Vec2 out)
           
static Transform mulTrans(Transform A, Transform B)
           
static Vec2 mulTrans(Transform T, Vec2 v)
           
static void mulTransToOut(Transform A, Transform B, Transform out)
           
static void mulTransToOut(Transform T, Vec2 v, Vec2 out)
           
static void mulTransToOutUnsafe(Transform A, Transform B, Transform out)
           
static void mulTransToOutUnsafe(Transform T, Vec2 v, Vec2 out)
           
 Transform set(Transform xf)
          Set this to equal another transform.
 void set(Vec2 p, float angle)
          Set this based on the position and angle.
 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

p

public final Vec2 p
The translation caused by the transform


q

public final Rot q
A matrix representing a rotation

Constructor Detail

Transform

public Transform()
The default constructor.


Transform

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


Transform

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

Method Detail

set

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


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.


mul

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

mulToOut

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

mulToOutUnsafe

public static final void mulToOutUnsafe(Transform T,
                                        Vec2 v,
                                        Vec2 out)

mulTrans

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

mulTransToOut

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

mulTransToOutUnsafe

public static final void mulTransToOutUnsafe(Transform T,
                                             Vec2 v,
                                             Vec2 out)

mul

public static final Transform mul(Transform A,
                                  Transform B)

mulToOut

public static final void mulToOut(Transform A,
                                  Transform B,
                                  Transform out)

mulToOutUnsafe

public static final void mulToOutUnsafe(Transform A,
                                        Transform B,
                                        Transform out)

mulTrans

public static final Transform mulTrans(Transform A,
                                       Transform B)

mulTransToOut

public static final void mulTransToOut(Transform A,
                                       Transform B,
                                       Transform out)

mulTransToOutUnsafe

public static final void mulTransToOutUnsafe(Transform A,
                                             Transform B,
                                             Transform out)

toString

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


Copyright © 2013. All Rights Reserved.