public class

RevoluteJoint

extends 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>
     ↳ sofia.graphics.RevoluteJoint

Class Overview

TODO document

Summary

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.
[Expand]
Inherited Methods
From class sofia.graphics.AbstractJoint
From class java.lang.Object
From interface sofia.graphics.Joint

Public Constructors

public RevoluteJoint (Shape firstShape, Shape secondShape, Anchor anchor)

Creates a new revolute joint.

Parameters
firstShape the first shape to connect by the joint
secondShape the second shape to connect by the joint
anchor the anchor on the first shape about which the second shape will be rotated

Public Methods

public Anchor getAnchor ()

TODO document

public float getLowerAngle ()

public float getUpperAngle ()

public void setLowerAngle (float angle)

public void setUpperAngle (float angle)

Protected Methods

protected RevoluteJointDef createB2JointDef ()

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.

Returns
  • the subclass of JointDef that represents this specific type of joint