Artec 3D Scanning SDK  2.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
artec::sdk::base::Point2< T > Class Template Reference

2-dimensional point class. More...

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

Public Types

typedef T value_type
 

Public Member Functions

 Point2 ()
 Constructor. Empty for fast point 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 the 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 40 of file Point.h.

Member Typedef Documentation

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

Definition at line 43 of file Point.h.

Constructor & Destructor Documentation

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

Constructor. Empty for fast point array allocation.

Definition at line 46 of file Point.h.

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

Definition at line 48 of file Point.h.

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

Copying constructor.

Definition at line 51 of file Point.h.

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

Point3 conversion.

Definition at line 57 of file Point.h.

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

Point4 conversion.

Definition at line 61 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 65 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 111 of file Point.h.

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

"Zero" checking

Definition at line 147 of file Point.h.

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

Length of point.

Definition at line 121 of file Point.h.

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

Square of length of point.

Definition at line 124 of file Point.h.

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

Normalizing to unit vector in the Euclidean norm.

Definition at line 127 of file Point.h.

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

Definition at line 137 of file Point.h.

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

Definition at line 118 of file Point.h.

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

Conversion to plain form operator.

Definition at line 117 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>
template<typename T2 >
Point2<T> artec::sdk::base::Point2< T >::operator* ( const T2 &  val) const
inline

Arithmetical operations with the scalar type

Definition at line 78 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 93 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 the scalar type

Definition at line 71 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 88 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 the 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 91 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 the scalar type

Definition at line 69 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 86 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 the 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 92 of file Point.h.

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

Unary minus.

Definition at line 98 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 the scalar type

Definition at line 70 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 87 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 the scalar type

Definition at line 80 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 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 the scalar type

Definition at line 72 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 89 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 106 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 107 of file Point.h.

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

Assignment operator.

Definition at line 54 of file Point.h.

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

Definition at line 58 of file Point.h.

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

Definition at line 62 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 104 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 105 of file Point.h.

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

Reset values to default.

Definition at line 150 of file Point.h.

Member Data Documentation

union { ... }

Point data.

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

Definition at line 162 of file Point.h.

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

Definition at line 165 of file Point.h.

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

Definition at line 159 of file Point.h.

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

Definition at line 159 of file Point.h.


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