/* MODULE : PRT (Particle system Library) AUTHOR : Frederic PHILIPPE UBI R&D FILE : PRT.h (Principal header file) */ #ifndef D_THROW_PRT #ifndef PRT_PRTENV_H #define PRT_PRTENV_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "cpa_expt.h" /* For Global declaration in C files : */ #ifdef PRT_GLOBALS #define PRT_EXTERN extern #else /* !PRT_GLOBALS */ #define PRT_EXTERN #endif /* !PRT_GLOBALS */ /* ----------------------------------------------------------------------------- INCLUDES FILES ----------------------------------------------------------------------------- */ /*#include "Futil.h"*/ /* ----------------------------------------------------------------------------- CONSTANT DECLARATION ----------------------------------------------------------------------------- */ #define PRT_C_ulAlignedBoxEnv 0x00000000 #define PRT_C_ulSphereEnv 0x00000001 /* ----------------------------------------------------------------------------- TYPES DEFINITION ----------------------------------------------------------------------------- */ /* source particules structure */ typedef struct PRT_tdstParticlesEnvironment_ { unsigned long ulEnvType; MTH3D_tdstVector stMinPoint; MTH3D_tdstVector stMaxPoint; MTH3D_tdstVector stSphereCenter; MTH_tdxReal xRadius; MTH3D_tdstVector stAcceleration; MTH_tdxReal xAccelerationRange; } PRT_tdstParticlesEnvironment; /* ----------------------------------------------------------------------------- GLOBAL VARIABLE DECLARATION ----------------------------------------------------------------------------- */ /* ----------------------------------------------------------------------------- FUNCTIONS DECLARATION ----------------------------------------------------------------------------- */ #define PRT_M_vCopyParticlesEnvironment( _p_stDstParticlesEnvironment, _p_stSrcParticlesEnvironment )\ memcpy ( _p_stDstParticlesEnvironment, _p_stSrcParticlesEnvironment, sizeof ( PRT_tdstParticlesEnvironment ) ) #define PRT_M_vSetTypeParticlesEnvironment( _p_stParticlesEnvironment, _ulEnvType )\ ( (_p_stParticlesEnvironment)->ulEnvType = ( _ulEnvType ) ) #define PRT_M_vSetMinMaxPointParticlesEnvironment( _p_stParticlesEnvironment, _p_stMinPoint, _p_stMaxPoint )\ {\ MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stMinPoint), ( _p_stMinPoint ) );\ MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stMaxPoint), ( _p_stMaxPoint ) );\ } #define PRT_M_vSetSphereParticlesEnvironment( _p_stParticlesEnvironment, _p_stSphereCenter, _xRadius )\ {\ MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stSphereCenter), ( _p_stSphereCenter ) );\ (_p_stParticlesEnvironment)->xRadius = ( _xRadius );\ } #define PRT_M_vSetAccelerationParticlesEnvironment( _p_stParticlesEnvironment, _p_stAcceleration )\ {\ MTH3D_M_vCopyVector ( &((_p_stParticlesEnvironment)->stAcceleration), ( _p_stAcceleration ) );\ } #define PRT_M_vSetAccelerationRangeParticlesEnvironment( _p_stParticlesEnvironment, _xAccelerationRange )\ ( (_p_stParticlesEnvironment)->xAccelerationRange = ( _xAccelerationRange ) ) extern CPA_EXPORT void PRT_fn_vCreateParticlesEnvironment ( PRT_tdstParticlesEnvironment **_p_pstParticlesEnvironment ); #ifdef __cplusplus }; #endif /* __cplusplus */ #endif /* PRT_PRTENV_H */ #endif /* D_THROW_PRT */