Image Component Library (ICL)
|
Single precission 3D Vectors Point class of the ICL. More...
#include <Point32f.h>
Public Member Functions | |
Point32f () | |
default constructor | |
Point32f (const Point32f &p) | |
deep copy of a Point | |
Point32f (float x, float y) | |
create a special point | |
Point32f (const Point &p) | |
craete a point by a given interger point | |
bool | isNull () const |
checks wether the object instance is null, i.e. all elements are zero | |
bool | operator== (const Point32f &s) const |
checks if two points are equal | |
bool | operator!= (const Point32f &s) const |
checks if two points are not equal | |
Point32f | operator+ (const Point32f &s) const |
adds two Points as vectors | |
Point32f | operator- (const Point32f &s) const |
substracts two Point32fs as vectors | |
Point32f | operator* (double d) const |
scales a Point32fs variables with a scalar value | |
Point32f & | operator+= (const Point32f &s) |
Adds another Point32f inplace. | |
Point32f & | operator-= (const Point32f &s) |
Substacts another Point32f inplace. | |
Point32f & | operator*= (double d) |
scales the Point32f inplace with a scalar | |
Point32f | transform (double xfac, double yfac) const |
transforms the point by element-wise scaling | |
float | distanceTo (const Point32f &p) const |
returns the euclidian distance to another point | |
bool | inTriangle (const utils::Point32f &v1, const utils::Point32f &v2, const utils::Point32f &v3) const |
Checks whether the given point p lies within the triangle defined by v1,v2 and v3. | |
float | norm (float p=2) const |
returns the p-norm of the 2D Vector | |
Point32f & | normalize () |
normalized this 2D vector to length=1; | |
Point32f | normalized () const |
returns a normalized version of this Point | |
float & | operator[] (int i) |
index based interface (returns i?y:x) | |
const float & | operator[] (int i) const |
index based interface, const (returns i?y:x) | |
Public Attributes | |
float | x |
x position of this point | |
float | y |
y position of this point | |
Static Public Attributes | |
static const Point32f | null |
null Point is x=0, y=0 |
Single precission 3D Vectors Point class of the ICL.
icl::utils::Point32f::Point32f | ( | ) | [inline] |
default constructor
icl::utils::Point32f::Point32f | ( | const Point32f & | p | ) | [inline] |
deep copy of a Point
icl::utils::Point32f::Point32f | ( | float | x, |
float | y | ||
) | [inline] |
create a special point
icl::utils::Point32f::Point32f | ( | const Point & | p | ) | [inline] |
craete a point by a given interger point
float icl::utils::Point32f::distanceTo | ( | const Point32f & | p | ) | const |
returns the euclidian distance to another point
bool icl::utils::Point32f::inTriangle | ( | const utils::Point32f & | v1, |
const utils::Point32f & | v2, | ||
const utils::Point32f & | v3 | ||
) | const |
Checks whether the given point p lies within the triangle defined by v1,v2 and v3.
bool icl::utils::Point32f::isNull | ( | ) | const [inline] |
checks wether the object instance is null, i.e. all elements are zero
float icl::utils::Point32f::norm | ( | float | p = 2 | ) | const |
returns the p-norm of the 2D Vector
p | chooses the norm |
Point32f& icl::utils::Point32f::normalize | ( | ) | [inline] |
normalized this 2D vector to length=1;
uses the euclidian norm! @ return a reference to (this) normalized
Point32f icl::utils::Point32f::normalized | ( | ) | const [inline] |
returns a normalized version of this Point
bool icl::utils::Point32f::operator!= | ( | const Point32f & | s | ) | const [inline] |
checks if two points are not equal
Point32f icl::utils::Point32f::operator* | ( | double | d | ) | const [inline] |
scales a Point32fs variables with a scalar value
Point32f& icl::utils::Point32f::operator*= | ( | double | d | ) | [inline] |
scales the Point32f inplace with a scalar
adds two Points as vectors
Adds another Point32f inplace.
substracts two Point32fs as vectors
Substacts another Point32f inplace.
bool icl::utils::Point32f::operator== | ( | const Point32f & | s | ) | const [inline] |
checks if two points are equal
float& icl::utils::Point32f::operator[] | ( | int | i | ) | [inline] |
index based interface (returns i?y:x)
const float& icl::utils::Point32f::operator[] | ( | int | i | ) | const [inline] |
index based interface, const (returns i?y:x)
Point32f icl::utils::Point32f::transform | ( | double | xfac, |
double | yfac | ||
) | const [inline] |
transforms the point by element-wise scaling
const Point32f icl::utils::Point32f::null [static] |
null Point is x=0, y=0
float icl::utils::Point32f::x |
x position of this point
float icl::utils::Point32f::y |
y position of this point