#include <geometry.h>
Public Member Functions | |
IntSize (int xx=0, int yy=0, int zz=0) | |
Construct an IntSize object. | |
int | get_ndim () const |
Get its dimension, 1D, 2D, or 3D. | |
int | operator[] (int i) const |
Get the ith direction's size. | |
int & | operator[] (int i) |
Get the ith direction's size. | |
Private Attributes | |
int | data [3] |
Definition at line 52 of file geometry.h.
|
Construct an IntSize object.
Definition at line 61 of file geometry.h. References data.
|
|
Get its dimension, 1D, 2D, or 3D.
Definition at line 72 of file geometry.h. References data. 00073 { 00074 if (data[2] > 1) { 00075 return 3; 00076 } 00077 else if (data[1] > 1) { 00078 return 2; 00079 } 00080 return 1; 00081 }
|
|
Get the ith direction's size. Used as a lvalue.
Definition at line 96 of file geometry.h. References data. 00097 { 00098 return data[i]; 00099 }
|
|
Get the ith direction's size. Used as a rvalue.
Definition at line 87 of file geometry.h. References data. 00088 { 00089 return data[i]; 00090 }
|
|
Definition at line 102 of file geometry.h. |