RPoint is a very simple interface for creating, holding and drawing 2D points.
RPoint Geometry
geomerative.RPoint.RPoint |
( |
final double |
x, |
|
|
final double |
y |
|
) |
| |
void geomerative.RPoint.rotateAboutOriginSelf |
( |
final float |
angle | ) |
|
void addSelf |
( |
final RPoint |
p | ) |
|
|
related |
Use this to add a vector to this point.
RPoint_add Geometry
- Parameters
-
p | the vector to add ( ) ( ) ( ) |
Use this to perform a cross product of the point with another point. This returns a RPoint corresponding to the cross product of both vectors.
RPoint_cross Geometry
- Parameters
-
p | the vector to perform the cross product with |
- Returns
- RPoint, the resulting vector of the cross product ( ) ( ) ( )
Use this to multiply a vector to this point. This returns a float corresponding to the scalar product of both vectors.
RPoint_mult Geometry
- Parameters
-
- Returns
- float, the result of the scalar product ( ) ( ) ( )
float getAngleBetween |
( |
final RPoint |
p | ) |
|
|
related |
Use this to obtain the angle between the vector and another vector
RPoint_angle Geometry
- Parameters
-
p | the vector relative to which we want to evaluate the angle |
- Returns
- float, the angle between the two vectors ( )
float getDistance2D |
( |
final RPoint |
p | ) |
|
|
related |
Use this to obtain the distance between the vector and another vector
RPoint_dist Geometry
- Parameters
-
p | the vector relative to which we want to evaluate the distance |
- Returns
- float, the distance between the two vectors ( )
Use this to obtain the norm of the point.
RPoint_norm Geometry
- Returns
- float, the norm of the point ( )
Use this to obtain the square norm of the point.
RPoint_norm Geometry
- Returns
- float, the norm of the point ( )
Use this to normalize the point. This means that after applying, it's norm will be equal to 1.
RPoint_normalize Geometry ( ) ( ) ( ) ( )
void rotate |
( |
final float |
angle, |
|
|
final RPoint |
v |
|
) |
| |
|
related |
Apply a rotation to the point, given the angle and optionally the point of the center of rotation.
RPoint_rotate Geometry
- Parameters
-
angle | the angle of rotation to be applied |
v | the position vector of the center of rotation ( ) ( ) ( ) |
void rotateAroundPointSelf |
( |
final float |
angle, |
|
|
final float |
vx, |
|
|
final float |
vy |
|
) |
| |
|
related |
Apply a rotation to the point, given the angle and optionally the coordinates of the center of rotation.
RPoint_rotate Geometry
- Parameters
-
angle | the angle of rotation to be applied |
vx | the x coordinate of the center of rotation |
vy | the y coordinate of the center of rotation ( ) ( ) ( ) |
RPoint |
( |
final float |
x, |
|
|
final float |
y |
|
) |
| |
|
related |
Create a new point, given the coordinates.
RPoint_constructor Geometry
- Parameters
-
x | the x coordinate of the new point |
y | the y coordinate of the new point |
Create a new point at (0, 0).
RPoint_constructor Geometry
Copy a point.
RPoint_constructor Geometry
- Parameters
-
p | the point we wish to make a copy of |
void scaleSelf |
( |
final float |
sx, |
|
|
final float |
sy |
|
) |
| |
|
related |
Apply a scaling to the point, given the scaling factors.
RPoint_scale Geometry
- Parameters
-
sx | the scaling coefficient over the x axis |
sy | the scaling coefficient over the y axis ( ) ( ) ( ) |
void scaleSelf |
( |
final float |
s | ) |
|
|
related |
Apply a scaling to the point, given a scaling factor.
RPoint_scale Geometry
- Parameters
-
s | the scaling coefficient for a uniform scaling ( ) ( ) ( ) |
void scaleSelf |
( |
final RPoint |
s | ) |
|
|
related |
Apply a scaling to the point, given a scaling vector.
RPoint_scale Geometry
- Parameters
-
s | the scaling vector ( ) ( ) ( ) |
void subSelf |
( |
final RPoint |
p | ) |
|
|
related |
Use this to subtract a vector from this point.
RPoint_sub Geometry
- Parameters
-
p | the vector to substract ( ) ( ) ( ) |
Use this to apply a transformation to the point.
RPoint_transform Geometry
- Parameters
-
m | the transformation matrix to be applied ( ) ( ) ( ) |
void translateSelf |
( |
final float |
tx, |
|
|
final float |
ty |
|
) |
| |
|
related |
Apply a translation to the point.
RPoint_translate Geometry
- Parameters
-
tx | the coefficient of x translation |
ty | the coefficient of y translation ( ) ( ) ( ) |
void translateSelf |
( |
final RPoint |
t | ) |
|
|
related |
Apply a translation to the point.
RPoint_translate Geometry
- Parameters
-
t | the translation vector to be applied ( ) ( ) ( ) |
The x coordinate of the point.
RPoint_x Geometry
The y coordinate of the point.
RPoint_y Geometry
The documentation for this class was generated from the following file: