#include <vector3d.h>
Public Member Functions | |
Vector3D () | |
Vector3D (double p) | |
Vector3D (double px, double py, double pz) | |
Vector3D (const Vector3D &v) | |
Vector3D | operator+ (const Vector3D &V) const |
Vector3D | operator- (const Vector3D &V) const |
Vector3D | operator * (const Vector3D &V) const |
Vector3D | operator/ (const Vector3D &V) const |
Vector3D | operator+ (const double &V) const |
Vector3D | operator- (const double &V) const |
Vector3D | operator * (const double &V) const |
Vector3D | operator/ (const double &V) const |
Vector3D | operator+ () const |
Vector3D | operator- () const |
BOOL | operator== (const Vector3D &V) |
BOOL | operator!= (const Vector3D &V) |
Vector3D & | operator+= (const Vector3D &V) |
Vector3D & | operator-= (const Vector3D &V) |
Vector3D & | operator *= (const Vector3D &V) |
double | xcomp () const |
double | ycomp () const |
double | zcomp () const |
double | Length () const |
double | SumSquares () const |
double | Dot (const Vector3D &p) const |
double | SumMult (const Vector3D &p) const |
double | SqrDist (const Vector3D &p) const |
double | DistanceTo (const Vector3D &p) const |
Vector3D | Mix (const Vector3D &mix, double t) const |
void | FaceForward (const Vector3D &p) |
double | Normalise () |
Vector3D | NormaliseI () |
Vector3D | Cross (const Vector3D &q) const |
Static Public Member Functions | |
static Vector3D | Half (const Vector3D &, const Vector3D &) |
static Vector3D | TorusUV (double srad, double trad, double u, double v) |
Public Attributes | |
double | x |
double | y |
double | z |
Definition at line 120 of file vector3d.h.
|
Definition at line 123 of file vector3d.h.
|
|
Definition at line 124 of file vector3d.h.
|
|
Definition at line 125 of file vector3d.h.
|
|
Definition at line 126 of file vector3d.h.
|
|
Definition at line 167 of file vector3d.cpp. 00168 { 00169 Vector3D r; 00170 r.x = y*q.z - z*q.y; 00171 r.y = z*q.x - x*q.z; 00172 r.z = x*q.y - y*q.x; 00173 return r; 00174 }
|
|
Definition at line 157 of file vector3d.h. 00157 { return sqrt(SqrDist(p)); }
|
|
Definition at line 154 of file vector3d.h.
|
|
Definition at line 110 of file vector3d.cpp.
|
|
Definition at line 161 of file vector3d.cpp. 00162 { 00163 return ((p+q).NormaliseI()); 00164 }
|
|
Definition at line 152 of file vector3d.h.
|
|
Definition at line 210 of file vector3d.h. 00211 { 00212 Vector3D v; 00213 v.x = (1.0-t)*x + t*mix.x; 00214 v.y = (1.0-t)*y + t*mix.y; 00215 v.z = (1.0-t)*z + t*mix.z; 00216 return v; 00217 }
|
|
Definition at line 119 of file vector3d.cpp. 00120 { 00121 double l,m; 00122 l = sqrt(x*x + y*y + z*z); 00123 if (l!=0) 00124 { 00125 m=1.0/l; 00126 x*=m; 00127 y*=m; 00128 z*=m; 00129 } 00130 else 00131 { 00132 x=1.0; 00133 y=0; 00134 z=0; 00135 }; 00136 00137 return l; 00138 }
|
|
Definition at line 140 of file vector3d.cpp. 00141 { 00142 double l,m; 00143 l = sqrt(x*x + y*y + z*z); 00144 if (l!=0) 00145 { 00146 m=1.0/l; 00147 x*=m; 00148 y*=m; 00149 z*=m; 00150 } 00151 else 00152 { 00153 x=0; 00154 y=0; 00155 z=0; 00156 }; 00157 00158 return *this; 00159 }
|
|
Definition at line 135 of file vector3d.h.
|
|
Definition at line 130 of file vector3d.h.
|
|
Definition at line 202 of file vector3d.h.
|
|
Definition at line 142 of file vector3d.h.
|
|
Definition at line 138 of file vector3d.h.
|
|
Definition at line 133 of file vector3d.h.
|
|
Definition at line 128 of file vector3d.h.
|
|
Definition at line 186 of file vector3d.h.
|
|
Definition at line 139 of file vector3d.h.
|
|
Definition at line 134 of file vector3d.h.
|
|
Definition at line 129 of file vector3d.h.
|
|
Definition at line 194 of file vector3d.h.
|
|
Definition at line 136 of file vector3d.h.
|
|
Definition at line 131 of file vector3d.h.
|
|
Definition at line 141 of file vector3d.h.
|
|
Definition at line 156 of file vector3d.h.
|
|
Definition at line 155 of file vector3d.h.
|
|
Definition at line 153 of file vector3d.h.
|
|
Definition at line 177 of file vector3d.cpp. 00178 { 00179 Vector3D p; 00180 double theta,phi; 00181 00182 theta = XS_2PI*u; 00183 phi = XS_2PI*v; 00184 00185 p.x = srad + trad*cos(theta); 00186 p.y = trad*sin(theta); 00187 00188 p.z = p.x*sin(phi); 00189 p.x = p.x*cos(phi); 00190 00191 // translate into the positive octant 00192 p.x += srad+trad; 00193 p.y += trad; 00194 p.z += srad+trad; 00195 00196 return p; 00197 }
|
|
Definition at line 148 of file vector3d.h. 00148 { return x; }
|
|
Definition at line 149 of file vector3d.h. 00149 { return y; }
|
|
Definition at line 150 of file vector3d.h. 00150 { return z; }
|
|
Definition at line 174 of file vector3d.h. |
|
Definition at line 175 of file vector3d.h. |
|
Definition at line 176 of file vector3d.h. |