AbstractJoint<JointType extends Joint, JointDefType extends JointDef>
java.lang.Object
sofia.graphics.AbstractJoint<JointType extends org.jbox2d.dynamics.joints.Joint, JointDefType extends org.jbox2d.dynamics.joints.JointDef>
A joint that forces two shapes to share a common anchor point, allowing only the relative rotation between them to change.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
RevoluteJoint(Shape firstShape, Shape secondShape, Anchor anchor)
Creates a new revolute joint.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Anchor
|
getAnchor()
TODO document
| ||||||||||
float
|
getLowerAngle()
| ||||||||||
float
|
getUpperAngle()
| ||||||||||
void
|
setLowerAngle(float angle)
| ||||||||||
void
|
setUpperAngle(float angle)
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RevoluteJointDef
|
createB2JointDef()
Subclasses must override this method to create the appropriate Box2D
JointDef instance that represents the specific type of joint. |
Methods inherited from
class
sofia.graphics.AbstractJoint
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean
|
canShapesCollide()
Gets a value indicating whether the two shapes connected by this joint
are allowed to collide.
| ||||||||||
void
|
connect()
Activates the joint.
| ||||||||||
abstract
JointDefType
|
createB2JointDef()
Subclasses must override this method to create the appropriate Box2D
JointDef instance that represents the specific type of joint. | ||||||||||
void
|
disconnect()
Deactivates the joint, releasing the connection between the two shapes.
| ||||||||||
JointType
|
getB2Joint()
Gets the underlying JBox2D joint object.
| ||||||||||
JointDefType
|
getB2JointDef()
Gets the underlying JBox2D joint definition object.
| ||||||||||
Shape
|
getFirstShape()
Gets the first shape connected by this joint.
| ||||||||||
Shape
|
getSecondShape()
Gets the second shape connected by this joint.
| ||||||||||
void
|
setCanShapesCollide(boolean collide)
Sets a value indicating whether the two shapes connected by this joint
are allowed to collide.
|
Methods inherited from
class
java.lang.Object
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Object
|
clone()
| ||||||||||
boolean
|
equals(Object arg0)
| ||||||||||
void
|
finalize()
| ||||||||||
final
Class<?>
|
getClass()
| ||||||||||
int
|
hashCode()
| ||||||||||
final
void
|
notify()
| ||||||||||
final
void
|
notifyAll()
| ||||||||||
String
|
toString()
| ||||||||||
final
void
|
wait()
| ||||||||||
final
void
|
wait(long arg0, int arg1)
| ||||||||||
final
void
|
wait(long arg0)
|
Methods inherited from
interface
sofia.graphics.Joint
| |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract
void
|
connect()
Activates the joint.
| ||||||||||
abstract
void
|
disconnect()
Deactivates the joint, releasing the connection between the two shapes.
| ||||||||||
abstract
org.jbox2d.dynamics.joints.Joint
|
getB2Joint()
Gets the underlying JBox2D joint object.
| ||||||||||
abstract
org.jbox2d.dynamics.joints.JointDef
|
getB2JointDef()
Gets the underlying JBox2D joint definition object.
| ||||||||||
abstract
Shape
|
getFirstShape()
Gets the first shape connected by this joint.
| ||||||||||
abstract
Shape
|
getSecondShape()
Gets the second shape connected by this joint.
|
Creates a new revolute joint.
Subclasses must override this method to create the appropriate Box2D
JointDef
instance that represents the specific type of joint.
This method should fill in all required properties of the joint,
including the bodyA
and bodyB
references.
the subclass of JointDef
that represents this specific
type of joint