Geometric class. More...
#include <ilviews/base/geometry.h>
Public Member Functions | |
IlvDeltaPoint (IlvDeltaPos x=0, IlvDeltaPos y=0) | |
Constructor. More... | |
IlvDeltaPos | getX () const |
Gets the x coordinate of the vector. More... | |
IlvDeltaPos | getY () const |
Gets the y coordinate of the vector. More... | |
void | move (IlvDeltaPos x, IlvDeltaPos y) |
Sets the x and y coordinates of the vector. More... | |
IlvDeltaPoint & | operator= (const IlvDeltaPoint &p) |
Copies a vector. More... | |
int | operator== (const IlvDeltaPoint &p) const |
Tests vectors for equality. More... | |
void | setX (IlvDeltaPos xx) |
Sets the x coordinate of the vector. More... | |
void | setY (IlvDeltaPos yy) |
Sets the y coordinate of the vector. More... | |
void | translate (IlvDeltaPos x, IlvDeltaPos y) |
Translates a vector. More... | |
Geometric class.
Library: xviews or winviews or mviews (mutually exclusive)
The IlvDeltaPoint
class is used to create a vector. A vector is an oriented displacement in a two-dimensional coordinate system.
IlvPoint
, IlvFloatPoint
, IlvDoublePoint
. IlvDeltaPoint::IlvDeltaPoint | ( | IlvDeltaPos | x = 0 , |
IlvDeltaPos | y = 0 |
||
) |
Constructor.
Initializes a vector with defined coordinates.
x | The x coordinate of the vector. |
y | The y coordinate of the vector. |
IlvDeltaPos IlvDeltaPoint::getX | ( | ) | const |
Gets the x coordinate of the vector.
IlvDeltaPos IlvDeltaPoint::getY | ( | ) | const |
Gets the y coordinate of the vector.
void IlvDeltaPoint::move | ( | IlvDeltaPos | x, |
IlvDeltaPos | y | ||
) |
Sets the x and y coordinates of the vector.
x | The x coordinate. |
y | The y coordinate. |
IlvDeltaPoint& IlvDeltaPoint::operator= | ( | const IlvDeltaPoint & | p | ) |
Copies a vector.
Copies p to the object this
.
p | The vector to copy. |
int IlvDeltaPoint::operator== | ( | const IlvDeltaPoint & | p | ) | const |
Tests vectors for equality.
p | The delta point vector. |
0
if p is different from the current object. void IlvDeltaPoint::setX | ( | IlvDeltaPos | xx | ) |
Sets the x coordinate of the vector.
xx | The x coordinate. |
void IlvDeltaPoint::setY | ( | IlvDeltaPos | yy | ) |
Sets the y coordinate of the vector.
yy | The y coordinate. |
void IlvDeltaPoint::translate | ( | IlvDeltaPos | x, |
IlvDeltaPos | y | ||
) |
Translates a vector.
Adds the x and y values to the x and y coordinates.
x | The value to add to the x coordinate. |
y | The value to add to the y coordinate. |