public class FConstantVolumeJoint extends FJoint
FBlob body.| Modifier and Type | Field and Description |
|---|---|
protected ArrayList |
m_bodies |
protected float |
m_damping |
protected float |
m_frequency |
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 |
|---|
FConstantVolumeJoint()
Constructs an constant volume joint.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBody(FBody b)
Adds a body to the joint.
|
void |
draw(def.processing.core.PGraphics applet)
This method is called when calling
world.draw(). |
void |
drawDebug(def.processing.core.PGraphics applet)
This method is called when calling
world.drawDebug(). |
ArrayList |
getBodies()
Return the group of bodies that are connected by this joint.
|
def.processing.core.PVector |
getCentroid() |
protected org.jbox2d.dynamics.joints.JointDef |
getJointDef(FWorld world) |
void |
setDamping(float damping)
Sets the damping of the springs used to maintain the volume defined by the vertices constant.
|
void |
setFrequency(float frequency)
Sets the frequency of the springs used to maintain the volume defined by the vertices constant.
|
addToWorld, getBody1, getBody2, getBox2dJoint, getReactionForceX, getReactionForceY, getReactionTorque, postDraw, postDrawDebug, preDraw, preDrawDebug, processJoint, removeFromWorld, setCollideConnectedappletFill, appletFillStroke, appletStroke, attachImage, dettachImage, drawImage, getFillColor, getImageAlpha, isDrawable, setDrawable, setFill, setFill, setFill, setFill, setFillColor, setImageAlpha, setNoFill, setNoStroke, setStroke, setStroke, setStroke, setStroke, setStrokeColor, setStrokeWeight, updateStyleprotected ArrayList m_bodies
protected float m_damping
protected float m_frequency
public FConstantVolumeJoint()
addBody to add bodies to the joint and to define the initial and target volume of the joint.protected org.jbox2d.dynamics.joints.JointDef getJointDef(FWorld world)
getJointDef in class FJointpublic void addBody(FBody b)
b - body to be addedpublic ArrayList getBodies()
public void setDamping(float damping)
damping - the damping of the springs of the constant volume jointpublic void setFrequency(float frequency)
frequency - the frequency of the springs of the constant volume jointpublic def.processing.core.PVector getCentroid()
public void draw(def.processing.core.PGraphics applet)
FDrawableworld.draw().
This method may be overriden to allow custom drawing of the object.public void drawDebug(def.processing.core.PGraphics applet)
FDrawableworld.drawDebug().
This method may be overriden to allow custom debug drawing of the object.