#include <vecmath.h>
Public Member Functions | |
Vector4 () | |
Vector4 (const Vector4 &v) | |
Vector4 (double _x, double _y, double _z, double _w) | |
Vector4 & | operator= (const Vector4 &a) |
const double & | operator[] (int n) const |
double & | operator[] (int n) |
Vector4 & | operator+= (const Vector4 &a) |
Vector4 & | operator-= (const Vector4 &a) |
Vector4 & | operator *= (double s) |
Vector4 | operator- () |
Vector4 | operator+ () |
Vector4 | operator+ (const Vector4 &v) const |
Vector4 | operator- (const Vector4 &v) const |
Vector4 | operator/ (const double s) const |
Vector4 | operator * (const double s) const |
double | operator * (const Vector4 &v) const |
double | length () const |
double | lengthSquared () const |
void | normalize () |
bool | operator== (const Vector4 &v) const |
bool | operator!= (const Vector4 &v) const |
bool | approxEqual (const Vector4 &v, double eps=1e-12) const |
void | print () const |
Private Attributes | |
double | x |
double | y |
double | z |
double | w |
|
Definition at line 594 of file vecmath.h.
|
|
Definition at line 595 of file vecmath.h.
|
|
Definition at line 596 of file vecmath.h.
|
|
Definition at line 672 of file vecmath.h. References EMAN::isZero(), v, w, x, x, y, y, and z. 00672 { 00673 return isZero( x - v.x, eps ) && isZero( y - v.y, eps ) && isZero( z - v.z, eps ) && isZero( w - v.w, eps ); 00674 }
|
|
Definition at line 651 of file vecmath.h. Referenced by EMAN::length(), and EMAN::unit(). 00651 { 00652 return (double) sqrt(x * x + y * y + z * z + w * w); 00653 }
|
|
Definition at line 655 of file vecmath.h.
|
|
Definition at line 659 of file vecmath.h. References EMAN::length(), x, and y.
|
|
Definition at line 647 of file vecmath.h. References v, w, x, x, y, y, and z.
|
|
Definition at line 642 of file vecmath.h. 00642 { 00643 return Vector4( x * s, y * s, z * s, w * s ); 00644 }
|
|
Definition at line 616 of file vecmath.h.
|
|
Definition at line 668 of file vecmath.h. References v, w, x, x, y, y, and z.
|
|
Definition at line 629 of file vecmath.h. References v, w, x, x, y, y, and z.
|
|
Definition at line 625 of file vecmath.h. 00625 { 00626 return *this; 00627 }
|
|
Definition at line 606 of file vecmath.h.
|
|
Definition at line 633 of file vecmath.h. References v, w, x, x, y, y, and z.
|
|
Definition at line 621 of file vecmath.h. 00621 { 00622 return Vector4(-x, -y, -z, -w); 00623 }
|
|
Definition at line 611 of file vecmath.h.
|
|
Definition at line 637 of file vecmath.h.
|
|
Definition at line 598 of file vecmath.h.
|
|
Definition at line 664 of file vecmath.h. References v, w, x, x, y, y, and z.
|
|
Definition at line 604 of file vecmath.h. 00604 { return ((double *) this)[n]; }
|
|
Definition at line 603 of file vecmath.h. 00603 { return ((double *) this)[n]; }
|
|
Definition at line 676 of file vecmath.h.
|
|
Definition at line 681 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), and operator==(). |
|
Definition at line 681 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), and operator==(). |
|
Definition at line 681 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), and operator==(). |
|
Definition at line 681 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), and operator==(). |