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::Point3< T > Class Template Reference

3-dimensional point class. More...

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

Public Types

typedef T value_type
 

Public Member Functions

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

Static Public Member Functions

static T dot (const Point3< T > &p1, const Point3< T > &p2)
 Inner product operator. More...
 
static Point3< T > cross (const Point3< T > &p1, const Point3< T > &p2)
 Cross product of two points. More...
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
      T   z
 
   } 
 
   T   data [3]
 
}; 
 Point data. More...
 

Static Public Attributes

static const int size_ = 3
 

Detailed Description

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

3-dimensional point class.

Coordinates are of type T. Vertex coordinates and normal vectors.

Definition at line 25 of file Point.h.

Member Typedef Documentation

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

Definition at line 198 of file Point.h.

Constructor & Destructor Documentation

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

Constructor. Empty for fast point-array allocation.

Definition at line 201 of file Point.h.

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

Definition at line 203 of file Point.h.

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

Copying constructor.

Definition at line 206 of file Point.h.

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

Point2 conversion.

Definition at line 212 of file Point.h.

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

Point4 conversion.

Definition at line 216 of file Point.h.

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

Type conversion.

Definition at line 220 of file Point.h.

Member Function Documentation

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

Cross product of two points.

Definition at line 281 of file Point.h.

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

Inner product operator.

Definition at line 275 of file Point.h.

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

"Zero" checking

Definition at line 318 of file Point.h.

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

Distance of the point from the origin.

Definition at line 291 of file Point.h.

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

Square of distance of the point from the origin.

Definition at line 294 of file Point.h.

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

Normalization to unit vector in the euclidean norm.

Definition at line 297 of file Point.h.

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

Definition at line 308 of file Point.h.

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

Definition at line 288 of file Point.h.

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

Conversion to plain form operator.

Definition at line 287 of file Point.h.

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

Logical operations

Definition at line 261 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 233 of file Point.h.

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

Arithmetical operations with point

Definition at line 248 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 226 of file Point.h.

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

Arithmetical operations with point

Definition at line 243 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 229 of file Point.h.

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

Arithmetical operations with point

Definition at line 246 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 224 of file Point.h.

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

Arithmetical operations with point

Definition at line 241 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 231 of file Point.h.

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

Arithmetical operations with point

Definition at line 247 of file Point.h.

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

Unary minus.

Definition at line 253 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 225 of file Point.h.

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

Arithmetical operations with point

Definition at line 242 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 235 of file Point.h.

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

Arithmetical operations with point

Definition at line 249 of file Point.h.

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

Arithmetical operations with the scalar type

Definition at line 227 of file Point.h.

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

Arithmetical operations with point

Definition at line 244 of file Point.h.

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

Logical operations

Definition at line 267 of file Point.h.

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

Logical operations

Definition at line 268 of file Point.h.

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

Assignment operator.

Definition at line 209 of file Point.h.

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

Definition at line 213 of file Point.h.

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

Definition at line 217 of file Point.h.

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

Logical operations

Definition at line 257 of file Point.h.

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

Logical operations

Definition at line 262 of file Point.h.

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

Logical operations

Definition at line 263 of file Point.h.

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

Reset values to default.

Definition at line 321 of file Point.h.

Member Data Documentation

union { ... }

Point data.

template<typename T>
T artec::sdk::base::Point3< T >::data[3]

Definition at line 333 of file Point.h.

template<typename T>
const int artec::sdk::base::Point3< T >::size_ = 3
static

Definition at line 336 of file Point.h.

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

Definition at line 330 of file Point.h.

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

Definition at line 330 of file Point.h.

template<typename T>
T artec::sdk::base::Point3< T >::z

Definition at line 330 of file Point.h.


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