|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfisica.FDrawable
fisica.FJoint
fisica.FConstantVolumeJoint
public class FConstantVolumeJoint
Represents constant volume joint that tries to keep the volume enclosed by a group of bodies constant. This joint is similar to connecting multiple springs between the bodies in order to maintain the volume inside their position constant. This is the joint used to create the FBlob
body.
Constructor Summary | |
---|---|
FConstantVolumeJoint()
Constructs an constant volume joint. |
Method Summary | |
---|---|
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. |
Methods inherited from class fisica.FJoint |
---|
addToWorld, getBody1, getBody2, getBox2dJoint, getReactionForceX, getReactionForceY, getReactionTorque, removeFromWorld, setCollideConnected |
Methods inherited from class fisica.FDrawable |
---|
attachImage, dettachImage, draw, drawDebug, getFillColor, getImageAlpha, isDrawable, setDrawable, setFill, setFill, setFill, setFill, setFillColor, setImageAlpha, setNoFill, setNoStroke, setStroke, setStroke, setStroke, setStroke, setStrokeColor, setStrokeWeight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FConstantVolumeJoint()
addBody
to add bodies to the joint and to define the initial and target volume of the joint.
Method Detail |
---|
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.
draw
in class FDrawable
applet
- the graphics onto which the object must be drawn.public void drawDebug(processing.core.PGraphics applet)
FDrawable
world.drawDebug()
.
This method may be overriden to allow custom debug drawing of the object.
drawDebug
in class FDrawable
applet
- the graphics onto which the object must be drawn.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |