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 the distance between two shapes to always remain constant, or within a certain amount of each other (like a spring-damper).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
DistanceJoint(Shape firstShape, Shape secondShape, Anchor firstShapeAnchor, Anchor secondShapeAnchor)
TODO document
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float
|
getDampingRatio()
TODO document
| ||||||||||
Anchor
|
getFirstShapeAnchor()
TODO document
| ||||||||||
float
|
getFrequency()
TODO document
| ||||||||||
Anchor
|
getSecondShapeAnchor()
TODO document
| ||||||||||
void
|
setDampingRatio(float newDampingRatio)
TODO document
| ||||||||||
void
|
setFrequency(float newFrequency)
TODO document
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DistanceJointDef
|
createB2JointDef()
TODO document
|
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.
|
TODO document
TODO document
TODO document
TODO document
TODO document
TODO document
the subclass of JointDef
that represents this specific
type of joint