#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.
EMAN::IntPoint::IntPoint | ( | ) | [inline] |
EMAN::IntPoint::IntPoint | ( | int | xx | ) | [inline, explicit] |
EMAN::IntPoint::IntPoint | ( | int | xx, | |
int | yy | |||
) | [inline] |
EMAN::IntPoint::IntPoint | ( | int | xx, | |
int | yy, | |||
int | zz | |||
) | [inline] |
int EMAN::IntPoint::get_ndim | ( | ) | const [inline] |
Get the dimension of the point, 1D/2D/3D.
Definition at line 247 of file geometry.h.
References ndim.
00248 { 00249 return ndim; 00250 }
int& EMAN::IntPoint::operator[] | ( | int | i | ) | [inline] |
Get the ith direction's coordinate.
Used as a lvalue.
i | The ith direction, with 0 is x, 1 is y, 2 is z. |
Definition at line 265 of file geometry.h.
References data.
00266 { 00267 return data[i]; 00268 }
int EMAN::IntPoint::operator[] | ( | int | i | ) | const [inline] |
Get the ith direction's coordinate.
Used as a rvalue.
i | The ith direction, with 0 is x, 1 is y, 2 is z. |
Definition at line 256 of file geometry.h.
References data.
00257 { 00258 return data[i]; 00259 }
int EMAN::IntPoint::data[3] [private] |
int EMAN::IntPoint::ndim [private] |