/*=========================================================================*/
/* CAMDLLb.hpp :       base of camera DLL*/
/* This is a part of the CPA project.*/
/**/
/* Version                      1.0*/
/* Creation date        19/03/97*/
/* Revision date*/
/**/
/* (c) Ubi Studio 1996*/
/**/
/* DO NOT MODIFY THAT FILE. IF SOMETHING NEEDS TO BE CHANGE, PLEASE CONTACT*/
/* VINCENT GRECO OR CHRISTOPHE BEAUDET.*/
/*=========================================================================*/
 
#ifndef __CAMDLLB_HPP__
#define __CAMDLLB_HPP__
 
/****************************************/
#ifndef 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
#endif
/****************************************/
 
 
#ifdef ACTIVE_EDITOR
 
#include "objDLLb.hpp"
 
 
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/* CPA_CameraCoords class : used to give coordinates to the camera*/
 
typedef enum {WorldCoordinates,CameraCoordinates} tdeAxisSystem;
 
 
class CPA_EXPORT CPA_CameraCoords
{
private:
	tdeAxisSystem	m_eAxisSystem;
	float			m_fX;
	float			m_fY;
	float			m_fZ;
 
public:
	CPA_CameraCoords(tdeAxisSystem eAxis = WorldCoordinates, float fX = 0, float fY = 0, float fZ = 0);
 
	void SetX(float fX) { m_fX = fX;};
	void SetY(float fY) { m_fY = fY;};
	void SetZ(float fZ) { m_fZ = fZ;};
	void SetXYZ(float fX, float fY, float fZ);
	void SetAxisSystem(tdeAxisSystem eAxis) { m_eAxisSystem = eAxis;};
 
	float GetX() {return m_fX;};
	float GetY() {return m_fY;};
	float GetZ() {return m_fZ;};
	tdeAxisSystem GetAxisSystem() {return m_eAxisSystem;};
 
	void SetCoords(MTH3D_tdstVector *p_stVector);
	void SetCoords(POS_tdstCompletePosition *p_stMatrix);
 
	void GetCoords(MTH3D_tdstVector &r_stVector);
	void GetCoords(POS_tdstCompletePosition &r_stMatrix);
};
 
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/*/////////////////////////////////////////////////////////////////////////////////////////////////////////*/
 
typedef enum {rPoint, rSuperObject, rCamera, rTarget} tdeRotationCenterType;
typedef enum {tPoint, tSuperObject, tNone} tdeTargetType;
typedef enum {Relative, Absolute} tdeCoordsType;
typedef enum {X_Camera, Y_Camera, Z_Camera, X_World, Y_World, Z_World, X_Custom, Y_Custom, Z_Custom} tdeAxis;
/* ANNECY MT NewInterface 26/03/98 {*/
typedef enum {DisplayNone,DisplayDownRight,DisplayDownLeft} tdeDisplayReferential;
/* ENDANNECY MT NewInterface }*/
 
class CPA_DialogBar;
 
/*##########################################################################*/
/* camera DLL Base Class*/
class CPA_EXPORT CPA_CameraDLLBase : public CPA_ObjectDLLBase
{
 
public:
/* constructor*/
    CPA_CameraDLLBase() {};
    ~CPA_CameraDLLBase() {};
 
/* add here all camera-specific functions*/
	virtual void SendDialogBarCommandToCamera(CPA_BaseObject *p_oCamera,UINT nID){};
 
	virtual void Activate(CPA_BaseObject *p_oCamera, DEV_ViewPort3D *p_oViewPort, CPA_DialogBar *p_oPopUpParent, CPoint oPos){};
	virtual void Disactivate(CPA_BaseObject *p_oCamera){};
	virtual BOOL IsActive(CPA_BaseObject *p_oCamera) {return FALSE;};
 
	virtual void SetRotationAxisSystem(CPA_BaseObject *p_oCamera, tdeAxisSystem eSystem){};
	virtual void SetTranslationAxisSystem(CPA_BaseObject *p_oCamera, tdeAxisSystem eSystem){};
 
	virtual tdeAxisSystem GetRotationAxisSystem(CPA_BaseObject *p_oCamera){return WorldCoordinates;};
	virtual tdeAxisSystem GetTranslationAxisSystem(CPA_BaseObject *p_oCamera){return WorldCoordinates;};
 
	virtual BOOL SetRotationCenterType(CPA_BaseObject *p_oCamera, tdeRotationCenterType eRotCenterType){return FALSE;};
	virtual tdeRotationCenterType GetRotationCenterType(CPA_BaseObject *p_oCamera){return rCamera;};
	virtual tdeRotationCenterType GetEffectiveRotationCenterType(CPA_BaseObject *p_oCamera){return rCamera;};
	
	virtual BOOL SetTargetType(CPA_BaseObject *p_oCamera, tdeTargetType eTargetType){return FALSE;};
	virtual tdeTargetType GetTargetType(CPA_BaseObject *p_oCamera){return tNone;};
 
	virtual BOOL ZoomOnTarget(CPA_BaseObject *p_oCamera, CPA_SuperObject *pTarget){return FALSE;};
 
	virtual void SetRotationCenterPoint(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oRotationCenter, tdeCoordsType eType = Absolute){};
	virtual BOOL SetRotationCenterSuperObject(CPA_BaseObject *p_oCamera, CPA_SuperObject *p_oSuperObject){return FALSE;};
	virtual BOOL GetRotationCenter(CPA_BaseObject *p_oCamera, MTH3D_tdstVector &r_stCenter){return FALSE;};
 
	virtual void SetTargetPoint(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oRotationCenter){};
	virtual BOOL SetTargetSuperObject(CPA_BaseObject *p_oCamera, CPA_SuperObject *p_oSuperObject){return FALSE;};
	virtual BOOL GetTarget(CPA_BaseObject *p_oCamera, MTH3D_tdstVector &r_stTarget){return FALSE;};
 
 
	virtual void Translate(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oOffset, BOOL bUserDefinedAxis = FALSE){};
	virtual void SetPosition(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oPos = NULL){};
 
	virtual void Rotate(CPA_BaseObject *p_oCamera, tdeAxis eAxis, double dAngle){};
	virtual void SetRotation(CPA_BaseObject *p_oCamera, double dAngleX = 0, double dAngleY = 0, double dAngleZ = 0){};
 
	virtual void Update(CPA_BaseObject *p_oCamera){};
 
	virtual CPA_SuperObject *CreateDefaultCamera(){return NULL;};
	virtual void InsertCameraInHierarchy(CPA_SuperObject *p_oCameraSO){return;};
 
	virtual void ShowDialogBar(CPA_BaseObject *p_oCamera){};
	virtual void HideDialogBar(CPA_BaseObject *p_oCamera){};
 
	virtual CPA_BaseObject *CopySlotCamera(CPA_BaseObject* p_oCamera){return NULL;};		
	virtual void CameraToWorldCoordinates_Point(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector){};
	virtual void CameraToWorldCoordinates_Vector(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector){};
	virtual void WorldToCameraCoordinates_Point(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector){};
	virtual void WorldToCameraCoordinates_Vector(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector){};
 
	virtual void GetMatrix(CPA_BaseObject *_p_oCamera, POS_tdstCompletePosition *p_oMatrix){};
	virtual void SetMatrix(CPA_BaseObject *_p_oCamera, POS_tdstCompletePosition *p_oMatrix){};
 
 
	/* camera - viewport communication specific functions*/
 
	virtual BOOL SendKeyDownToCamera		(CPA_BaseObject *p_oCamera, UINT nChar, UINT nRepCnt, UINT nFlags) {return FALSE;};
	virtual BOOL SendKeyUpToCamera			(CPA_BaseObject *p_oCamera, UINT nChar, UINT nRepCnt, UINT nFlags) {return FALSE;};
	virtual BOOL SendMouseMoveToCamera		(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect)	{ return FALSE; };
    virtual BOOL SendLButtonDblClkToCamera	(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo)	{ return FALSE; };
    virtual BOOL SendRButtonDblClkToCamera	(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo)	{ return FALSE; };
    virtual BOOL SendLButtonDownToCamera	(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo)	{ return FALSE; };
    virtual BOOL SendRButtonDownToCamera	(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo)	{ return FALSE; };
    virtual BOOL SendLButtonUpToCamera		(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos)	{ return FALSE; };
	virtual BOOL SendRButtonUpToCamera		(CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos)	{ return FALSE; };
 
	virtual BOOL OnToolTipNotify			(CPA_BaseObject *p_oCamera, TOOLTIPTEXT *p_TTT, UINT nID) { return FALSE;};
	virtual void DestroyCamera				(CPA_SuperObject *p_oCamera) {};
 
/* ANNECY MT NewInterface 26/03/98 {*/
	virtual void SetReferentialDisplayMode	(tdeDisplayReferential eDisplayMode){};
	virtual tdeDisplayReferential GetReferentialDisplayMode	()	{return DisplayNone;};
/* ENDANNECY MT NewInterface }*/
};
 
#endif /* ACTIVE_EDITOR*/
#endif /* __CAMDLLB_HPP__*/
