81 lines
3.5 KiB
C
81 lines
3.5 KiB
C
/*
|
|
MODULE : COL (Intersection & Collision Library)
|
|
AUTHOR : Frederic PHILIPPE
|
|
UBI R&D
|
|
FILE : CollGO.h (Geometric object collision)
|
|
*/
|
|
|
|
#ifndef COL_COLLGO_H
|
|
#define COL_COLLGO_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "cpa_expt.h"
|
|
|
|
/* For Global declaration in C files : */
|
|
#ifdef COL_GLOBALS
|
|
#define COL_EXTERN extern
|
|
#else /* !COL_GLOBALS */
|
|
#define COL_EXTERN
|
|
#endif /* !COL_GLOBALS */
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
INCLUDES FILES
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
#include "Futil.h"
|
|
#include "Box.h"
|
|
#include "Inters.h"
|
|
#include "IntersGO.h"
|
|
#include "OctreeGO.h"
|
|
#include "CollGOCo.h"
|
|
#include "CsEltPts.h"
|
|
#include "CsEltEdg.h"
|
|
#include "CsSphElt.h"
|
|
#include "CsBoxElt.h"
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
FUNCTIONS DECLARATION
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
extern CPA_EXPORT ACP_tdxBool COL_fn_bDetectCollisionStaticGeomObjWithStaticGeomObj (GEO_tdxHandleToBoundingSphere _hDynamicGeometricObject,
|
|
POS_tdstCompletePosition *_p_stDynamicGeometricObjectMatrix,
|
|
void * _hStaticGeometricObject,
|
|
POS_tdstCompletePosition *_p_stStaticGeometricObjectMatrix,
|
|
ACP_tdxBool _bStaticGeomObjHasNoTransformationMatrix,
|
|
ACP_tdxBool _bDynamicGeomObjHasZoomInsteadOfScale,
|
|
ACP_tdxBool _bStaticGeomObjHasABoxBoundingVolume);
|
|
|
|
extern CPA_EXPORT void COL_fn_vInitCollideStaticGeomObjWithStaticGeomObj ( COL_tdstGVForCollision *p_stGV );
|
|
|
|
extern CPA_EXPORT void COL_fn_vComputeCollisionStaticGeomObjWithStaticGeomObj ( COL_tdstGVForCollision *p_stGV );
|
|
|
|
extern CPA_EXPORT void COL_fn_vCollideStaticGeomObj1WithStaticGeomObj2 ( ACP_tdxHandleOfObject _hGeometricObject1,
|
|
POS_tdstCompletePosition *_p_stGeometricObjectStartMatrix1,
|
|
POS_tdstCompletePosition *_p_stGeometricObjectEndMatrix1,
|
|
ACP_tdxHandleOfObject _hGeometricObject2,
|
|
POS_tdstCompletePosition *_p_stGeometricObjectMatrix2,
|
|
void * _p_vParameter1 ,
|
|
short _sParameter2 ,
|
|
ACP_tdxBool _bStaticGeomObjHasNoTransformationMatrix,
|
|
ACP_tdxBool _bDynamicGeomObjHasZoomInsteadOfScale);
|
|
|
|
/* This function finds the triangles of the geometric object containing the given point (on an edge),*/
|
|
/* fill an array with the normals of these triangles (two triangles maximum)*/
|
|
/* and return the number of triangles found*/
|
|
extern CPA_EXPORT long COL_fn_lFindNormalFromGeometricObject (GEO_tdstGeometricObject * _p_stGeometricObject ,
|
|
MTH3D_tdstVector * _p_stPoint ,
|
|
MTH3D_tdstVector * _p_a2_stNormal);
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif /* COL_COLLGO_H */
|