#include <artec/sdk/base/Point.h>

Public Types

typedef T value_type
 

Public Member Functions

 Point2 ()
 Constructor. Empty for fast points array allocation. More...
 
 Point2 (T tx, T ty)
 
 Point2 (const Point2 &ot)
 Copying constructor. More...
 
Point2operator= (const Point2 &ot)
 Assignment operator. More...
 
 Point2 (const Point3< T > &ot)
 Point3 conversion. More...
 
Point2operator= (const Point3< T > &ot)
 
 Point2 (const Point4< T > &ot)
 Point4 conversion. More...
 
Point2operator= (const Point4< T > &ot)
 
template<typename T2 >
 Point2 (const Point2< T2 > &ot)
 Type conversion. More...
 
Point2 operator- () const
 Unary minus. More...
 
 operator T * ()
 Conversion to plain form operator. More...
 
 operator const T * () const
 
double length () const
 Length of point. More...
 
double lengthSquared () const
 Square of length of point. More...
 
void normalize ()
 normalizing to unit vector in euclidean norm More...
 
Point2 normalized () const
 
bool isZero () const
 Zero checking. More...
 
void reset ()
 Reset values to default. More...
 
template<typename T2 >
Point2< T > & operator+= (const T2 &val)
 
template<typename T2 >
Point2< T > & operator-= (const T2 &val)
 
template<typename T2 >
Point2< T > & operator*= (const T2 &val)
 
template<typename T2 >
Point2< T > & operator/= (const T2 &val)
 
template<typename T2 >
Point2< T > operator+ (const T2 &val) const
 
template<typename T2 >
Point2< T > operator- (const T2 &val) const
 
template<typename T2 >
Point2< T > operator* (const T2 &val) const
 
template<typename T2 >
Point2< T > operator/ (const T2 &val) const
 
Point2operator+= (const Point2 &ot)
 
Point2operator-= (const Point2 &ot)
 
Point2operator*= (const Point2 &ot)
 
Point2operator/= (const Point2 &ot)
 
Point2 operator+ (const Point2 &p2) const
 
Point2 operator- (const Point2 &p2) const
 
Point2 operator* (const Point2 &p2) const
 
Point2 operator/ (const Point2 &p2) const
 
bool operator== (const Point2 &p2) const
 
bool operator!= (const Point2 &p2) const
 
bool operator> (const Point2 &p2) const
 
bool operator>= (const Point2 &p2) const
 
bool operator< (const Point2 &p2) const
 
bool operator<= (const Point2 &p2) const
 

Static Public Member Functions

static T dot (const Point2< T > &p1, const Point2< T > &p2)
 Inner product operator. More...
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
   } 
 
   T   data [2]
 
}; 
 point data More...
 

Static Public Attributes

static const int size_ = 2
 

Detailed Description

template<typename T>
class artec::sdk::base::Point2< T >

2-dimensional point class. Coordinates are of type T.

Definition at line 36 of file Point.h.

Member Typedef Documentation

template<typename T>
typedef T artec::sdk::base::Point2< T >::value_type

Definition at line 39 of file Point.h.

Constructor & Destructor Documentation

template<typename T>
artec::sdk::base::Point2< T >::Point2 ( )
inlineexplicit

Constructor. Empty for fast points array allocation.

Definition at line 42 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::Point2 ( tx,
ty 
)
inlineexplicit

Definition at line 44 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::Point2 ( const Point2< T > &  ot)
inline

Copying constructor.

Definition at line 47 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::Point2 ( const Point3< T > &  ot)
inline

Point3 conversion.

Definition at line 53 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::Point2 ( const Point4< T > &  ot)
inline

Point4 conversion.

Definition at line 57 of file Point.h.

template<typename T>
template<typename T2 >
artec::sdk::base::Point2< T >::Point2 ( const Point2< T2 > &  ot)
inlineexplicit

Type conversion.

Definition at line 61 of file Point.h.

Member Function Documentation

template<typename T>
static T artec::sdk::base::Point2< T >::dot ( const Point2< T > &  p1,
const Point2< T > &  p2 
)
inlinestatic

Inner product operator.

Definition at line 107 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::isZero ( ) const
inline

Zero checking.

Definition at line 143 of file Point.h.

template<typename T>
double artec::sdk::base::Point2< T >::length ( ) const
inline

Length of point.

Definition at line 117 of file Point.h.

template<typename T>
double artec::sdk::base::Point2< T >::lengthSquared ( ) const
inline

Square of length of point.

Definition at line 120 of file Point.h.

template<typename T>
void artec::sdk::base::Point2< T >::normalize ( )
inline

normalizing to unit vector in euclidean norm

Definition at line 123 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::normalized ( ) const
inline

Definition at line 133 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::operator const T * ( ) const
inline

Definition at line 114 of file Point.h.

template<typename T>
artec::sdk::base::Point2< T >::operator T * ( )
inline

Conversion to plain form operator.

Definition at line 113 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator!= ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 99 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T> artec::sdk::base::Point2< T >::operator* ( const T2 &  val) const
inline

Arithmetical operations with scalar type

Definition at line 74 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::operator* ( const Point2< T > &  p2) const
inline

Arithmetical operations with point

Definition at line 89 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T>& artec::sdk::base::Point2< T >::operator*= ( const T2 &  val)
inline

Arithmetical operations with scalar type

Definition at line 67 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator*= ( const Point2< T > &  ot)
inline

Arithmetical operations with point

Definition at line 84 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T> artec::sdk::base::Point2< T >::operator+ ( const T2 &  val) const
inline

Arithmetical operations with scalar type

Definition at line 70 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::operator+ ( const Point2< T > &  p2) const
inline

Arithmetical operations with point

Definition at line 87 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T>& artec::sdk::base::Point2< T >::operator+= ( const T2 &  val)
inline

Arithmetical operations with scalar type

Definition at line 65 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator+= ( const Point2< T > &  ot)
inline

Arithmetical operations with point

Definition at line 82 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T> artec::sdk::base::Point2< T >::operator- ( const T2 &  val) const
inline

Arithmetical operations with scalar type

Definition at line 72 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::operator- ( const Point2< T > &  p2) const
inline

Arithmetical operations with point

Definition at line 88 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::operator- ( ) const
inline

Unary minus.

Definition at line 94 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T>& artec::sdk::base::Point2< T >::operator-= ( const T2 &  val)
inline

Arithmetical operations with scalar type

Definition at line 66 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator-= ( const Point2< T > &  ot)
inline

Arithmetical operations with point

Definition at line 83 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T> artec::sdk::base::Point2< T >::operator/ ( const T2 &  val) const
inline

Arithmetical operations with scalar type

Definition at line 76 of file Point.h.

template<typename T>
Point2 artec::sdk::base::Point2< T >::operator/ ( const Point2< T > &  p2) const
inline

Arithmetical operations with point

Definition at line 90 of file Point.h.

template<typename T>
template<typename T2 >
Point2<T>& artec::sdk::base::Point2< T >::operator/= ( const T2 &  val)
inline

Arithmetical operations with scalar type

Definition at line 68 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator/= ( const Point2< T > &  ot)
inline

Arithmetical operations with point

Definition at line 85 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator< ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 102 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator<= ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 103 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator= ( const Point2< T > &  ot)
inline

Assignment operator.

Definition at line 50 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator= ( const Point3< T > &  ot)
inline

Definition at line 54 of file Point.h.

template<typename T>
Point2& artec::sdk::base::Point2< T >::operator= ( const Point4< T > &  ot)
inline

Definition at line 58 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator== ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 98 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator> ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 100 of file Point.h.

template<typename T>
bool artec::sdk::base::Point2< T >::operator>= ( const Point2< T > &  p2) const
inline

Logical operations

Definition at line 101 of file Point.h.

template<typename T>
void artec::sdk::base::Point2< T >::reset ( )
inline

Reset values to default.

Definition at line 146 of file Point.h.

Member Data Documentation

union { ... }

point data

template<typename T>
T artec::sdk::base::Point2< T >::data[2]

Definition at line 158 of file Point.h.

template<typename T>
const int artec::sdk::base::Point2< T >::size_ = 2
static

Definition at line 161 of file Point.h.

template<typename T>
T artec::sdk::base::Point2< T >::x

Definition at line 155 of file Point.h.

template<typename T>
T artec::sdk::base::Point2< T >::y

Definition at line 155 of file Point.h.


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