org.jbox2d.dynamics.joints
Class MouseJoint

java.lang.Object
  extended by org.jbox2d.dynamics.joints.Joint
      extended by org.jbox2d.dynamics.joints.MouseJoint

public class MouseJoint
extends Joint


Field Summary
 float m_beta
           
 Vec2 m_C
           
 Vec2 m_force
           
 float m_gamma
           
 Vec2 m_localAnchor
           
 Mat22 m_mass
           
 float m_maxForce
           
 Vec2 m_target
           
 
Fields inherited from class org.jbox2d.dynamics.joints.Joint
m_body1, m_body2, m_collideConnected, m_islandFlag, m_next, m_node1, m_node2, m_prev, m_type, m_userData
 
Constructor Summary
MouseJoint(MouseJointDef def)
           
 
Method Summary
 Vec2 getAnchor1()
          Get the anchor point on body1 in world coordinates.
 Vec2 getAnchor2()
          Get the anchor point on body2 in world coordinates.
 Vec2 getReactionForce()
          Get the reaction force on body2 at the joint anchor.
 float getReactionTorque()
          Get the reaction torque on body2.
 void initVelocityConstraints(TimeStep step)
           
 void setTarget(Vec2 target)
          Use this to update the target point.
 boolean solvePositionConstraints()
          This returns true if the position errors are within tolerance.
 void solveVelocityConstraints(TimeStep step)
           
 
Methods inherited from class org.jbox2d.dynamics.joints.Joint
create, destroy, destructor, getBody1, getBody2, getNext, getType, getUserData, initPositionConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_localAnchor

public Vec2 m_localAnchor

m_target

public Vec2 m_target

m_force

public Vec2 m_force

m_mass

public Mat22 m_mass

m_C

public Vec2 m_C

m_maxForce

public float m_maxForce

m_beta

public float m_beta

m_gamma

public float m_gamma
Constructor Detail

MouseJoint

public MouseJoint(MouseJointDef def)
Method Detail

setTarget

public void setTarget(Vec2 target)
Use this to update the target point.


getAnchor1

public Vec2 getAnchor1()
Description copied from class: Joint
Get the anchor point on body1 in world coordinates.

Specified by:
getAnchor1 in class Joint

getAnchor2

public Vec2 getAnchor2()
Description copied from class: Joint
Get the anchor point on body2 in world coordinates.

Specified by:
getAnchor2 in class Joint

initVelocityConstraints

public void initVelocityConstraints(TimeStep step)
Specified by:
initVelocityConstraints in class Joint

solvePositionConstraints

public boolean solvePositionConstraints()
Description copied from class: Joint
This returns true if the position errors are within tolerance.

Specified by:
solvePositionConstraints in class Joint

solveVelocityConstraints

public void solveVelocityConstraints(TimeStep step)
Specified by:
solveVelocityConstraints in class Joint

getReactionForce

public Vec2 getReactionForce()
Description copied from class: Joint
Get the reaction force on body2 at the joint anchor.

Specified by:
getReactionForce in class Joint

getReactionTorque

public float getReactionTorque()
Description copied from class: Joint
Get the reaction torque on body2.

Specified by:
getReactionTorque in class Joint