Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
9 years ago
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#pragma once
9 years ago
#if !defined( STUDIO_UTIL_H )
#define STUDIO_UTIL_H
#ifndef M_PI
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
#endif
#ifndef PITCH
// MOVEMENT INFO
// up / down
#define PITCH 0
// left / right
#define YAW 1
// fall over
#define ROLL 2
#endif
9 years ago
#define FDotProduct( a, b ) ( fabs( ( a[0] ) * ( b[0] ) ) + fabs( ( a[1] ) * ( b[1] ) ) + fabs( ( a[2] ) * ( b[2] ) ) )
9 years ago
9 years ago
void AngleMatrix( const float *angles, float (*matrix)[4] );
int VectorCompare( const float *v1, const float *v2 );
void CrossProduct( const float *v1, const float *v2, float *cross );
void VectorTransform( const float *in1, float in2[3][4], float *out );
void ConcatTransforms( float in1[3][4], float in2[3][4], float out[3][4] );
9 years ago
void MatrixCopy( float in[3][4], float out[3][4] );
void QuaternionMatrix( vec4_t quaternion, float (*matrix)[4] );
void QuaternionSlerp( vec4_t p, vec4_t q, float t, vec4_t qt );
void AngleQuaternion( float *angles, vec4_t quaternion );
9 years ago
#endif // STUDIO_UTIL_H