29 #include "../precompiled.h"
54 if ( angle == 0.0
f ) {
55 vec.
Set( 0.0
f, 0.0
f, 1.0
f );
93 mat[ 0 ][ 0 ] = 1.0f - ( yy + zz );
94 mat[ 0 ][ 1 ] = xy - wz;
95 mat[ 0 ][ 2 ] = xz + wy;
97 mat[ 1 ][ 0 ] = xy + wz;
98 mat[ 1 ][ 1 ] = 1.0f - ( xx + zz );
99 mat[ 1 ][ 2 ] = yz - wx;
101 mat[ 2 ][ 0 ] = xz - wy;
102 mat[ 2 ][ 1 ] = yz + wx;
103 mat[ 2 ][ 2 ] = 1.0f - ( xx + yy );
162 float omega, cosom, sinom, scale0, scale1;
179 cosom = from.
x * to.
x + from.
y * to.
y + from.
z * to.
z + from.
w * to.
w;
180 if ( cosom < 0.0
f ) {
187 if ( ( 1.0
f - cosom ) > 1e-6
f ) {
189 omega = acos( cosom );
190 sinom = 1.0f / sin( omega );
191 scale0 = sin( ( 1.0
f - t ) * omega ) * sinom;
192 scale1 = sin( t * omega ) * sinom;
194 scale0 = 1.0f - cosom * cosom;
205 *
this = ( scale0 * from ) + ( scale1 * temp );
idMat4 ToMat4(void) const
static float ATan16(float a)
idAngles ToAngles(void) const
const float * ToFloatPtr(void) const
int GetDimension(void) const
const float * ToFloatPtr(void) const
idAngles ToAngles(void) const
idMat3 ToMat3(void) const
void Set(const float x, const float y, const float z)
int GetDimension(void) const
const char * ToString(int precision=2) const
static const char * FloatArrayToString(const float *array, const int length, const int precision)
idQuat & Slerp(const idQuat &from, const idQuat &to, float t)
idRotation ToRotation(void) const
static float Sin16(float a)
static const float M_RAD2DEG
idRotation ToRotation(void) const
GLubyte GLubyte GLubyte GLubyte w
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
static float InvSqrt(float x)
idCQuat ToCQuat(void) const
bool FixDegenerateNormal(void)
GLdouble GLdouble GLdouble y2
idMat3 ToMat3(void) const
idQuat ToQuat(void) const
idAngles ToAngles(void) const
idVec3 ToAngularVelocity(void) const
static float ACos(float a)
idMat4 ToMat4(void) const
const char * ToString(int precision=2) const
idMat4 ToMat4(void) const