public class FGearJoint extends FJoint
FRevoluteJoint and FPrismaticJoint.| Modifier and Type | Field and Description |
|---|---|
protected FJoint |
m_joint1 |
protected FJoint |
m_joint2 |
protected float |
m_ratio |
protected float |
m_worldRatio |
m_collideConnected, m_joint, m_worldm_drawable, m_fill, m_fillColor, m_image, m_imageAlpha, m_mask, m_stroke, m_strokeColor, m_strokeWeight| Constructor and Description |
|---|
FGearJoint(FJoint joint1,
FJoint joint2)
Construct a gear joint between two joints.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(def.processing.core.PGraphics applet)
This method is called when calling
world.draw(). |
protected org.jbox2d.dynamics.joints.JointDef |
getJointDef(FWorld world) |
void |
setRatio(float ratio)
Sets the ratio of movement transfer from one joint to the other of the gear.
|
protected void |
updateRatio() |
addToWorld, getBody1, getBody2, getBox2dJoint, getReactionForceX, getReactionForceY, getReactionTorque, postDraw, postDrawDebug, preDraw, preDrawDebug, processJoint, removeFromWorld, setCollideConnectedappletFill, appletFillStroke, appletStroke, attachImage, dettachImage, drawDebug, drawImage, getFillColor, getImageAlpha, isDrawable, setDrawable, setFill, setFill, setFill, setFill, setFillColor, setImageAlpha, setNoFill, setNoStroke, setStroke, setStroke, setStroke, setStroke, setStrokeColor, setStrokeWeight, updateStyleprotected FJoint m_joint1
protected FJoint m_joint2
protected float m_ratio
protected float m_worldRatio
protected org.jbox2d.dynamics.joints.JointDef getJointDef(FWorld world)
getJointDef in class FJointprotected void updateRatio()
public void setRatio(float ratio)
ratio - the ratio of movement that is transfered between the first and the second joints of the gearpublic void draw(def.processing.core.PGraphics applet)
FDrawableworld.draw().
This method may be overriden to allow custom drawing of the object.