#include "math_vector.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
Include dependency graph for math_vector.cpp:

Go to the source code of this file.
Defines | |
| #define | LERP_DELTA 1e-6 |
| #define | M_PI 3.14159265358979323846 |
Functions | |
| idVec3_t | LerpVector (idVec3_t &w1, idVec3_t &w2, const float t) |
Variables | |
| Bounds | boundsZero |
| idVec3_t | vec_zero (0.0f, 0.0f, 0.0f) |
|
|
Definition at line 35 of file math_vector.cpp. |
|
|
Definition at line 33 of file math_vector.cpp. |
|
||||||||||||||||
|
Definition at line 107 of file math_vector.cpp. References acos(), sin(), and t. 00107 {
00108 float omega, cosom, sinom, scale0, scale1;
00109
00110 cosom = w1 * w2;
00111 if ( ( 1.0 - cosom ) > LERP_DELTA ) {
00112 omega = acos( cosom );
00113 sinom = sin( omega );
00114 scale0 = sin( ( 1.0 - t ) * omega ) / sinom;
00115 scale1 = sin( t * omega ) / sinom;
00116 } else {
00117 scale0 = 1.0 - t;
00118 scale1 = t;
00119 }
00120
00121 return ( w1 * scale0 + w2 * scale1 );
00122 }
|
Here is the call graph for this function:

|
|
Definition at line 39 of file math_vector.cpp. |
|
|
|
1.3.9.1