public class SymmetricPolygon extends Shape
| Modifier and Type | Field and Description | 
|---|---|
private GShape | 
basic  | 
private java.util.ArrayList<Vector2D> | 
basicShape  | 
private static int | 
counter  | 
private int | 
number  | 
private static long | 
serialVersionUID  | 
private int | 
size  | 
| Constructor and Description | 
|---|
SymmetricPolygon(Vector3D position,
                int sizeX,
                int sizeY)
Creates a symmetric Polygon. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Shape | 
copy()
Creates a copy of this shape 
 | 
Shape | 
copyBaseForm()
Creates a copy of this shape with the basic values 
 | 
toxi.geom.Rect | 
getBoundingBox()
Not used 
 | 
int | 
getControlType(int index)
Returns the type of control for the parameter. 
 | 
GShape | 
getGShape()
Get the corresponding GShape 
 | 
java.lang.String | 
getNameOfControl(int index)
Returns the name (label) for the control for the parameter 
 | 
int | 
getNumberOfControls()
Returns the total number of possible controls to change the parameter
 (allows properties enable this number of controls) 
 | 
int | 
getValue(int index)
Returns the actual value for the corresponding parameter 
 | 
boolean | 
mouseOver(Vector2D mousePosition)
Delegates check, if mouse is over this shape to the corresponding GShape 
 | 
void | 
recalculate()
Recalculates the vectors of the symmetric polygon based on the input
 parameter 
 | 
void | 
setName(java.lang.String theValue)
Sets the name of this shape to name 
 | 
void | 
setShape(GShape shape)
Set the corresponding GShape 
 | 
void | 
setSize(Vector2D newSize)
Changes sizes of the symmetric polygon to a basic form (can't really
 translate the mouse-dragged rectangle to a symmetric form - here we just
 use the average of the x and y size as length of a side) 
 | 
void | 
setValue0(int size)
Change Parameter 1 
 | 
void | 
setValue1(int number)
Change Parameter 2 
 | 
private static final long serialVersionUID
private int size
private int number
private static int counter
private GShape basic
private java.util.ArrayList<Vector2D> basicShape
public SymmetricPolygon(Vector3D position, int sizeX, int sizeY)
position - Position within the coordinate system (0.1mm)sizeX - together withsizeY - determines the length of one side (average) (0.1mm)public int getNumberOfControls()
getNumberOfControls in interface PluggablegetNumberOfControls in class Shapepublic void setName(java.lang.String theValue)
name - the namepublic int getValue(int index)
public int getControlType(int index)
getControlType in interface PluggablegetControlType in class Shapeindex - The number of the controlled parameterpublic java.lang.String getNameOfControl(int index)
getNameOfControl in interface PluggablegetNameOfControl in class Shapeindex - The number of the controlled parameterpublic void recalculate()
recalculate in class Shapepublic void setValue0(int size)
size - Length of a side of the symmetric polygon (0.1mm)public void setValue1(int number)
number - Number of corners of the symmetric polygonpublic void setSize(Vector2D newSize)
newSize - average of its coordinates as length (0.1mm)public void setShape(GShape shape)
shape - the corresponding GShapepublic GShape getGShape()
public boolean mouseOver(Vector2D mousePosition)
mousePosition - position of the mousepublic toxi.geom.Rect getBoundingBox()
public Shape copyBaseForm()
copyBaseForm in class Shape