|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfisica.FDrawable
fisica.FBody
fisica.FLine
public class FLine
Represents a line body that can be added to a world.
FLine myLine = new FLine(40, 20, 100, 40);
world.add(myLine);
FBox
,
FCircle
,
FBlob
,
FPoly
Constructor Summary | |
---|---|
FLine(float x1,
float y1,
float x2,
float y2)
Constructs a line 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() . |
void |
setEnd(float x,
float y)
Sets the end point of the line. |
void |
setStart(float x,
float y)
Sets the start point of the line. |
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 FLine(float x1, float y1, float x2, float y2)
x1
- horizontal position of the first point of the liney1
- vertical position of the first point of the linex2
- horizontal position of the second point of the liney2
- vertical position of the second point of the lineMethod Detail |
---|
public void setStart(float x, float y)
x
- horizontal position of the first point of the liney
- vertical position of the first point of the linepublic void setEnd(float x, float y)
x
- horizontal position of the first point of the liney
- vertical position of the first point of the linepublic 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 |