OpenStructure
Public Member Functions | Data Fields
Point Class Reference

#include <point.hh>

Inherits additive< Point, boost::additive2< Point, Size, boost::multipliable2< Point, int, boost::less_than_comparable< Point, boost::equality_comparable< Point > > > > >.

Inherited by Peak.

Public Member Functions

 Point ()
 
 Point (const Point &p)
 
 Point (int a)
 
 Point (int a, int b)
 
 Point (int a, int b, int c)
 
 Point (const Vec2 &v)
 
 Point (const Vec3 &v)
 
 Point (const Vec4 &v)
 
 Point (const Size &size)
 
Point Mirror (int planes)
 
int & operator[] (unsigned int index)
 
int operator[] (unsigned int index) const
 
int & At (unsigned int index)
 
int At (unsigned int index) const
 
Pointoperator= (const Point &p)
 
Pointoperator+= (const Point &p)
 
Pointoperator-= (const Point &p)
 
Point operator- () const
 
Pointoperator+= (const Size &p)
 
Pointoperator-= (const Size &p)
 
bool operator== (const Point &p) const
 
bool operator< (const Point &p) const
 
Pointoperator*= (int s)
 
Vec2 ToVec2 () const
 
Vec3 ToVec3 () const
 
Vec4 ToVec4 () const
 

Data Fields

int x
 
int y
 
int z
 

Detailed Description

class encapsulating 1D to 3D point

Definition at line 43 of file point.hh.

Constructor & Destructor Documentation

◆ Point() [1/9]

Point ( )
inline

Definition at line 49 of file point.hh.

◆ Point() [2/9]

Point ( const Point p)
inline

Definition at line 56 of file point.hh.

◆ Point() [3/9]

Point ( int  a)
inline

1D int constructor

Definition at line 65 of file point.hh.

◆ Point() [4/9]

Point ( int  a,
int  b 
)
inline

2D int constructor

Definition at line 73 of file point.hh.

◆ Point() [5/9]

Point ( int  a,
int  b,
int  c 
)
inline

3D int constructor

Definition at line 81 of file point.hh.

◆ Point() [6/9]

Point ( const Vec2 &  v)
inlineexplicit

conversion from Vec2

Definition at line 89 of file point.hh.

◆ Point() [7/9]

Point ( const Vec3 &  v)
inlineexplicit

conversion from Vec3

Definition at line 98 of file point.hh.

◆ Point() [8/9]

Point ( const Vec4 &  v)
inlineexplicit

conversion from Vec4 (normalization)

Definition at line 107 of file point.hh.

◆ Point() [9/9]

Point ( const Size size)

(implicit) conversion of size to point

Member Function Documentation

◆ At() [1/2]

int& At ( unsigned int  index)
inline

Definition at line 142 of file point.hh.

◆ At() [2/2]

int At ( unsigned int  index) const
inline

Definition at line 148 of file point.hh.

◆ Mirror()

Point Mirror ( int  planes)

return mirror point according to planes

◆ operator*=()

Point& operator*= ( int  s)
inline

Definition at line 171 of file point.hh.

◆ operator+=() [1/2]

Point& operator+= ( const Point p)

◆ operator+=() [2/2]

Point& operator+= ( const Size p)

◆ operator-()

Point operator- ( ) const

◆ operator-=() [1/2]

Point& operator-= ( const Point p)

◆ operator-=() [2/2]

Point& operator-= ( const Size p)

◆ operator<()

bool operator< ( const Point p) const

◆ operator=()

Point& operator= ( const Point p)

◆ operator==()

bool operator== ( const Point p) const

◆ operator[]() [1/2]

int& operator[] ( unsigned int  index)
inline

Definition at line 129 of file point.hh.

◆ operator[]() [2/2]

int operator[] ( unsigned int  index) const
inline

Definition at line 135 of file point.hh.

◆ ToVec2()

Vec2 ToVec2 ( ) const

◆ ToVec3()

Vec3 ToVec3 ( ) const

◆ ToVec4()

Vec4 ToVec4 ( ) const

Field Documentation

◆ x

int x

Definition at line 178 of file point.hh.

◆ y

int y

Definition at line 179 of file point.hh.

◆ z

int z

Definition at line 180 of file point.hh.


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