public class FConstantVolumeJoint extends FJoint
FBlob
body.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(processing.core.PGraphics applet)
This method is called when calling
world.draw() . |
void |
drawDebug(processing.core.PGraphics applet)
This method is called when calling
world.drawDebug() . |
java.util.ArrayList |
getBodies()
Return the group of bodies that are connected by this joint.
|
processing.core.PVector |
getCentroid() |
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, removeFromWorld, setCollideConnected
attachImage, dettachImage, draw, drawDebug, getFillColor, getImageAlpha, isDrawable, setDrawable, setFill, setFill, setFill, setFill, setFillColor, setImageAlpha, setNoFill, setNoStroke, setStroke, setStroke, setStroke, setStroke, setStrokeColor, setStrokeWeight
public FConstantVolumeJoint()
addBody
to add bodies to the joint and to define the initial and target volume of the joint.public void addBody(FBody b)
b
- body to be addedpublic java.util.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 processing.core.PVector getCentroid()
public void draw(processing.core.PGraphics applet)
FDrawable
world.draw()
.
This method may be overriden to allow custom drawing of the object.public void drawDebug(processing.core.PGraphics applet)
FDrawable
world.drawDebug()
.
This method may be overriden to allow custom debug drawing of the object.processing library fisica by Ricard Marxer. (c) 2009-2014