|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrafica.GPoint
public class GPoint
Point class. A GPoint is composed of two coordinates (x, y) and a text label
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 GPointMethod Detail |
---|
public 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()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |