#include <vector.h>
Public Methods | |
| VECTOR () | |
| VECTOR (const SCALAR &a, const SCALAR &b, const SCALAR &c) | |
| SCALAR & | operator[] (const long i) |
| const bool | operator== (const VECTOR &v) const |
| const bool | operator!= (const VECTOR &v) const |
| const VECTOR | operator- () const |
| const VECTOR & | operator= (const VECTOR &v) |
| const VECTOR & | operator+= (const VECTOR &v) |
| const VECTOR & | operator-= (const VECTOR &v) |
| const VECTOR & | operator *= (const SCALAR &s) |
| const VECTOR & | operator/= (const SCALAR &s) |
| const VECTOR | operator+ (const VECTOR &v) const |
| const VECTOR | operator- (const VECTOR &v) const |
| const VECTOR | operator * (const SCALAR &s) const |
| const VECTOR | operator/ (SCALAR s) const |
| const VECTOR | cross (const VECTOR &v) const |
| const SCALAR | dot (const VECTOR &v) const |
| const SCALAR | length () const |
| const VECTOR | unit () const |
| void | normalize () |
| const bool | nearlyEquals (const VECTOR &v, const SCALAR e) const |
Public Attributes | |
| SCALAR | x |
| SCALAR | y |
| SCALAR | z |
Friends | |
| const VECTOR | operator * (const SCALAR &s, const VECTOR &v) |
|
|
Definition at line 16 of file vector.h. Referenced by cross(), operator *(), operator+(), operator-(), and operator/().
|
|
||||||||||||||||
|
Definition at line 18 of file vector.h.
|
|
|
Definition at line 135 of file vector.h. References VECTOR(), x, y, and z. Referenced by Matrix4x4::rotation().
|
|
|
Definition at line 143 of file vector.h. References SCALAR, x, y, and z. Referenced by Plane::Distance(), Plane::Intersection(), Trilinear::Lighting(), Ray::Lighting(), Plane::Plane(), and Matrix4x4::rotation().
|
|
|
Definition at line 150 of file vector.h. References SCALAR. Referenced by AverageTRI::CastNext(), AverageNN::CastNext(), XRayTRI::CastNext(), XRayNN::CastNext(), MaxIntensityTRI::CastNext(), MaxIntensityNN::CastNext(), FirstHitTRI::CastNext(), FirstHitNN::CastNext(), Trilinear::CastNext(), Ray::CastNext(), Trilinear::Lighting(), Ray::Lighting(), normalize(), and unit().
00151 {
00152 return (SCALAR)sqrt( (double)this->dot(*this) );
00153 }
|
|
||||||||||||
|
Definition at line 171 of file vector.h.
|
|
|
Definition at line 164 of file vector.h. References length(). Referenced by Perspective::Initialize(), Raycaster::Initialize(), Trilinear::Lighting(), Ray::Lighting(), Perspective::RotateX(), Raycaster::RotateX(), Perspective::RotateY(), Raycaster::RotateY(), Perspective::RotateZ(), Raycaster::RotateZ(), Raycaster::SetViewingMatrix(), and Raycaster::SetViewingPlanePos().
00165 {
00166 (*this) /= length();
00167 }
|
|
|
Definition at line 113 of file vector.h. References VECTOR().
00114 {
00115 return VECTOR( x*s, y*s, z*s );
00116 }
|
|
|
Definition at line 79 of file vector.h.
|
|
|
Definition at line 36 of file vector.h.
00037 {
00038 return !(v == *this);
00039 }
|
|
|
Definition at line 99 of file vector.h. References VECTOR(), x, y, and z.
|
|
|
Definition at line 60 of file vector.h.
|
|
|
Definition at line 106 of file vector.h. References VECTOR(), x, y, and z.
|
|
|
Definition at line 43 of file vector.h. References VECTOR().
00044 {
00045 return VECTOR( -x, -y, -z );
00046 }
|
|
|
Definition at line 70 of file vector.h.
|
|
|
Definition at line 127 of file vector.h. References VECTOR().
00128 {
00129 s = 1/s;
00130 return VECTOR( s*x, s*y, s*z );
00131 }
|
|
|
Definition at line 88 of file vector.h. References SCALAR.
|
|
|
Definition at line 50 of file vector.h.
|
|
|
Definition at line 31 of file vector.h.
|
|
|
Definition at line 24 of file vector.h. References SCALAR.
00025 {
00026 return *((&x) + i);
00027 }
|
|
|
Definition at line 157 of file vector.h. References length().
00158 {
00159 return (*this) / length();
00160 }
|
|
||||||||||||
|
Definition at line 120 of file vector.h.
00121 {
00122 return v * s;
00123 }
|
|
|
|
1.3-rc2