#include <geometry.h>
Public Member Functions | |
IntPoint () | |
Construct a point at the origin location. | |
IntPoint (int xx) | |
Construct a 1D point. | |
IntPoint (int xx, int yy) | |
Construct a 2D point. | |
IntPoint (int xx, int yy, int zz) | |
Construct a 3D point. | |
int | get_ndim () const |
Get the dimension of the point, 1D/2D/3D. | |
int | operator[] (int i) const |
Get the ith direction's coordinate. | |
int & | operator[] (int i) |
Get the ith direction's coordinate. | |
Private Attributes | |
int | data [3] |
int | ndim |
Definition at line 196 of file geometry.h.
|
Construct a point at the origin location.
Definition at line 200 of file geometry.h. References data.
|
|
Construct a 1D point.
Definition at line 211 of file geometry.h. References data.
|
|
Construct a 2D point.
Definition at line 223 of file geometry.h. References data.
|
|
Construct a 3D point.
Definition at line 236 of file geometry.h. References data.
|
|
Get the dimension of the point, 1D/2D/3D.
Definition at line 247 of file geometry.h. 00248 {
00249 return ndim;
00250 }
|
|
Get the ith direction's coordinate. Used as a lvalue.
Definition at line 265 of file geometry.h. References data. 00266 { 00267 return data[i]; 00268 }
|
|
Get the ith direction's coordinate. Used as a rvalue.
Definition at line 256 of file geometry.h. References data. 00257 { 00258 return data[i]; 00259 }
|
|
Definition at line 271 of file geometry.h. |
|
Definition at line 272 of file geometry.h. |