Exemplo n.º 1
0
/*
================
idThread::Event_GetTraceNormal
================
*/
void idThread::Event_GetTraceNormal( void ) {
	if ( trace.fraction < 1.0f ) {
		ReturnVector( trace.c.normal );
	} else {
		ReturnVector( vec3_origin );
	}
}
Exemplo n.º 2
0
/*
================
idThread::Event_AngToUp
================
*/
void idThread::Event_AngToUp( idAngles &ang )
{
    idVec3 vec;

    ang.ToVectors( NULL, NULL, &vec );
    ReturnVector( vec );
}
Exemplo n.º 3
0
/*
================
idThread::Event_VecNormalize
================
*/
void idThread::Event_VecNormalize( idVec3 &vec ) {
	idVec3 n;

	n = vec;
	n.Normalize();
	ReturnVector( n );
}
Exemplo n.º 4
0
/*
================
idThread::Event_GetPersistantVector
================
*/
void idThread::Event_GetPersistantVector( const char *key )
{
    idVec3 result;

    gameLocal.persistentLevelInfo.GetVector( key, "0 0 0", result );
    ReturnVector( result );
}
Exemplo n.º 5
0
/*
================
idThread::Event_SpawnVector
================
*/
void idThread::Event_SpawnVector( const char *key, idVec3 &defaultvalue )
{
    idVec3 result;

    spawnArgs.GetVector( key, va( "%f %f %f", defaultvalue.x, defaultvalue.y, defaultvalue.z ), result );
    ReturnVector( result );
}
Exemplo n.º 6
0
void idThread::Event_RotateVector( idVec3 &vec, idVec3 &ang ) {

	idAngles tempAng(ang);
	idMat3 axis = tempAng.ToMat3();
	idVec3 ret = vec * axis;
	ReturnVector(ret);

}
Exemplo n.º 7
0
/*
================
idThread::Event_VecToOrthoBasisAngles
================
*/
void idThread::Event_VecToOrthoBasisAngles( idVec3 &vec ) {
	idVec3 left, up;
	idAngles ang;

	vec.OrthogonalBasis( left, up );
	idMat3 axis( left, up, vec );

	ang = axis.ToAngles();

	ReturnVector( idVec3( ang[0], ang[1], ang[2] ) );
}
Exemplo n.º 8
0
/*
================
idThread::Event_GetTraceEndPos
================
*/
void idThread::Event_GetTraceEndPos( void ) {
	ReturnVector( trace.endpos );
}
Exemplo n.º 9
0
/*
================
idThread::Event_VecToAngles
================
*/
void idThread::Event_VecToAngles( idVec3 &vec ) {
	idAngles ang = vec.ToAngles();
	ReturnVector( idVec3( ang[0], ang[1], ang[2] ) );
}
Exemplo n.º 10
0
/*
================
idThread::Event_VecCrossProduct
================
*/
void idThread::Event_VecCrossProduct( idVec3 &vec1, idVec3 &vec2 ) {
	ReturnVector( vec1.Cross( vec2 ) );
}
Exemplo n.º 11
0
/*
================
idThread::Event_AngToForward
================
*/
void idThread::Event_AngToForward( idAngles &ang ) {
	ReturnVector( ang.ToForward() );
}