Size Class Reference

class encapsulating 1D to 3D size More...

#include <size.hh>

Public Member Functions

 Size ()
 Size (const Size &s)
 Size (unsigned int w)
 Size (unsigned int w, unsigned int h)
 Size (unsigned int w, unsigned int h, unsigned int d)
 Size (const Point &p1, const Point &p2)
Point GetHalf () const
unsigned int GetWidth () const
unsigned int GetHeight () const
unsigned int GetDepth () const
unsigned int GetSlab () const
unsigned int GetVol () const
unsigned int GetVolume () const
unsigned int GetDim () const
Sizeoperator= (const Size &s)
unsigned int operator[] (unsigned int index) const
unsigned int & operator[] (unsigned int index)
bool operator== (const Size &s) const
bool operator!= (const Size &s) const
Sizeoperator+= (const Size &s)
Sizeoperator-= (const Size &s)

Detailed Description

class encapsulating 1D to 3D size

Definition at line 39 of file size.hh.


Constructor & Destructor Documentation

Size (  ) 
Size ( const Size s  ) 
Size ( unsigned int  w  )  [explicit]

1D constructor

Size ( unsigned int  w,
unsigned int  h 
) [explicit]

2D constructor

Size ( unsigned int  w,
unsigned int  h,
unsigned int  d 
) [explicit]

3D constructor

Size ( const Point p1,
const Point p2 
)

initialize from two points


Member Function Documentation

unsigned int GetDepth (  )  const

get depth component (convenience to index 2)

unsigned int GetDim (  )  const

return dimensionality (1-3)

Point GetHalf (  )  const

return the point at half the size

for even dimension, its N/2-1, for odd dimension its (N-1)/2

unsigned int GetHeight (  )  const

get height component (convenience to index 1)

unsigned int GetSlab (  )  const

get area (width * height)

unsigned int GetVol (  )  const

get volume (depcrecated, use GetVolume() instead)

unsigned int GetVolume (  )  const

get volume

unsigned int GetWidth (  )  const

get width component (convenience to index 0)

bool operator!= ( const Size s  )  const
Size& operator+= ( const Size s  ) 
Size& operator-= ( const Size s  ) 
Size& operator= ( const Size s  ) 
bool operator== ( const Size s  )  const
unsigned int& operator[] ( unsigned int  index  ) 
unsigned int operator[] ( unsigned int  index  )  const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 6 Dec 2017 for OpenStructure by  doxygen 1.6.1