120 lines
3.9 KiB
C
120 lines
3.9 KiB
C
/*******************************************************************************************
|
|
|
|
File : Matrix.h
|
|
Date : 24 july 96
|
|
I have nothing to say more.
|
|
|
|
********************************************************************************************/
|
|
/*
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
You must do :
|
|
#define TDE_GLOBALS
|
|
in one (and only one) .c file of your Module.
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
*/
|
|
|
|
/* To avoid unnecessary includes : */
|
|
#ifndef __TDE_MATRIX_H
|
|
#define __TDE_MATRIX_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
/* For DLLs who are using this module : */
|
|
#undef CPA_EXPORT
|
|
#if defined(CPA_WANTS_IMPORT)
|
|
#define CPA_EXPORT __declspec(dllimport)
|
|
#elif defined(CPA_WANTS_EXPORT)
|
|
#define CPA_EXPORT __declspec(dllexport)
|
|
#else
|
|
#define CPA_EXPORT
|
|
#endif
|
|
|
|
|
|
/* For Global declaration in C files : */
|
|
#ifndef TDE_GLOBALS
|
|
#define __TDE_EXTERN extern
|
|
#else /* !TDE_GLOBALS */
|
|
#define __TDE_EXTERN
|
|
#endif /* !TDE_GLOBALS */
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
INCLUDES FILES :
|
|
Include here any other header files of your module you need !
|
|
Ex :
|
|
#include "toto.h"
|
|
Note : Do Not include header files from other Modules (do this in C files
|
|
only)
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
CONSTANT DECLARATION:
|
|
Ex :
|
|
#define TDE_C_LMAX 100
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
TYPES DEFINITION :
|
|
Declare here any type you need, and constant you need to do this :
|
|
Ex : typedef struct TDE_tdstToto_
|
|
{
|
|
long aLMAX_lBuffer[TDE_C_LMAX];
|
|
...
|
|
} TDE_tdst_Toto ;
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
GLOBAL VARIABLE DECLARATION :
|
|
Ex :
|
|
__TDE_EXTERN <type> <variable name>
|
|
#ifdef TDE_GLOBALS
|
|
= <initial values>
|
|
#endif
|
|
;
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
FUNCTIONS DECLARATION:
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
extern void TDE_vGetTranslateVertexMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix, TDE_tdsVertex *p_stTranslate);
|
|
extern void TDE_vGetAngleMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix, TDE_tdxAngle *p_xAngle);
|
|
extern void TDE_vCreateRotationMatrix(TDE_tdsMatrix *p_stMatrix, TDE_tdxAngle xAngle);
|
|
extern void TDE_vCreateSuperObjectMatrix(TDE_tdsSuperObjectMatrix *p_stMatrix);
|
|
extern void TDE_vCreateSuperObjectDescendancyMatrices(TDE_tdsSuperObject *p_stSuperObject);
|
|
extern void TDE_vMulRxSMatrixByVertex(TDE_tdsSuperObjectMatrix *p_stMat, TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stR);
|
|
extern void TDE_vMulMatrixByVertex(TDE_tdsMatrix *p_stMat, TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stR);
|
|
extern void TDE_vMulMatrixMatrix(TDE_tdsSuperObjectMatrix *p_stMat1, TDE_tdsSuperObjectMatrix *p_stMat2, TDE_tdsSuperObjectMatrix *p_stResult);
|
|
extern void TDE_vMulVertexToValue(TDE_tdsVertex *p_stV, TDE_tdxValue xValue, TDE_tdsVertex *p_stResult);
|
|
extern void TDE_vAddVertexToVertex(TDE_tdsVertex *p_stV1, TDE_tdsVertex *p_stV2, TDE_tdsVertex *p_stResult);
|
|
extern void TDE_vSubVertexToVertex(TDE_tdsVertex *p_stV1, TDE_tdsVertex *p_stV2, TDE_tdsVertex *p_stResult);
|
|
extern TDE_tdxValue TDE_xNormeVertex(TDE_tdsVertex *p_stV);
|
|
extern void TDE_vNormerVertex(TDE_tdsVertex *p_stV, TDE_tdsVertex *p_stResult);
|
|
extern void ResetMatrixStack(TDE_tdsCamera *stCamera);
|
|
extern void PushMatrix(TDE_tdsSuperObjectMatrix *p_stMat);
|
|
extern void PopMatrix();
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#endif /* __TDE_MATRIX_H */
|
|
|
|
|
|
|
|
|