libgdx API

com.badlogic.gdx.physics.box2d
Class Joint

java.lang.Object
  extended by com.badlogic.gdx.physics.box2d.Joint
Direct Known Subclasses:
DistanceJoint, FrictionJoint, GearJoint, MouseJoint, PrismaticJoint, PulleyJoint, RevoluteJoint, RopeJoint, WeldJoint, WheelJoint

public abstract class Joint
extends java.lang.Object


Field Summary
protected  long addr
          the address of the joint
protected  JointEdge jointEdgeA
          joint edge a
protected  JointEdge jointEdgeB
          joint edge b
 
Constructor Summary
protected Joint(World world, long addr)
          Constructs a new joint
 
Method Summary
 Vector2 getAnchorA()
           
 Vector2 getAnchorB()
           
 Body getBodyA()
          Get the first body attached to this joint.
 Body getBodyB()
          Get the second body attached to this joint.
 Vector2 getReactionForce(float inv_dt)
           
 float getReactionTorque(float inv_dt)
          Get the reaction torque on body2 in N*m.
 JointDef.JointType getType()
          Get the type of the concrete joint.
 boolean isActive()
          Short-cut function to determine if either body is inactive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

addr

protected long addr
the address of the joint


jointEdgeA

protected JointEdge jointEdgeA
joint edge a


jointEdgeB

protected JointEdge jointEdgeB
joint edge b

Constructor Detail

Joint

protected Joint(World world,
                long addr)
Constructs a new joint

Parameters:
addr - the address of the joint
Method Detail

getType

public JointDef.JointType getType()
Get the type of the concrete joint.


getBodyA

public Body getBodyA()
Get the first body attached to this joint.


getBodyB

public Body getBodyB()
Get the second body attached to this joint.


getAnchorA

public Vector2 getAnchorA()

getAnchorB

public Vector2 getAnchorB()

getReactionForce

public Vector2 getReactionForce(float inv_dt)

getReactionTorque

public float getReactionTorque(float inv_dt)
Get the reaction torque on body2 in N*m.


isActive

public boolean isActive()
Short-cut function to determine if either body is inactive.


libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)