#include <math_vector.h>
Inheritance diagram for idVec3_t:

Public Member Functions | |
| idVec3_t & | Cross (const idVec3_t &a, const idVec3_t &b) |
| idVec3_t | Cross (const idVec3_t &a) const |
| idVec3_t & | Cross (const idVec3_t &a, const idVec3_t &b) |
| idVec3_t | Cross (const idVec3_t &a) const |
| idVec3_t (const float x, const float y, const float z) | |
| idVec3_t () | |
| idVec3_t (const float x, const float y, const float z) | |
| idVec3_t () | |
| float | Length (void) const |
| float | Length (void) const |
| float | Normalize (void) |
| float | Normalize (void) |
| idVec3_t | operator * (const float a) const |
| float | operator * (const idVec3_t &a) const |
| idVec3_t | operator * (const float a) const |
| float | operator * (const idVec3_t &a) const |
| idVec3_t & | operator *= (const float a) |
| idVec3_t & | operator *= (const float a) |
| operator float * () | |
| operator float * () | |
| int | operator!= (const idVec3_t &a) const |
| int | operator!= (const idVec3_t &a) const |
| idVec3_t | operator+ (const idVec3_t &a) const |
| idVec3_t | operator+ (const idVec3_t &a) const |
| idVec3_t & | operator+= (const idVec3_t &a) |
| idVec3_t & | operator+= (const idVec3_t &a) |
| idVec3_t | operator- (const idVec3_t &a) const |
| idVec3_t | operator- () const |
| idVec3_t | operator- (const idVec3_t &a) const |
| idVec3_t | operator- () const |
| idVec3_t & | operator-= (const idVec3_t &a) |
| idVec3_t & | operator-= (const idVec3_t &a) |
| idVec3_t & | operator= (const idVec3_t &a) |
| idVec3_t & | operator= (const idVec3_t &a) |
| int | operator== (const idVec3_t &a) const |
| int | operator== (const idVec3_t &a) const |
| float & | operator[] (const int index) |
| float | operator[] (const int index) const |
| float & | operator[] (const int index) |
| float | operator[] (const int index) const |
| void | set (const float x, const float y, const float z) |
| void | set (const float x, const float y, const float z) |
| void | Snap (void) |
| void | Snap (void) |
| void | SnapTowards (const idVec3_t &to) |
| void | SnapTowards (const idVec3_t &to) |
| char * | string (void) |
| char * | string (void) |
| angles_t | toAngles (void) |
| angles_t | toAngles (void) |
| float | toPitch (void) |
| float | toPitch (void) |
| float | toYaw (void) |
| float | toYaw (void) |
| void | Zero (void) |
| void | Zero (void) |
Data Fields | |
| float | x |
| float | y |
| float | z |
Friends | |
| idVec3_t | LerpVector (const idVec3_t &w1, const idVec3_t &w2, const float t) |
| idVec3_t | LerpVector (const idVec3_t &w1, const idVec3_t &w2, const float t) |
| idVec3_t | operator * (float a, idVec3_t b) |
| idVec3_t | operator * (float a, idVec3_t b) |
|
|
Definition at line 134 of file math_vector.h. Referenced by Cross(), operator *(), operator+(), and operator-(). 00134 {};
|
|
||||||||||||||||
|
Definition at line 185 of file math_vector.h. References ID_INLINE, x, y, and z. 00185 {
00186 this->x = x;
00187 this->y = y;
00188 this->z = z;
00189 #ifdef FAT_VEC3
00190 this->dist = 0.0f;
00191 #endif
00192 }
|
|
|
Definition at line 132 of file math_vector.h. 00132 {};
|
|
||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
Definition at line 304 of file math_vector.h. References a, b, ID_INLINE, x, y, and z. 00304 {
00305 x = a.y * b.z - a.z * b.y;
00306 y = a.z * b.x - a.x * b.z;
00307 z = a.x * b.y - a.y * b.x;
00308
00309 return *this;
00310 }
|
|
|
Definition at line 300 of file math_vector.h. References a, ID_INLINE, idVec3_t(), x, x, y, z, and z. Referenced by mat3_t::OrthoNormalize().
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 312 of file math_vector.h. References ID_INLINE, idSqrt(), length(), x, y, and z. Referenced by idInterpolatedPosition::getPosition(), idSplineList::initPosition(), Normalize(), idPointListInterface::selectPointByRay(), idInterpolatedPosition::start(), and idSplineList::totalDistance(). 00312 {
00313 float length;
00314
00315 length = x * x + y * y + z * z;
00316 return ( float )idSqrt( length );
00317 }
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 319 of file math_vector.h. References ID_INLINE, Length(), length(), x, y, and z. Referenced by idCameraDef::getCameraInfo(), and mat3_t::OrthoNormalize(). 00319 {
00320 float length;
00321 float ilength;
00322
00323 length = this->Length();
00324 if ( length ) {
00325 ilength = 1.0f / length;
00326 x *= ilength;
00327 y *= ilength;
00328 z *= ilength;
00329 }
00330
00331 return length;
00332 }
|
Here is the call graph for this function:

|
|
|
|
|
|
|
|
Definition at line 232 of file math_vector.h. References a, ID_INLINE, idVec3_t(), x, y, and z. 00232 {
00233 return idVec3_t( x * a, y * a, z * a );
00234 }
|
Here is the call graph for this function:

|
|
Definition at line 228 of file math_vector.h. References a, ID_INLINE, x, y, and z.
|
|
|
|
|
|
Definition at line 260 of file math_vector.h. References ID_INLINE, x, y, and z.
|
|
|
|
|
|
Definition at line 202 of file math_vector.h. References ID_INLINE. 00202 {
00203 return &x;
00204 }
|
|
|
|
|
|
Definition at line 284 of file math_vector.h. References a, ID_INLINE, Q_fabs(), x, y, and z. 00284 {
00285 if ( Q_fabs( x - a.x ) > EQUAL_EPSILON ) {
00286 return true;
00287 }
00288
00289 if ( Q_fabs( y - a.y ) > EQUAL_EPSILON ) {
00290 return true;
00291 }
00292
00293 if ( Q_fabs( z - a.z ) > EQUAL_EPSILON ) {
00294 return true;
00295 }
00296
00297 return false;
00298 }
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 240 of file math_vector.h. References a, ID_INLINE, idVec3_t(), x, y, and z.
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 244 of file math_vector.h. References a, ID_INLINE, x, y, and z.
|
|
|
|
|
|
|
|
|
Definition at line 224 of file math_vector.h. References a, ID_INLINE, idVec3_t(), x, y, and z.
|
Here is the call graph for this function:

|
|
Definition at line 206 of file math_vector.h. References ID_INLINE, idVec3_t(), x, y, and z. 00206 {
00207 return idVec3_t( -x, -y, -z );
00208 }
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 252 of file math_vector.h. References a, ID_INLINE, x, y, and z.
|
|
|
|
|
|
Definition at line 210 of file math_vector.h. References a, ID_INLINE, x, y, and z.
|
|
|
|
|
|
Definition at line 268 of file math_vector.h. References a, ID_INLINE, Q_fabs(), x, y, and z. 00268 {
00269 if ( Q_fabs( x - a.x ) > EQUAL_EPSILON ) {
00270 return false;
00271 }
00272
00273 if ( Q_fabs( y - a.y ) > EQUAL_EPSILON ) {
00274 return false;
00275 }
00276
00277 if ( Q_fabs( z - a.z ) > EQUAL_EPSILON ) {
00278 return false;
00279 }
00280
00281 return true;
00282 }
|
Here is the call graph for this function:

|
|
|
|
|
|
|
|
Reimplemented in vec4_t, idVec5_t, vec4_t, and idVec5_t. Definition at line 198 of file math_vector.h. References ID_INLINE. 00198 {
00199 return ( &x )[ index ];
00200 }
|
|
|
Reimplemented in vec4_t, idVec5_t, vec4_t, and idVec5_t. Definition at line 194 of file math_vector.h. References ID_INLINE. 00194 {
00195 return ( &x )[ index ];
00196 }
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Definition at line 218 of file math_vector.h. References ID_INLINE, x, y, and z. Referenced by idInterpolatedPosition::addPoint(), idFixedPosition::addPoint(), idSplineList::clear(), mat3_t::Clear(), and angles_t::toVectors().
|
|
|
|
|
|
Definition at line 340 of file math_vector.h. References ID_INLINE, x, y, and z. Referenced by idSplineList::setSelectedPoint(). 00340 {
00341 x = float( int( x ) );
00342 y = float( int( y ) );
00343 z = float( int( z ) );
00344 }
|
|
|
|
|
|
Definition at line 356 of file math_vector.h. References ID_INLINE, x, y, and z. 00356 {
00357 if ( to.x <= x ) {
00358 x = float( int( x ) );
00359 } else {
00360 x = float( int( x ) + 1 );
00361 }
00362
00363 if ( to.y <= y ) {
00364 y = float( int( y ) );
00365 } else {
00366 y = float( int( y ) + 1 );
00367 }
00368
00369 if ( to.z <= z ) {
00370 z = float( int( z ) );
00371 } else {
00372 z = float( int( z ) + 1 );
00373 }
00374 }
|
|
|
|
|
|
Definition at line 132 of file math_vector.cpp. References s, sprintf(), x, y, and z. Referenced by CG_DrawBlueName(), and CG_DrawRedName(). 00132 {
00133 static int index = 0;
00134 static char str[ 8 ][ 36 ];
00135 char *s;
00136
00137 // use an array so that multiple toString's won't collide
00138 s = str[ index ];
00139 index = (index + 1)&7;
00140
00141 sprintf( s, "%.2f %.2f %.2f", x, y, z );
00142
00143 return s;
00144 }
|
Here is the call graph for this function:

|
|
|
|
|
|
|
|
|
|
|
Definition at line 56 of file math_vector.cpp. References atan2(), idSqrt(), x, y, and z. 00056 {
00057 float forward;
00058 float pitch;
00059
00060 if ( ( x == 0 ) && ( y == 0 ) ) {
00061 if ( z > 0 ) {
00062 pitch = 90;
00063 } else {
00064 pitch = 270;
00065 }
00066 } else {
00067 forward = ( float )idSqrt( x * x + y * y );
00068 pitch = atan2( z, forward ) * 180 / M_PI;
00069 if ( pitch < 0 ) {
00070 pitch += 360;
00071 }
00072 }
00073
00074 return pitch;
00075 }
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 41 of file math_vector.cpp. 00041 {
00042 float yaw;
00043
00044 if ( ( y == 0 ) && ( x == 0 ) ) {
00045 yaw = 0;
00046 } else {
00047 yaw = atan2( y, x ) * 180 / M_PI;
00048 if ( yaw < 0 ) {
00049 yaw += 360;
00050 }
00051 }
00052
00053 return yaw;
00054 }
|
Here is the call graph for this function:

|
|
|
|
|
Definition at line 334 of file math_vector.h. References ID_INLINE, x, y, and z. Referenced by idInterpolatedPosition::init(), and idFixedPosition::init().
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||
|
Definition at line 236 of file math_vector.h.
|
|
||||||||||||
|
Definition at line 236 of file math_vector.h.
|
|
|
|
1.3.9.1