Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
C3DTPoint< TYPE > Class Template Reference

The class defines an x, y, z 3D point which can use int, float or double. More...

Detailed Description

template<class TYPE>
class C3DTPoint< TYPE >

The class defines an x, y, z 3D point which can use int, float or double.

Template Parameters
TYPEcan be int (C3DPointI), float (C3DPoint or C3DPointF) or double (C3DPointD)

#include <3DPoint.h>

Inheritance diagram for C3DTPoint< TYPE >:
CPt

Public Member Functions

 C3DTPoint (TYPE *val)
 
 C3DTPoint (int refx, int refy, int refz)
 
 C3DTPoint (float refx, float refy, float refz)
 
 C3DTPoint (double refx, double refy, double refz)
 
 C3DTPoint (const C3DTPoint &pt)
 
 C3DTPoint (const C3DTPoint &pt, const C3DTVector< TYPE > &vect, bool add)
 if add = true, the point is point = pt+vect, if add = false, point = pt-vect
 
unsigned int SizeOf () const
 
C3DPointI Floor () const
 
C3DPointI Ceil () const
 
void Init (TYPE x=(TYPE) 0.0, TYPE y=(TYPE) 0, TYPE z=(TYPE) 0)
 
void Swap (unsigned int swapMode)
 
void SubstractTo (const C3DTPoint &pt)
 return this = pt-this, instead this = this-pt. This can be used for fast computation (using the standard operator return a C3DPointT)
 
void Offset (TYPE value)
 Add value to x, y, z.
 
bool IsAnormal () const
 either infinite or nan. Zero and denormalized value are allowed.
 
bool IsInfinite () const
 Check if one of the coordinate has inf value.
 
bool IsNan (bool resetToZero=false)
 Check if one of the coordinate has nan value. resetToZero nan = true, reset coordinates to zero if any.
 
virtual void To4DPoint (C4DPoint &pt) const
 
void SetValues (const TYPE *values3t)
 Set point from 3 TYPE.
 
void GetFloat (float *values3f) const
 Get point and fill 3 floats.
 
void SetFloat (const float *values3f)
 Set point from 3 floats.
 
void GetDouble (double *values3d) const
 Get point and fill 3 doubles.
 
void SetDouble (const double *values3d)
 Set point from 3 doubles.
 
virtual CPtoperator= (const C4DPoint &pt)
 
virtual void Serialize (CXArchive &ar)
 
virtual CPtoperator= (const CPt &refpoint)
 
template<class TYPE2 >
C3DTPoint< TYPE > & operator= (const C3DTPoint< TYPE2 > &pt)
 
Access functions

Get access to the 3D point x, y, z values

TYPEoperator[] (int i)
 
const TYPEoperator[] (int i) const
 
TYPEValPtr ()
 
const TYPEValPtr () const
 
Operators
double operator* (const C4DTVector< TYPE > &vect) const
 
C3DTPoint operator* (double value) const
 
double Mult (const double &xx, const double &yy, const double &zz) const
 
C3DTPointoperator= (const C3DTPoint &src)
 
C3DTPointoperator= (const C3DTVector< TYPE > &vect)
 
C3DTPoint operator- (const C3DTVector< TYPE > &vect1) const
 
C3DTPoint operator+ (const C3DTVector< TYPE > &vect1) const
 
C3DTPoint operator+ (const C3DTPoint &pt1) const
 
C3DTPoint operator- (const C3DTPoint &pt1) const
 
C3DTPoint operator+ (const C4DTVector< TYPE > &pt1) const
 
C3DTPoint operator/ (double weight) const
 
C3DTPointoperator-= (const C3DTPoint &pt)
 
C3DTPointoperator+= (const C3DTPoint &pt)
 
C3DTPointoperator-= (const C3DTVector< TYPE > &pt)
 
C3DTPointoperator+= (const C3DTVector< TYPE > &pt)
 
C3DTPointoperator*= (double weight)
 
C3DTPointoperator/= (double weight)
 
bool operator== (const C3DTPoint &src) const
 
bool operator!= (const C3DTPoint &src) const
 
Mix type conversion (C3DTPoint<float> to C3DTPoint<double> for example)
template<class TYPE2 >
 C3DTPoint (const C3DTPoint< TYPE2 > &pt)
 
template<class TYPE2 >
 C3DTPoint (const C3DTVector< TYPE2 > &pt)
 
template<class TYPE2 >
C3DTPointoperator= (const C3DTPoint< TYPE2 > &pt)
 
- Public Member Functions inherited from CPt
unsigned int GetFlags () const
 
void SetFlags (unsigned int flags)
 
void SetFlag (POINT_PROPERTIES flag, bool set)
 
void SetFlags (unsigned int flags, bool set)
 
bool IsFlagSet (POINT_PROPERTIES flag) const
 
bool IsOneFlagSet (int flag) const
 

Public Attributes

TYPE x
 
TYPE y
 
TYPE z
 

Friends

class C3DPointList
 

Member Function Documentation

◆ operator=() [1/2]

template<class TYPE >
CPt & C3DTPoint< TYPE >::operator= ( const C4DPoint pt)
virtual

Implements CPt.

◆ operator=() [2/2]

template<class TYPE >
CPt & C3DTPoint< TYPE >::operator= ( const CPt refpoint)
virtual

Reimplemented from CPt.

◆ Serialize()

template<class TYPE >
void C3DTPoint< TYPE >::Serialize ( CXArchive ar)
virtual

Reimplemented from CPt.

◆ To4DPoint()

template<class TYPE >
void C3DTPoint< TYPE >::To4DPoint ( C4DPoint pt) const
virtual

Implements CPt.


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