public class GPoint extends Object
| Constructor and Description |
|---|
GPoint(float x,
float y)
Constructor
|
GPoint(float x,
float y,
String label)
Constructor
|
GPoint(GPoint point)
Constructor
|
GPoint(PVector v)
Constructor
|
GPoint(PVector v,
String label)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLabel()
Returns the point text label
|
boolean |
getValid()
Returns if the point coordinates are valid or not
|
float |
getX()
Returns the point x coordinate
|
float |
getY()
Returns the point y coordinate
|
boolean |
isValid()
Returns if the point coordinates are valid or not
|
void |
set(float newX,
float newY,
String newLabel)
Sets the point x and y coordinates and the label
|
void |
set(GPoint point)
Sets the point x and y coordinates and the label
|
void |
set(PVector v,
String newLabel)
Sets the point x and y coordinates and the label
|
void |
setLabel(String newLabel)
Sets the point text label
|
void |
setX(float newX)
Sets the point x coordinate
|
void |
setXY(float newX,
float newY)
Sets the point x and y coordinates
|
void |
setXY(PVector v)
Sets the point x and y coordinates
|
void |
setY(float newY)
Sets the point y coordinate
|
public GPoint(float x,
float y,
String label)
x - the x coordinatey - the y coordinatelabel - the text labelpublic GPoint(float x,
float y)
x - the x coordinatey - the y coordinatepublic GPoint(PVector v, String label)
v - the Processing vector containing the point coordinateslabel - the text labelpublic GPoint(PVector v)
v - the Processing vector containing the point coordinatespublic GPoint(GPoint point)
point - a GPointpublic void set(float newX,
float newY,
String newLabel)
newX - the new x coordinatenewY - the new y coordinatenewLabel - the new point text labelpublic void set(GPoint point)
point - the point to use as a referencepublic void set(PVector v, String newLabel)
v - the Processing vector with the new point coordinatesnewLabel - the new point text labelpublic void setX(float newX)
newX - the new x coordinatepublic void setY(float newY)
newY - the new y coordinatepublic void setXY(float newX,
float newY)
newX - the new x coordinatenewY - the new y coordinatepublic void setXY(PVector v)
v - the Processing vector with the new point coordinatespublic void setLabel(String newLabel)
newLabel - the new point text labelpublic float getX()
public float getY()
public String getLabel()
public boolean getValid()
public boolean isValid()
Processing Library grafica by Javier Gracia Carpio. (c) 2015