public class Transform
- Object
- Transform
A transform contains translation and rotation. It is used to represent the position and
orientation of rigid frames.
Fields
public final Vec2 p | The translation caused by the transform |
public final Rot q | A matrix representing a rotation |
Constructors
public Transform() | The default constructor. |
public Transform(Transform xf) | Initialize as a copy of another transform. |
public Transform(Vec2 _position, Rot _R) | Initialize using a position vector and a rotation matrix. |
Methods
Inherited methods
Field details
p
public final Vec2 pThe translation caused by the transform
q
public final Rot qA matrix representing a rotation
Constructor details
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 details
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.
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()Returns a string representation of the object. In general, the toString method returns a string that “textually represents” this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
getClass().getName() + ‘@’ + Integer.toHexString(hashCode())