#include <vecmath.h>
Public Member Functions | |
| Vector3 () | |
| Vector3 (const Vector3 &v) | |
| Vector3 (double _x, double _y, double _z) | |
| Vector3 & | operator= (const Vector3 &a) |
| const double & | operator[] (int n) const |
| double & | operator[] (int n) |
| Vector3 & | operator+= (const Vector3 &a) |
| Vector3 & | operator-= (const Vector3 &a) |
| Vector3 & | operator *= (double s) |
| Vector3 | operator- () const |
| Vector3 | operator+ () const |
| Vector3 | operator+ (const Vector3 &v) const |
| Vector3 | operator- (const Vector3 &v) const |
| Vector3 | operator/ (const double s) const |
| Vector3 | operator * (const double s) const |
| double | operator * (const Vector3 &v) const |
| Vector3 | operator^ (const Vector3 &v) const |
| double | length () const |
| double | lengthSquared () const |
| void | normalize () |
| bool | operator== (const Vector3 &v) const |
| bool | operator!= (const Vector3 &v) const |
| bool | approxEqual (const Vector3 &v, double eps=1e-12) const |
| void | print () const |
Private Attributes | |
| double | x |
| double | y |
| double | z |
|
|
Definition at line 208 of file vecmath.h.
|
|
|
Definition at line 209 of file vecmath.h.
|
|
||||||||||||||||
|
Definition at line 210 of file vecmath.h.
|
|
||||||||||||
|
Definition at line 293 of file vecmath.h. References EMAN::isZero(), v, x, x, y, y, and z. 00293 {
00294 return isZero( x - v.x, eps ) && isZero( y - v.y, eps ) && isZero( z - v.z, eps );
00295 }
|
|
|
Definition at line 272 of file vecmath.h. Referenced by EMAN::length(), and EMAN::unit(). 00272 {
00273 return (double) sqrt(x * x + y * y + z * z);
00274 }
|
|
|
Definition at line 276 of file vecmath.h.
|
|
|
Definition at line 280 of file vecmath.h. Referenced by EMAN::MarchingCubes::get_normal(), and EMAN::Matrix4::rotation(). 00280 {
00281 double s = 1.0 / (double) sqrt(x * x + y * y + z * z);
00282 x *= s; y *= s; z *= s;
00283 }
|
|
|
Definition at line 261 of file vecmath.h. References v, x, x, y, y, and z.
|
|
|
Definition at line 256 of file vecmath.h. 00256 {
00257 return Vector3( x * s, y * s, z * s );
00258 }
|
|
|
Definition at line 230 of file vecmath.h.
|
|
|
Definition at line 289 of file vecmath.h. References v, x, x, y, y, and z.
|
|
|
Definition at line 243 of file vecmath.h. References v, x, x, y, y, and z.
|
|
|
Definition at line 239 of file vecmath.h. 00239 {
00240 return *this;
00241 }
|
|
|
Definition at line 220 of file vecmath.h.
|
|
|
Definition at line 247 of file vecmath.h. References v, x, x, y, y, and z.
|
|
|
Definition at line 235 of file vecmath.h. 00235 {
00236 return Vector3(-x, -y, -z);
00237 }
|
|
|
Definition at line 225 of file vecmath.h.
|
|
|
Definition at line 251 of file vecmath.h.
|
|
|
Definition at line 212 of file vecmath.h.
|
|
|
Definition at line 285 of file vecmath.h. References v, x, x, y, y, and z.
|
|
|
Definition at line 218 of file vecmath.h. 00218 { return (&x)[n]; }
|
|
|
Definition at line 217 of file vecmath.h. 00217 { return (&x)[n]; }
|
|
|
Definition at line 266 of file vecmath.h. References v, x, x, y, y, and z. 00266 {
00267 return Vector3( y * v.z - z * v.y,
00268 z * v.x - x * v.z,
00269 x * v.y - y * v.x );
00270 }
|
|
|
Definition at line 297 of file vecmath.h.
|
|
|
Definition at line 302 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), operator==(), and operator^(). |
|
|
Definition at line 302 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), operator==(), and operator^(). |
|
|
Definition at line 302 of file vecmath.h. Referenced by approxEqual(), operator *(), operator!=(), operator+(), operator-(), operator==(), and operator^(). |
1.3.9.1