#ifndef _MECCAME_H_
#define _MECCAME_H_
 
/*#include "dnmvecto.h"*/
#include "MEC\DNMDynam.h"
#include "MEC\ParsData.h"
 
#ifdef __cplusplus
extern "C" {
#endif
 
/*
 *	Definition of the values of flags to control dynamic.
 */
#define	DNM_CAM_C_NoLinearParsing				0x0001
#define DNM_CAM_C_NoLinearInertia				0x0002
#define DNM_CAM_C_NoAngularParsing				0x0004
#define DNM_CAM_C_NoAngularInertia				0x0008
#define DNM_CAM_C_NoTargetParsing				0x0010
#define DNM_CAM_C_NoTargetInertia				0x0020
#define	DNM_CAM_C_NoObstacle					0x0040
#define DNM_CAM_C_FixedOrientation				0x0080
#define DNM_CAM_C_NoCollisionWhenNotMoving		0x0100	/* MT : 28/07/99 */

/*
 *	Compute Camera System Axis
 */
void CAM_fn_vComputeCameraSystemAxis
(
	struct DNM_stDynamics		*_p_stDynamics,
	HIE_tdxHandleToSuperObject	_h_SupObj,
	MTH3D_tdstVector			*_p_stNewPosition,
	MTH3D_tdstVector			*_p_stNewTarget,
	MTH3D_tdstVector			*_p_stAxisX,
	MTH3D_tdstVector			*_p_stAxisY,
	MTH3D_tdstVector			*_p_stAxisZ
);
 
/* 
 *	Camera model 
 */
DNM_tdstDynamics *DNM_p_stDynamicsCameraMechanics
(
	DNM_tdstDynamics				*_p_stDynamics,
	HIE_tdxHandleToSuperObject		_hSupObj,
	DNM_tdstParsingDatas			*_p_stParsingDatas,
	DNM_tdxHandleToMecIdentityCard	_h_MecIdCard,
	MTH_tdxReal						_xDT
);
 
 
 
/* 
 *	Camera model of obstacle module
 */
struct DNM_stMecObstacle *DNM_p_stObstacleCameraObstacle
(
	struct DNM_stMecObstacle		*_p_stObstacle,
	struct DNM_stDynamics			*_p_stDynamics,
	struct DNM_stParsingDatas		*_p_stExternData,
	HIE_tdxHandleToSuperObject		_p_stSupObj,
	MTH3D_tdstVector				*_p_stPosition,
	MTH3D_tdstVector				*_p_stNewPosition,
/*	MTH3D_tdstVector				*_p_stTarget,*/
	MTH_tdxReal						_xDT
);
 
/* 
 *	Camera model for update function 
 */
struct DNM_stDynamics *DNM_p_stDynamicsCameraUpdate
(
	struct DNM_stDynamics			*_p_stDynamics,
	DNM_tdstParsingDatas			*_p_stExternData,
	HIE_tdxHandleToSuperObject		_p_stSupObj,
	struct DNM_stMecObstacle		*_p_stObstacle,
	MTH3D_tdstVector				*_p_stNewPosition,
	MTH3D_tdstVector				*_p_stNewTarget
);
 
extern ACP_tdxBool	CAM_fn_bVectorIsNull(MTH3D_tdstVector *, MTH_tdxReal);
extern MTH_tdxReal	CAM_fn_xComputeHorizontalAngle(MTH3D_tdstVector *, MTH3D_tdstVector *, MTH3D_tdstVector *);
extern MTH_tdxReal	CAM_fn_xComputeVerticalAngle(MTH3D_tdstVector *, MTH3D_tdstVector *, MTH3D_tdstVector *);
 
extern CPA_EXPORT long CAM_lHaveITakeSThgIntoTheMug
(
	DNM_tdstMecObstacle			*_p_stResultObstacle,  
	HIE_tdxHandleToSuperObject	_p_stSupObj,
	POS_tdstCompletePosition *_p_stStartPosition,
	POS_tdstCompletePosition *_p_stEndPosition
);
 
 
#ifdef __cplusplus
}
#endif
 
#endif
