java.lang.Object | |
↳ | sofia.graphics.AbstractJoint<JointType extends org.jbox2d.dynamics.joints.Joint, JointDefType extends org.jbox2d.dynamics.joints.JointDef> |
Known Direct Subclasses |
TODO document
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractJoint(Shape firstShape, Shape secondShape)
Initializes a new joint with the specified shapes.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
connect()
Activates the joint.
| ||||||||||
void |
disconnect()
Deactivates the joint, releasing the connection between the two shapes.
| ||||||||||
JointType | getB2Joint() | ||||||||||
JointDefType | getB2JointDef() | ||||||||||
boolean | getCollideConnected() | ||||||||||
Shape |
getFirstShape()
Gets the first shape connected by this joint.
| ||||||||||
Shape |
getSecondShape()
Gets the second shape connected by this joint.
| ||||||||||
void | setCollideConnected(boolean collide) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract JointDefType |
createB2JointDef()
Subclasses must override this method to create the appropriate Box2D
JointDef instance that represents the specific type of joint. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
sofia.graphics.Joint
|
Initializes a new joint with the specified shapes.
firstShape | the first shape connected by this joint |
---|---|
secondShape | the second shape connected by this joint |
Activates the joint. You must call this method after creating the joint object if you want it to have any effect.
Deactivates the joint, releasing the connection between the two shapes.
Gets the first shape connected by this joint.
Gets the second shape connected by this 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.
JointDef
that represents this specific
type of joint