|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfisica.FDrawable
fisica.FBody
fisica.FBox
public class FBox
Represents a rectangular body that can be added to a world.
FBox myBox = new FBox(40, 20);
world.add(myBox);
FCircle
,
FBlob
,
FPoly
,
FLine
Constructor Summary | |
---|---|
FBox(float width,
float height)
Constructs a rectangular body that can be added to a world. |
Method Summary | |
---|---|
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() . |
float |
getHeight()
Returns the height of the rectangle. |
float |
getWidth()
Returns the width of the rectangle. |
void |
setHeight(float height)
Sets the height of the rectangle. |
void |
setWidth(float width)
Sets the width of the rectangle. |
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 FBox(float width, float height)
width
- the width of the rectangleheight
- the height of the rectangleMethod Detail |
---|
public float getHeight()
getWidth()
public float getWidth()
getHeight()
public void setHeight(float height)
getWidth()
public void setWidth(float width)
getWidth()
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 |