public: make vec3_origin and identity matrix inlined
This commit is contained in:
parent
13a0afef06
commit
35c9323de6
3 changed files with 15 additions and 21 deletions
|
@ -19,13 +19,6 @@ GNU General Public License for more details.
|
||||||
#include "com_model.h"
|
#include "com_model.h"
|
||||||
#include "xash3d_mathlib.h"
|
#include "xash3d_mathlib.h"
|
||||||
|
|
||||||
const matrix3x4 m_matrix3x4_identity =
|
|
||||||
{
|
|
||||||
{ 1, 0, 0, 0 }, // PITCH [forward], org[0]
|
|
||||||
{ 0, 1, 0, 0 }, // YAW [right] , org[1]
|
|
||||||
{ 0, 0, 1, 0 }, // ROLL [up] , org[2]
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
========================================================================
|
========================================================================
|
||||||
|
|
||||||
|
@ -225,14 +218,6 @@ void Matrix3x4_TransformAABB( const matrix3x4 world, const vec3_t mins, const ve
|
||||||
VectorAdd( worldCenter, worldExtents, absmax );
|
VectorAdd( worldCenter, worldExtents, absmax );
|
||||||
}
|
}
|
||||||
|
|
||||||
const matrix4x4 m_matrix4x4_identity =
|
|
||||||
{
|
|
||||||
{ 1, 0, 0, 0 }, // PITCH
|
|
||||||
{ 0, 1, 0, 0 }, // YAW
|
|
||||||
{ 0, 0, 1, 0 }, // ROLL
|
|
||||||
{ 0, 0, 0, 1 }, // ORIGIN
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
========================================================================
|
========================================================================
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ GNU General Public License for more details.
|
||||||
|
|
||||||
static const word hull_table[] = { 2, 4, 6, 8, 12, 16, 18, 24, 28, 32, 36, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
static const word hull_table[] = { 2, 4, 6, 8, 12, 16, 18, 24, 28, 32, 36, 40, 48, 54, 56, 60, 64, 72, 80, 112, 120, 128, 140, 176 };
|
||||||
|
|
||||||
const vec3_t vec3_origin = { 0, 0, 0 };
|
|
||||||
const int boxpnt[6][4] =
|
const int boxpnt[6][4] =
|
||||||
{
|
{
|
||||||
{ 0, 4, 6, 2 }, // +X
|
{ 0, 4, 6, 2 }, // +X
|
||||||
|
|
|
@ -139,10 +139,20 @@ CONSTANTS GLOBALS
|
||||||
|
|
||||||
===========================
|
===========================
|
||||||
*/
|
*/
|
||||||
extern const vec3_t vec3_origin;
|
// a1ba: we never return pointers to these globals
|
||||||
|
// so help compiler optimize constants away
|
||||||
|
#define vec3_origin ((vec3_t){ 0.0f, 0.0f, 0.0f })
|
||||||
|
#define m_matrix3x4_identity ((matrix3x4) { \
|
||||||
|
{ 1.0f, 0.0f, 0.0f, 0.0f }, \
|
||||||
|
{ 0.0f, 1.0f, 0.0f, 0.0f }, \
|
||||||
|
{ 0.0f, 0.0f, 1.0f, 0.0f }} )
|
||||||
|
#define m_matrix4x4_identity ((matrix4x4) { \
|
||||||
|
{ 1.0f, 0.0f, 0.0f, 0.0f }, \
|
||||||
|
{ 0.0f, 1.0f, 0.0f, 0.0f }, \
|
||||||
|
{ 0.0f, 0.0f, 1.0f, 0.0f }, \
|
||||||
|
{ 0.0f, 0.0f, 0.0f, 1.0f }} )
|
||||||
|
|
||||||
extern const int boxpnt[6][4];
|
extern const int boxpnt[6][4];
|
||||||
extern const matrix3x4 m_matrix3x4_identity;
|
|
||||||
extern const matrix4x4 m_matrix4x4_identity;
|
|
||||||
extern const float m_bytenormals[NUMVERTEXNORMALS][3];
|
extern const float m_bytenormals[NUMVERTEXNORMALS][3];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue