|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.planeth.common.geom.Shape
A Base Shape implementation without any predifined vertexes
| Nested Class Summary | |
static class |
Shape.Bounds
Calculates the bounds (boundary vertexes) of an Array of vertexes. |
| Constructor Summary | |
protected |
Shape()
Constructor for Shape. |
|
Shape(Vector2D[] vertexes)
Constructor for Shape. |
| Method Summary | |
Shape[] |
explode()
Explodes the Shape in the max possible number of pieces |
Shape.Bounds |
getBounds()
Returns the Bounds object of the Shape |
java.awt.Color |
getColor()
Returns the color of the Shape |
Vector2D[] |
getVertexes()
Returns the vertexes of the Shape |
void |
paint(java.awt.Graphics g,
Vector2D pos)
Paints the Shape into the passed Graphics at the passed position |
void |
randomize()
Randomizes the Shape. |
void |
setColor(java.awt.Color color)
Sets the color for the Shape |
void |
setFilled(boolean filled)
If set to true, the Shape is filled |
protected void |
setVertexes(Vector2D[] vertexes)
Sets the vertexes for the Shape |
void |
setVisible(boolean visible)
If set to true, the Shape is visible |
Shape[] |
split(int pieces)
Splits the Shape in the passed number of pieces |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected Shape()
public Shape(Vector2D[] vertexes)
vertexes - the vertexes for the Shape| Method Detail |
public void randomize()
public Shape[] split(int pieces)
pieces - the number of pieces
public Shape[] explode()
public Shape.Bounds getBounds()
public void paint(java.awt.Graphics g,
Vector2D pos)
g - the Graphics to paint intopos - the position to paint the Shapepublic Vector2D[] getVertexes()
protected void setVertexes(Vector2D[] vertexes)
vertexes - The vertexes to set.public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color - The color to set.public void setFilled(boolean filled)
filled - true = filled, false = drawedpublic void setVisible(boolean visible)
visible - true = visible
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||