#include <vecmath.h>
Public Member Functions | |
Point3 () | |
Point3 (const Point3 &p) | |
Point3 (double _x, double _y, double _z) | |
Point3 & | operator= (const Point3 &a) |
const double & | operator[] (int n) const |
double & | operator[] (int n) |
Point3 & | operator+= (const Vector3 &v) |
Point3 & | operator-= (const Vector3 &v) |
Point3 & | operator *= (double s) |
Vector3 | operator- (const Point3 &p) const |
Point3 | operator+ (const Vector3 &v) const |
Point3 | operator- (const Vector3 &v) const |
double | distanceTo (const Point3 &p) const |
double | distanceToSquared (const Point3 &p) const |
double | distanceFromOrigin () const |
double | distanceFromOriginSquared () const |
bool | operator== (const Point3 &p) const |
bool | operator!= (const Point3 &p) const |
bool | approxEqual (const Point3 &p, double eps=1e-12) const |
void | print () const |
Private Attributes | |
double | x |
double | y |
double | z |
|
Definition at line 327 of file vecmath.h.
|
|
Definition at line 328 of file vecmath.h.
|
|
Definition at line 329 of file vecmath.h.
|
|
Definition at line 394 of file vecmath.h. References EMAN::isZero(), x, x, y, y, and z. 00394 { 00395 return isZero( x - p.x, eps ) && isZero( y - p.y, eps ) && isZero( z - p.z, eps ); 00396 }
|
|
Definition at line 378 of file vecmath.h. 00378 { 00379 return (double) sqrt(x * x + y * y + z * z); 00380 }
|
|
Definition at line 382 of file vecmath.h.
|
|
Definition at line 366 of file vecmath.h. 00366 { 00367 return (double) sqrt((p[0] - x) * (p[0] - x) + 00368 (p[1] - y) * (p[1] - y) + 00369 (p[2] - z) * (p[2] - z)); 00370 }
|
|
Definition at line 372 of file vecmath.h. 00372 {
00373 return ((p[0] - x) * (p[0] - x) +
00374 (p[1] - y) * (p[1] - y) +
00375 (p[2] - z) * (p[2] - z));
00376 }
|
|
Definition at line 349 of file vecmath.h.
|
|
Definition at line 390 of file vecmath.h.
|
|
Definition at line 358 of file vecmath.h. 00358 { 00359 return Point3(x + v[0], y + v[1], z + v[2]); 00360 }
|
|
Definition at line 339 of file vecmath.h.
|
|
Definition at line 362 of file vecmath.h. 00362 { 00363 return Point3(x - v[0], y - v[1], z - v[2]); 00364 }
|
|
Definition at line 354 of file vecmath.h. 00354 {
00355 return Vector3(x - p.x, y - p.y, z - p.z);
00356 }
|
|
Definition at line 344 of file vecmath.h.
|
|
Definition at line 331 of file vecmath.h.
|
|
Definition at line 386 of file vecmath.h.
|
|
Definition at line 337 of file vecmath.h. 00337 { return (&x)[n]; }
|
|
Definition at line 336 of file vecmath.h. 00336 { return (&x)[n]; }
|
|
Definition at line 398 of file vecmath.h.
|
|
Definition at line 403 of file vecmath.h. Referenced by approxEqual(), operator!=(), operator-(), and operator==(). |
|
Definition at line 403 of file vecmath.h. Referenced by approxEqual(), operator!=(), operator-(), and operator==(). |
|
Definition at line 403 of file vecmath.h. Referenced by approxEqual(), operator!=(), operator-(), and operator==(). |