|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.look.ar.math.geom.Point2
public class Point2
Represents a 2D point
Field Summary | |
---|---|
float |
x
x coordinate |
float |
y
y coordinate |
Constructor Summary | |
---|---|
Point2(float x,
float y)
Constructs a point from its 2D coordinates |
|
Point2(Point3 p,
int remove)
Constructs a 2D point from a 3D point, giving one coordinate to be removed from the 3D point |
Method Summary | |
---|---|
void |
add(float x,
float y)
Adds given x and y to point x and way |
void |
add(Point2 p)
Adds a point to this one, adding given point x and y coordinates to this x and y point |
float[] |
getCoordinatesArray()
Returns an array with the point's coordinates |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float x
public float y
Constructor Detail |
---|
public Point2(float x, float y)
x
- x coordinatey
- y coordinatepublic Point2(Point3 p, int remove)
p
- 3D pointremove
- coordinate index to be removed. If 0, x will be removed,
assigning 2D x to 3D y and 2D y to 3D z. If 1, y will be
removed, and so on... If remove if greater than 2 or
less than 0, the z coordinate will be removedMethod Detail |
---|
public void add(float x, float y)
x
- y
- public void add(Point2 p)
p
- the pointpublic float[] getCoordinatesArray()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |