net.java.dev.joode.joint
Class JointConfigurable

java.lang.Object
  extended by net.java.dev.joode.WorldObject
      extended by net.java.dev.joode.joint.Joint
          extended by net.java.dev.joode.joint.JointConfigurable
All Implemented Interfaces:
java.io.Serializable, SimState

public class JointConfigurable
extends Joint

Author:
tom larkworthy
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.java.dev.joode.joint.Joint
Joint.Info1, Joint.Info2
 
Field Summary
static Vector3 a
           
static Vector3 a1
           
static Vector3 a2
           
 Vector3 anchor1
          body relative anchor point from the first body
 Vector3 anchor2
          body relative anchor point from the second body
 Vector3 angularCFM
           
 Vector3 angularERP
           
static Vector3 angularError
           
static Vector3 b1VelF2
           
static Vector3 b2VelF2
           
static Vector3 c
           
 Vector3 c0
           
static Vector3 c1
           
static Vector3 c2
           
 Vector3 ch
           
static Quaternion change1
           
static Quaternion change2
           
static Vector3 g1
           
static Vector3 g2
           
static Quaternion identity
           
static Matrix3 J1
           
static Matrix3 J2
           
 Vector3 jerkA3
           
 Vector3 jerkA4
           
 Vector3 linearCFM
           
 Vector3 linearERP
           
static Quaternion midpoint
           
static Matrix3 O1
           
static Matrix3 O2
           
 Matrix3 rotM
           
 Quaternion rotQ
           
static Matrix3 T
           
 Matrix3 t2
          additional rotational transform to apply to the second body or global frame to work out frame2 this is so that the axis do not have to align with body axis
static Quaternion tmpA
           
static Quaternion tmpB
           
static Quaternion tmpC
           
static Vector3 tmpV
           
static Vector3 tmpVa
           
static Vector3 tmpVb
           
static Vector3 tmpVc
           
static Quaternion Tq
           
 
Fields inherited from class net.java.dev.joode.joint.Joint
body, dJOINT_INGROUP, dJOINT_REVERSE, dJOINT_TWOBODIES, feedback, flags, lambda, MAX_BODIES
 
Fields inherited from class net.java.dev.joode.WorldObject
data, tag, world
 
Constructor Summary
JointConfigurable(World w)
           
 
Method Summary
 SimState cloneState(ClonedReferences util)
           deep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object.
 Vector3 convertFrame1CoordsToGlobalCoords(Vector3 relative, Vector3 passback)
          takes relative coordinates, assumed to be in frame 1 (coordinates in relation to the first body), and returns the same coordinates in the global frame using the global origin
 Vector3 convertFrame1CoordsToGlobalFrame(Vector3 relative, Vector3 passback)
          takes relative coordinates, assumed to be in frame 1 (coordinates in relation to the first body), and returns the same coordinates in the global frame.
 Vector3 convertFrame2CoordsToGlobalCoords(Vector3 relative, Vector3 passback)
          takes relative coordinates, assumed to be in frame 2 (coordinates in relation to the second body, or the global frame if there is no second body) and returns the same coordinates in the global frame using the global origin
 Vector3 convertFrame2CoordsToGlobalFrame(Vector3 relative, Vector3 passback)
          takes relative coordinates, assumed to be in frame 2 (coordinates in relation to the second body, or the global frame if there is no second body) and returns the same coordinates in the global frame.
 Vector3 convertGlobalCoordsToFrame1Coords(Vector3 relative, Vector3 passback)
          COORDINATE CONVERSION UTILITY METHODS************? /** takes global frame body relative coordinates, and converts them to body relative body frame coordinates (for frame 1, the first body)
 Vector3 convertGlobalCoordsToFrame2Coords(Vector3 relative, Vector3 passback)
          takes global coordinates, and converts them to body relative body frame coordinates (for frame 2, the second body or global if the second body does not exist)
 Vector3 convertGlobalFrameToFrame2(Vector3 relative, Vector3 passback)
          takes global frame vectors, and converts them to frame2 vectors (for frame 2, the second body or global if the second body does not exist)
 Vector3 getAnchor1InGlobalCoords(Vector3 passback)
          returns the anchor attached to the first body in the global coordinates
 Vector3 getAnchor1InGlobalFrame(Vector3 passback)
          returns the anchor attached to the first body in the global frame of reference
 Vector3 getAnchor2InGlobalCoords(Vector3 passback)
          returns the anchor attached to the second body in global coordinates, or, if no second body is present, the global anchor
 Vector3 getAnchor2InGlobalFrame(Vector3 passback)
          returns the anchor attached to the second body in the global frame of reference, or, if no second body is present, the global anchor
 void getInfo1(Joint.Info1 info1)
           
 void getInfo2(Joint.Info2 jinfo)
          Tells the joint that it has now been fully configured, and ready for use in the dynamics engine
 void setAnchor1(Vector3 vec)
           
 void setAnchor2(Vector3 vec)
           
 void setAngularConstrains(int n)
          either 0, 1 or 3.
 void setLinearConstrains(int n)
           
 
Methods inherited from class net.java.dev.joode.joint.Joint
attach, destroy, partialCloneJoint, removeJointReferencesFromAttachedBodies, reset, setJointId
 
Methods inherited from class net.java.dev.joode.WorldObject
partialCloneWorldObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

J1

public static final Matrix3 J1

J2

public static final Matrix3 J2

O1

public static final Matrix3 O1

O2

public static final Matrix3 O2

T

public static final Matrix3 T

Tq

public static final Quaternion Tq

c1

public static final Vector3 c1

c2

public static final Vector3 c2

tmpV

public static final Vector3 tmpV

tmpVa

public static final Vector3 tmpVa

tmpVb

public static final Vector3 tmpVb

tmpVc

public static final Vector3 tmpVc

a1

public static final Vector3 a1

a2

public static final Vector3 a2

g1

public static final Vector3 g1

g2

public static final Vector3 g2

c

public static final Vector3 c

b1VelF2

public static final Vector3 b1VelF2

b2VelF2

public static final Vector3 b2VelF2

a

public static final Vector3 a

angularError

public static final Vector3 angularError

identity

public static final Quaternion identity

tmpA

public static final Quaternion tmpA

tmpB

public static final Quaternion tmpB

tmpC

public static final Quaternion tmpC

change1

public static final Quaternion change1

change2

public static final Quaternion change2

midpoint

public static final Quaternion midpoint

c0

public final Vector3 c0

ch

public final Vector3 ch

jerkA3

public final Vector3 jerkA3

jerkA4

public final Vector3 jerkA4

anchor1

public final Vector3 anchor1
body relative anchor point from the first body


anchor2

public final Vector3 anchor2
body relative anchor point from the second body


t2

public final Matrix3 t2
additional rotational transform to apply to the second body or global frame to work out frame2 this is so that the axis do not have to align with body axis


rotQ

public final Quaternion rotQ

rotM

public final Matrix3 rotM

linearERP

public final Vector3 linearERP

linearCFM

public final Vector3 linearCFM

angularERP

public final Vector3 angularERP

angularCFM

public final Vector3 angularCFM
Constructor Detail

JointConfigurable

public JointConfigurable(World w)
Method Detail

setAnchor1

public void setAnchor1(Vector3 vec)

setAnchor2

public void setAnchor2(Vector3 vec)

setLinearConstrains

public void setLinearConstrains(int n)

setAngularConstrains

public void setAngularConstrains(int n)
either 0, 1 or 3. 1DOF is not implemented


getInfo1

public void getInfo1(Joint.Info1 info1)
Specified by:
getInfo1 in class Joint

getInfo2

public void getInfo2(Joint.Info2 jinfo)
Tells the joint that it has now been fully configured, and ready for use in the dynamics engine

Specified by:
getInfo2 in class Joint

cloneState

public SimState cloneState(ClonedReferences util)
Description copied from interface: SimState

deep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object. The util object ensures that multiple clones of the same object are not performed during a clone operation.

Parameters:
util - instanciate a new one if top level cloning

convertGlobalCoordsToFrame1Coords

public Vector3 convertGlobalCoordsToFrame1Coords(Vector3 relative,
                                                 Vector3 passback)
COORDINATE CONVERSION UTILITY METHODS************? /** takes global frame body relative coordinates, and converts them to body relative body frame coordinates (for frame 1, the first body)


convertGlobalCoordsToFrame2Coords

public Vector3 convertGlobalCoordsToFrame2Coords(Vector3 relative,
                                                 Vector3 passback)
takes global coordinates, and converts them to body relative body frame coordinates (for frame 2, the second body or global if the second body does not exist)


convertGlobalFrameToFrame2

public Vector3 convertGlobalFrameToFrame2(Vector3 relative,
                                          Vector3 passback)
takes global frame vectors, and converts them to frame2 vectors (for frame 2, the second body or global if the second body does not exist)


convertFrame1CoordsToGlobalFrame

public Vector3 convertFrame1CoordsToGlobalFrame(Vector3 relative,
                                                Vector3 passback)
takes relative coordinates, assumed to be in frame 1 (coordinates in relation to the first body), and returns the same coordinates in the global frame. NOTE although the returned coords use the global frame of reference they are still relative to the first body


convertFrame2CoordsToGlobalFrame

public Vector3 convertFrame2CoordsToGlobalFrame(Vector3 relative,
                                                Vector3 passback)
takes relative coordinates, assumed to be in frame 2 (coordinates in relation to the second body, or the global frame if there is no second body) and returns the same coordinates in the global frame. NOTE although the returned coords use the global frame of reference they are still relative to the second body if applicable


convertFrame1CoordsToGlobalCoords

public Vector3 convertFrame1CoordsToGlobalCoords(Vector3 relative,
                                                 Vector3 passback)
takes relative coordinates, assumed to be in frame 1 (coordinates in relation to the first body), and returns the same coordinates in the global frame using the global origin


convertFrame2CoordsToGlobalCoords

public Vector3 convertFrame2CoordsToGlobalCoords(Vector3 relative,
                                                 Vector3 passback)
takes relative coordinates, assumed to be in frame 2 (coordinates in relation to the second body, or the global frame if there is no second body) and returns the same coordinates in the global frame using the global origin


getAnchor1InGlobalFrame

public Vector3 getAnchor1InGlobalFrame(Vector3 passback)
returns the anchor attached to the first body in the global frame of reference


getAnchor2InGlobalFrame

public Vector3 getAnchor2InGlobalFrame(Vector3 passback)
returns the anchor attached to the second body in the global frame of reference, or, if no second body is present, the global anchor


getAnchor1InGlobalCoords

public Vector3 getAnchor1InGlobalCoords(Vector3 passback)
returns the anchor attached to the first body in the global coordinates


getAnchor2InGlobalCoords

public Vector3 getAnchor2InGlobalCoords(Vector3 passback)
returns the anchor attached to the second body in global coordinates, or, if no second body is present, the global anchor