83 lines
3.2 KiB
C
83 lines
3.2 KiB
C
/**********************************************************
|
|
* *
|
|
* Magnet *
|
|
* *
|
|
* Author : Ubi China - Marc Trabucato *
|
|
* *
|
|
**********************************************************/
|
|
|
|
#ifndef _MGTSTRUCT_H_
|
|
#define _MGTSTRUCT_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
INCLUDES FILES
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
CONSTANT DECLARATION
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
#define MGT_MAX_NUMBEROF_MAGNETS 5
|
|
#define MGT_MAX_NUMBEROF_MODIFIEDOBJECTS 20
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
TYPES DEFINITION
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*****************************************************************************/
|
|
struct MGT_tdstModifiedObject_;
|
|
struct MGT_tdstMagnetModification_;
|
|
struct tdstMSMagnet_;
|
|
/*****************************************************************************/
|
|
|
|
/* initial values of a modified object */
|
|
typedef struct MGT_tdstModifiedObject_
|
|
{
|
|
GEO_tdstGeometricObject *p_stMorphedObject; /* a pointer to the influenced geometric object. */
|
|
struct MGT_tdstMagnetModification_ *aDEF_hMagnet[MGT_MAX_NUMBEROF_MAGNETS]; /* the magnets which influence the object */
|
|
char *d_cFieldBitsAlreadyInfluencedPoints; /* pointer to a field bits of modified points */
|
|
MTH3D_tdstVector *d_stOriginalPosition; /* original position of points */
|
|
struct COL_tdstOctree_ *p_stOctree;
|
|
HIE_tdxHandleToSuperObject h_SuperObject;
|
|
} MGT_tdstModifiedObject;
|
|
|
|
typedef MGT_tdstModifiedObject *MGT_tdxHandleToModifiedObject;
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* magnet modification to one object */
|
|
typedef struct MGT_tdstMagnetModification_
|
|
{
|
|
ACP_tdxIndex xIndexOfModifiedObject;
|
|
ACP_tdxIndex xNbPoints;
|
|
HIE_tdxHandleToSuperObject h_SuperObject; /* the superobject of the initial object */
|
|
char *d_cFieldBitsModifiedPoints; /* pointer to a field bits of modified points */
|
|
char *d_cFieldBitsInfluencedPoints; /* pointer to a field bits of influenced points 0 : growing , 1 : recover */
|
|
unsigned long *d_ulCurrentDuration;
|
|
ACP_tdxIndex xIndexOfActivatedMagnet;
|
|
ACP_tdxBool bUsed;
|
|
} MGT_tdstMagnetModification;
|
|
|
|
typedef MGT_tdstMagnetModification* MGT_tdxHandleToMagnetModification;
|
|
|
|
/*****************************************************************************/
|
|
/*****************************************************************************/
|
|
/*****************************************************************************/
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* _MGTSTRUCT_H_ */
|
|
|