#include <geometry.h>
Public Member Functions | |
FloatPoint () | |
Construct a point at the origin location. | |
FloatPoint (float xx) | |
Construct a 1D point. | |
FloatPoint (float xx, float yy) | |
Construct a 2D point. | |
FloatPoint (float xx, float yy, float zz) | |
Construct a 3D point. | |
FloatPoint (int xx) | |
Construct a 1D point. | |
FloatPoint (int xx, int yy) | |
Construct a 2D point. | |
FloatPoint (int xx, int yy, int zz) | |
Construct a 3D point. | |
FloatPoint (double xx) | |
Construct a 1D point. | |
FloatPoint (double xx, double yy) | |
Construct a 2D point. | |
FloatPoint (double xx, double yy, double zz) | |
Construct a 3D point. | |
FloatPoint (const FloatPoint &fp) | |
int | get_ndim () const |
Get the dimension of the point, 1D/2D/3D. | |
float | operator[] (int i) const |
Get the ith direction's coordinate. | |
float & | operator[] (int i) |
Get the ith direction's coordinate. | |
operator vector () const | |
operator IntPoint () const | |
FloatPoint & | operator= (const vector< float > &v) |
Private Attributes | |
float | data [3] |
int | ndim |
Definition at line 282 of file geometry.h.
|
Construct a point at the origin location.
Definition at line 287 of file geometry.h. References data.
|
|
Construct a 1D point.
Definition at line 298 of file geometry.h. References data.
|
|
Construct a 2D point.
Definition at line 310 of file geometry.h. References data.
|
|
Construct a 3D point.
Definition at line 323 of file geometry.h. References data.
|
|
Construct a 1D point.
Definition at line 334 of file geometry.h. References data.
|
|
Construct a 2D point.
Definition at line 346 of file geometry.h. References data. 00347 { 00348 data[0] = (float)xx; 00349 data[1] = (float)yy; 00350 data[2] = 0; 00351 ndim = 2; 00352 }
|
|
Construct a 3D point.
Definition at line 359 of file geometry.h. References data. 00360 { 00361 data[0] = (float)xx; 00362 data[1] = (float)yy; 00363 data[2] = (float)zz; 00364 ndim = 3; 00365 }
|
|
Construct a 1D point.
Definition at line 370 of file geometry.h. References data.
|
|
Construct a 2D point.
Definition at line 382 of file geometry.h. References data. 00383 { 00384 data[0] = (float)xx; 00385 data[1] = (float)yy; 00386 data[2] = 0; 00387 ndim = 2; 00388 }
|
|
Construct a 3D point.
Definition at line 395 of file geometry.h. References data. 00396 { 00397 data[0] = (float)xx; 00398 data[1] = (float)yy; 00399 data[2] = (float)zz; 00400 ndim = 3; 00401 }
|
|
Definition at line 403 of file geometry.h. References data, data, and ndim. 00404 { 00405 data[0] = fp.data[0]; 00406 data[1] = fp.data[1]; 00407 data[2] = fp.data[2]; 00408 ndim = fp.ndim; 00409 }
|
|
Get the dimension of the point, 1D/2D/3D.
Definition at line 414 of file geometry.h. Referenced by EMAN::Region::get_string(), and EMAN::Region::inside_region(). 00415 {
00416 return ndim;
00417 }
|
|
Definition at line 442 of file geometry.h. References data. 00442 { return IntPoint((int)data[0],(int)data[1],(int)data[2]); }
|
|
Definition at line 437 of file geometry.h. 00437 { 00438 vector<float> t(data,data+3); 00439 return t; 00440 }
|
|
Definition at line 444 of file geometry.h.
|
|
Get the ith direction's coordinate. Used as a lvalue.
Definition at line 432 of file geometry.h. References data. 00433 { 00434 return data[i]; 00435 }
|
|
Get the ith direction's coordinate. Used as a rvalue.
Definition at line 423 of file geometry.h. References data. 00424 { 00425 return data[i]; 00426 }
|
|
Definition at line 450 of file geometry.h. Referenced by FloatPoint(). |
|
Definition at line 451 of file geometry.h. Referenced by FloatPoint(). |