Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Static Public Attributes
icl::utils::Point32f Class Reference

Single precission 3D Vectors Point class of the ICL. More...

#include <Point32f.h>

Inheritance diagram for icl::utils::Point32f:
icl::cv::RDPApproximation::ChainPoint

List of all members.

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
Point32foperator+= (const Point32f &s)
 Adds another Point32f inplace.
Point32foperator-= (const Point32f &s)
 Substacts another Point32f inplace.
Point32foperator*= (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
Point32fnormalize ()
 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

Detailed Description

Single precission 3D Vectors Point class of the ICL.


Constructor & Destructor Documentation

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


Member Function Documentation

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 = 0 -> 2
    • p = 1 -> city block norm x+y
    • p = 2 -> euclidian norm
    • p->inf -> infinity norm
      Parameters:
      pchooses the norm
      Returns:
      norm value

normalized this 2D vector to length=1;

uses the euclidian norm! @ return a reference to (this) normalized

returns a normalized version of this Point

Returns:
normalized vec
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

Point32f icl::utils::Point32f::operator+ ( const Point32f s) const [inline]

adds two Points as vectors

Point32f& icl::utils::Point32f::operator+= ( const Point32f s) [inline]

Adds another Point32f inplace.

Point32f icl::utils::Point32f::operator- ( const Point32f s) const [inline]

substracts two Point32fs as vectors

Point32f& icl::utils::Point32f::operator-= ( const Point32f s) [inline]

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


Member Data Documentation

null Point is x=0, y=0

x position of this point

y position of this point


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines