Fork me
BeyondAR
Augmented Reality Framework for Android
 All Classes Functions Variables
com.beyondar.android.util.math.geom.Point2 Class Reference

Represents a 2D point. More...

Inheritance diagram for com.beyondar.android.util.math.geom.Point2:

Public Member Functions

 Point2 (float x, float y)
 Constructs a point from its 2D coordinates. More...
 
 Point2 ()
 Constructs a point from its 2D coordinates. More...
 
 Point2 (Point3 p, int remove)
 Constructs a 2D point from a 3D point, giving one coordinate to be removed from the 3D point. More...
 
void add (float x, float y)
 Adds given x and y to point x and way. More...
 
void add (Point2 p)
 Adds a point to this one, adding given point x and y coordinates to this x and y point. More...
 
float[] getCoordinatesArray ()
 Returns an array with the point's coordinates. More...
 

Public Attributes

float x
 x coordinate
 
float y
 y coordinate
 

Detailed Description

Represents a 2D point.

Constructor & Destructor Documentation

com.beyondar.android.util.math.geom.Point2.Point2 ( float  x,
float  y 
)

Constructs a point from its 2D coordinates.

Parameters
xx coordinate
yy coordinate
com.beyondar.android.util.math.geom.Point2.Point2 ( )

Constructs a point from its 2D coordinates.

com.beyondar.android.util.math.geom.Point2.Point2 ( Point3  p,
int  remove 
)

Constructs a 2D point from a 3D point, giving one coordinate to be removed from the 3D point.

Parameters
p3D point
removecoordinate 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 removed

Member Function Documentation

void com.beyondar.android.util.math.geom.Point2.add ( float  x,
float  y 
)

Adds given x and y to point x and way.

Parameters
x
y
void com.beyondar.android.util.math.geom.Point2.add ( Point2  p)

Adds a point to this one, adding given point x and y coordinates to this x and y point.

Parameters
pthe point
float [] com.beyondar.android.util.math.geom.Point2.getCoordinatesArray ( )

Returns an array with the point's coordinates.

Returns
an array with the point's coordinates

The documentation for this class was generated from the following file: