Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifndef __STDAAFX_H__
#define __STDAAFX_H__
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#endif //__STDAAFX_H__

View File

@@ -0,0 +1,182 @@
// (c) Ubi Studios 1996
// See Vincent Greco for any comment or question
#ifndef __CAMERA_HPP__
#define __CAMERA_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
//**************************************
#include "incITF.h"
#include "dialogba.hpp"
typedef enum {InertCamera, ActorCamera} tdeCameraType;
class Camera : public CPA_BaseObject,
public CPA_EdMot<GLI_tdxHandleToCamera>
{
public:
Camera(tdeCameraType eType, CPA_ObjectDLLBase *p_oDLL,CPA_MainWorld* p_oMainWorld,GLI_tdxHandleToCamera hObj,
CString csName = "",CString csFileName = "",CString csSectionName = "");
Camera(tdeCameraType eType, CPA_ObjectDLLBase *p_oDLL,CPA_MainWorld* p_oMainWorld,CString csName = "",
CString csFileName = "",CString csSectionName = "");
//copy constructor
Camera(Camera& src);
~Camera();
void *GetEngineStruct() { return GetStruct(); };
void SetEngineStruct (GLI_tdxHandleToCamera hObj) { SetStruct(hObj); }
// void ReInit(GLI_tdxHandleToCamera hCamera);
// members
private:
tdeCameraType m_eCameraType;
tdeAxisSystem m_eRotationAxisSystem;
tdeAxisSystem m_eTranslationAxisSystem;
tdeRotationCenterType m_eRotationCenterType;
tdeTargetType m_eTargetType;
MTH3D_tdstVector m_stRotationCenterPoint;
tdeCoordsType m_eRotationCenterPointCoordsType;
CPA_SuperObject *m_p_oRotationCenterSuperObject;
MTH3D_tdstVector m_stTargetPoint; // world coordinates always
CPA_SuperObject *m_p_oTargetSuperObject;
POS_tdstCompletePosition m_stCameraMatrix;
BOOL m_bActive; // tells wether the m_hDevice and m_hViewport are valid or not
DEV_ViewPort3D *m_p_oViewPort;
CPA_Object *m_p_oActor; //if it's an actor camera, this is the actor
CPA_SuperObject *m_p_oActorSO; // and this is the actor SuperObject
DialogBar m_oDialogBar;
double m_dTwistAngle;
long m_lTwistRemoveCount;
BOOL m_bPrivilegeMode;
// methods
public:
static void StaticInit();
long GetDataType () { return 0; }
void * GetData () { return GetStruct(); }
DEV_ViewPort3D *GetViewport() {return m_p_oViewPort;};
POS_tdstCompletePosition *GetCameraMatrix() {return &m_stCameraMatrix;};
DialogBar *GetDialogBar() {return &m_oDialogBar;};
void OnToolBarCommand(UINT nID);
void Preferences();
void CompletePreferences();
void FrontView();
void BackView();
void LeftView();
void RightView();
void TopView();
void BottomView();
BOOL IsActive() {return m_bActive;};
BOOL IsInPrivilegeMode() {return m_bPrivilegeMode;};
void SetPrivilegeMode(BOOL bMode);
tdeCameraType GetCameraType() { return m_eCameraType; };
void Activate( DEV_ViewPort3D *p_oViewPort, CPA_DialogBar *p_oPopUpParent, CPoint oPos);
void Disactivate();
void SetRotationAxisSystem(tdeAxisSystem eSystem);
void SetTranslationAxisSystem(tdeAxisSystem eSystem);
tdeAxisSystem GetRotationAxisSystem();
tdeAxisSystem GetTranslationAxisSystem();
BOOL SetRotationCenterType(tdeRotationCenterType eRotCenterType);
tdeRotationCenterType GetRotationCenterType();
tdeRotationCenterType GetEffectiveRotationCenterType();
BOOL SetTargetType(tdeTargetType eTargetType);
tdeTargetType GetTargetType();
void SetRotationCenterPoint(CPA_CameraCoords *p_oRotationCenter, tdeCoordsType eType = Absolute);
BOOL SetRotationCenterSuperObject(CPA_SuperObject *p_oSuperObject);
CPA_SuperObject *GetRotationCenterSuperObject() {return m_p_oRotationCenterSuperObject;};
BOOL GetRotationCenter(MTH3D_tdstVector &r_stCenter);
void GetRotationCenterPoint(MTH3D_tdstVector &r_stPoint, tdeCoordsType &r_eType);
void GetTargetPoint(MTH3D_tdstVector &r_stPoint);
void SetTargetPoint(CPA_CameraCoords *p_oRotationCenter);
BOOL SetTargetSuperObject(CPA_SuperObject *p_oSuperObject);
CPA_SuperObject *GetTargetSuperObject() {return m_p_oTargetSuperObject;};
BOOL GetTarget(MTH3D_tdstVector &r_stTarget);
void Translate(CPA_CameraCoords *p_oOffset, BOOL bUserDefinedAxis = FALSE);
void SetPosition(CPA_CameraCoords *p_oPos = NULL);
void Rotate(tdeAxis eAxis, double dAngle);
void SetRotation(double dAngleX = 0, double dAngleY = 0, double dAngleZ = 0);
void GetMatrix(POS_tdstCompletePosition *p_oMatrix);
void SetMatrix(POS_tdstCompletePosition *p_oMatrix);
void ZoomOnTarget(CPA_SuperObject *p_oSuperObject = NULL);
void Update();
void UpdateFromEngine();
void ShowDialogBar() {m_oDialogBar.Show();};
void HideDialogBar() {m_oDialogBar.Hide();};
void CameraToWorldCoordinates_Point(MTH3D_tdstVector &r_stVector);
void CameraToWorldCoordinates_Vector(MTH3D_tdstVector &r_stVector);
void WorldToCameraCoordinates_Point(MTH3D_tdstVector &r_stVector);
void WorldToCameraCoordinates_Vector(MTH3D_tdstVector &r_stVector);
private:
void ResetCameraRotationMatrix();
void ResetCamera();
void InternalUpdate();
void InternalBackUpdate();
void CameraOriginalToWorldCoordinates(MTH3D_tdstVector &r_stVector);
void WorldToCameraOriginalCoordinates(MTH3D_tdstVector &r_stVector);
void BuildRotationMatrix_X(POS_tdstCompletePosition &r_stMatrix, double xXAngle);
void BuildRotationMatrix_Y(POS_tdstCompletePosition &r_stMatrix, double xXAngle);
void BuildRotationMatrix_Z(POS_tdstCompletePosition &r_stMatrix, double xXAngle);
void RotateCameraToSeePoint(MTH3D_tdstVector *p_stTarget);
void RemoveTwist();
void SetTwist();
void ResetTwist();
double GetRealTwistAngle();
// toolbar
void InitInertCameraToolBar();
};
#endif //__CAMERA_HPP__

View File

@@ -0,0 +1,243 @@
//**************************************
// This is the base class of your DLL interface
// All methods of CPA_BaseObjectDLLBase are
// present in that class.
//**************************************
#ifndef __MYINTERF_HPP__
#define __MYINTERF_HPP__
#include "itf.h"
#include "camera.hpp"
// if you want only one instance of your DLL
// activate the next line
#define DLL_ONLY_ONE_INSTANCE
class Geometry3D;
//----------------------------------------------------------
// Object DLL interface class
//----------------------------------------------------------
class Camera_Interface : public CPA_CameraDLLBase
{
private:
// CPA_Ed_1 MP BEGIN
// mouse handler
BOOL m_bRotateOn;
BOOL m_bIsMoving;
tdstMousePos m_stMousePos;
HCURSOR hcursorM, hcursorR;
// CPA_Ed_1 MP END
// keyboard handler
CPA_KeyActionConfiguration *m_p_oKeyConfiguration;
Geometry3D *m_p_oInertCameraGeomObject;
float m_fTranslationStep;
float m_fRotationStep;
GLI_tdxHandleToCamera m_hLastEngineCamera;
BOOL m_bFirstTime;
long m_lSlotForEngineCamera;
long m_lSlotForLastEditorCamera;
// ANNECY MT NewInterface 26/03/98 {
tdeDisplayReferential m_eReferentialDisplayMode;
// ENDANNECY MT NewInterface }
BOOL m_bCameraTargetMode;
public:
Camera_Interface(void);
Geometry3D *GetInertCameraGeomObject() { return m_p_oInertCameraGeomObject;};
void SetTranslationStep(float fStep) { m_fTranslationStep = fStep;};
void SetRotationStep(float fStep) { m_fRotationStep = fStep;};
float GetTranslationStep() { return m_fTranslationStep;};
float GetRotationStep() { return m_fRotationStep;};
void fn_vInitListByType (CPA_World *pWorld);
CPA_SuperObject *AssociateSuperObject(Camera *p_oCamera);
BOOL fn_bAcceptModifCopy (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return (eStatus != C_AsConcernedDLL); }
// ACP MEssages Functions overload
// BOOL fn_bPreTranslateMessage(MSG *);
void fn_vJustAfterRegistered(void);
void fn_vConstruct(void);
// void fn_vRefreshDatas(void);
void fn_vAddObjectsToDraw(GLD_tdstViewportAttributes *, GLI_tdstLight *, DEV_ViewPort* p3);
// void fn_vAddObjectsToDraw2(GLD_tdstViewportAttributes *, GLI_tdstLight *);
// BOOL fn_bAcceptToRunEngine(void);
void fn_vBeforeEngine(void);
void fn_vBeforeEditor(void);
// void fn_vHasLostFocus(void);
// BOOL fn_bHasGainedFocus(void);
// BOOL fn_bAcceptToExit(void);
// void fn_vJustBeforeClosing(void);
// long OnQueryAction(CPA_DLLBase*, WPARAM, LPARAM);
// long OnQueryInfos(CPA_DLLBase*, WPARAM, LPARAM);
// long OnQueryOpen(CPA_DLLBase*, WPARAM, LPARAM);
// long OnQueryClose(CPA_DLLBase*, WPARAM, LPARAM);
// Windows MEssages Functions overload
// BOOL _OnKeyUp (UINT, UINT, UINT, void *);
// BOOL _OnKeyDown (UINT, UINT, UINT, void *);
// BOOL _OnUpdateCommandUI (unsigned int, CCmdUI *, void *);
// BOOL _OnMouseMove (UINT, tdstMousePos *, void *);
// BOOL _OnLButtonDblClk (UINT, tdstMousePos *, ACP_tdxIndex, void *);
// BOOL _OnLButtonDown (UINT, tdstMousePos *, ACP_tdxIndex, void *);
// BOOL _OnLButtonUp (UINT, tdstMousePos *, void *);
// BOOL _OnRButtonDblClk (UINT, tdstMousePos *, ACP_tdxIndex, void *);
// BOOL _OnRButtonDown (UINT, tdstMousePos *, ACP_tdxIndex, void *);
// BOOL _OnRButtonUp (UINT, tdstMousePos *, void *);
// BOOL _OnDragDropEnd (WPARAM, LPARAM);
// BOOL _OnDragDropMove(WPARAM, LPARAM);
// BOOL _OnDragDropLooseFocus(WPARAM, LPARAM);
// BOOL _OnDragDropGainFocus(WPARAM, LPARAM);
// SHAITAN -> Editor Messages Functions overload
// BOOL fn_bAcceptAsParent (CPA_BaseObject *pChild, CPA_BaseObject *pParent) { return TRUE; }
// BOOL fn_bAcceptAsChild (CPA_BaseObject *pParent, CPA_BaseObject *pChild) { return TRUE; }
BOOL fn_bAcceptModifDelete (CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
// BOOL fn_bAcceptModifParent (CPA_List<CPA_SuperObject> *pListObjects) { return TRUE; }
// BOOL fn_bAcceptModifCopy (CPA_List<CPA_SuperObject> *pListObjects) { return TRUE; }
// BOOL fn_bAcceptModifMove (CPA_List<CPA_SuperObject> *pListObjects) { return TRUE; }
// BOOL fn_bAcceptModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent) { return TRUE; }
// BOOL fn_bAcceptModifName (CPA_SuperObject *pEdObj) { return TRUE; }
// BOOL fn_bAcceptSelect (CPA_SuperObject *pEdObj) { return TRUE; }
// void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType) { }
// void fn_vOnModifParent (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType) { }
// void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType) { }
// void fn_vOnModifMove (CPA_List<EDT_SavePos> *pListObjects, tdeTypeModif eType) { }
// void fn_vOnModifInsert (CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeTypeModif eType) { }
// void fn_vOnModifName (CPA_SuperObject *pEdObj, char *szInitalName, char *szFinalName, tdeTypeModif eType) { }
// void fn_vOnSelect (CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
// ObjectDLL special functions overload
// CPA_BaseObject *GetNewObject (char *p_cObjectFile, char*p_cObjectName, FILE *p_fFile);
BOOL fn_bDefinePopupMenu(EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bIsAlone);
void _OnPopUpMenuCommand(UINT m_IDCmdMsg);
ACP_tdxHandleOfObject fn_hGetBoundingVolume(CPA_BaseObject *pObject);
void fn_vComputeBoundingVolume(CPA_BaseObject *pObject);
void SendDialogBarCommandToCamera(CPA_BaseObject *p_oCamera,UINT nID);
//=========================================================================================
//=========================================================================================
//=========================================================================================
//=========================================================================================
//=========================================================================================
void Activate(CPA_BaseObject *_p_oCamera, DEV_ViewPort3D *p_oViewPort, CPA_DialogBar *p_oPopUpParent, CPoint oPos);
void Disactivate(CPA_BaseObject *_p_oCamera);
void SetRotationAxisSystem(CPA_BaseObject *p_oCamera, tdeAxisSystem eSystem);
void SetTranslationAxisSystem(CPA_BaseObject *p_oCamera, tdeAxisSystem eSystem);
tdeAxisSystem GetRotationAxisSystem(CPA_BaseObject *p_oCamera);
tdeAxisSystem GetTranslationAxisSystem(CPA_BaseObject *p_oCamera);
BOOL SetRotationCenterType(CPA_BaseObject *p_oCamera, tdeRotationCenterType eRotCenterType);
tdeRotationCenterType GetRotationCenterType(CPA_BaseObject *p_oCamera);
tdeRotationCenterType GetEffectiveRotationCenterType(CPA_BaseObject *p_oCamera);
BOOL SetTargetType(CPA_BaseObject *p_oCamera, tdeTargetType eTargetType);
tdeTargetType GetTargetType(CPA_BaseObject *p_oCamera);
BOOL ZoomOnTarget (CPA_BaseObject *p_oCamera, CPA_SuperObject *pTarget);
void SetRotationCenterPoint(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oRotationCenter, tdeCoordsType eType = Absolute);
BOOL SetRotationCenterSuperObject(CPA_BaseObject *p_oCamera, CPA_SuperObject *p_oSuperObject);
BOOL GetRotationCenter(CPA_BaseObject *p_oCamera, MTH3D_tdstVector &r_stCenter);
void SetTargetPoint(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oRotationCenter);
BOOL SetTargetSuperObject(CPA_BaseObject *p_oCamera, CPA_SuperObject *p_oSuperObject);
BOOL GetTarget(CPA_BaseObject *p_oCamera, MTH3D_tdstVector &r_stTarget);
void Translate(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oOffset, BOOL bUserDefinedAxis = FALSE);
void SetPosition(CPA_BaseObject *p_oCamera, CPA_CameraCoords *p_oPos = NULL);
void Rotate(CPA_BaseObject *p_oCamera, tdeAxis eAxis, double dAngle);
void SetRotation(CPA_BaseObject *p_oCamera, double dAngleX = 0, double dAngleY = 0, double dAngleZ = 0);
void Update(CPA_BaseObject *p_oCamera);
CPA_SuperObject *CreateDefaultCamera();
void InsertCameraInHierarchy(CPA_SuperObject *p_oCameraSO);
void ShowDialogBar(CPA_BaseObject *p_oCamera);
void HideDialogBar(CPA_BaseObject *p_oCamera);
CPA_BaseObject *CopySlotCamera(CPA_BaseObject* p_oCamera);
void PutCameraInViewPort(CPA_BaseObject *_p_oCamera,DEV_ViewPort3D *p_oViewPort, BOOL bWithPrevCam = TRUE);
void GetMatrix(CPA_BaseObject *_p_oCamera, POS_tdstCompletePosition *p_oMatrix);
void SetMatrix(CPA_BaseObject *_p_oCamera, POS_tdstCompletePosition *p_oMatrix);
// camera - viewport communication specific functions
BOOL SendKeyDownToCamera (CPA_BaseObject *p_oCamera, UINT nChar, UINT nRepCnt, UINT nFlags);
// BOOL SendKeyUpToCamera (CPA_BaseObject *p_oCamera, UINT nChar, UINT nRepCnt, UINT nFlags);
// BOOL SendMouseMoveToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect);
// BOOL SendLButtonDblClkToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
// BOOL SendRButtonDblClkToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
// CPA_Ed_1 MP BEGIN - enabled mouse functions
BOOL SendMouseMoveToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect);
BOOL SendLButtonDownToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL SendRButtonDownToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL SendLButtonUpToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos);
BOOL SendRButtonUpToCamera (CPA_BaseObject *p_oCamera, UINT nFlags, tdstMousePos *p_stPos);
// CPA_Ed_1 MP END
void DestroyCamera (CPA_SuperObject *p_oCameraSO);
BOOL OnToolTipNotify (CPA_BaseObject *_p_oCamera, TOOLTIPTEXT *p_TTT, UINT nID);
void CameraToWorldCoordinates_Point(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector);
void CameraToWorldCoordinates_Vector(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector);
void WorldToCameraCoordinates_Point(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector);
void WorldToCameraCoordinates_Vector(CPA_BaseObject *_p_oCamera, MTH3D_tdstVector &r_stVector);
// ANNECY MT NewInterface 26/03/98 {
void SetReferentialDisplayMode (tdeDisplayReferential eDisplayMode);
tdeDisplayReferential GetReferentialDisplayMode ();
// ENDANNECY MT NewInterface }
//CPA2 Corneliu Babiuc 04-05-98
//functions to store and restore camera positions from slots
void SaveSlotsPositions();
void LoadSlotsPositions(CPA_BaseObject * p_oCamera);
//CPA2 Corneliu Babiuc 04-05-98
private:
BOOL KeyOtherActions(Camera *p_oCamera, UINT nChar);
BOOL KeyMoveCamera(Camera *p_oCamera, UINT nChar, BOOL bRepeat = FALSE);
BOOL KeyRotateCamera(Camera *p_oCamera, UINT nChar, BOOL bRepeat = FALSE);
BOOL KeyViewCamera(Camera *p_oCamera, UINT nChar);
void InitKeyboard();
CPA_SuperObject *CreateInertCamera(GLI_tdxHandleToCamera hObj = NULL,CString csName = "",
CString csFileName = "",CString csSectionName = "");
// CPA_Ed_1 MP BEGIN
void UpdatePosition( Camera *p_oCamera,tdstMousePos *p_stPos );
BOOL MouseRotateCamera( Camera *p_oCamera, tdstMousePos *p_stPos ); // MIRCEA
BOOL MouseMoveCamera( Camera *p_oCamera, tdstMousePos *p_stPos ); // MIRCEA
// CPA_Ed_1 MP END
BOOL fn_bAddEntriesToTreePopup (CPA_DialogList *pDialog, CString csListName, CMenu *pMenu, UINT uiCustomEntriesStart);
BOOL fn_bAddEntriesToListPopup (CPA_DialogList *pDialog, CString csListName, CMenu *pMenu, UINT uiCustomEntriesStart);
void fn_vOnCommandInTreePopup (CPA_DialogList *pDialog, CString csListName, UINT uiCustomEntry);
void fn_vOnCommandInListPopup (CPA_DialogList *pDialog, CString csListName, UINT uiCustomEntry);
void ChangeCameraTarget (void);
};
extern tdstDLLIdentity g_stCameraIdentity;
#endif // __MYINTERF_HPP__

View File

@@ -0,0 +1,41 @@
#ifndef __CAMSLOTS_HPP__
#define __CAMSLOTS_HPP__
#include "itf.h"
#include "camera.hpp"
class Camera_Interface;
//typedef enum {MakeACopy = 0,DontMakeACopy} tdeMakeCopy;
class Camera_Slots
{
private:
CArray<Camera*,Camera*> m_oCameraSlots;
CArray<CString,CString> m_oNameSlots;
Camera_Interface *m_p_oInterface;
public:
Camera_Slots(void);
void SaveCameraInSlot(long lNum,CStrin csName,Camera *p_oCamera,tdeMakeCopy = MakeACopy);
void RestoreCameraFromSlot(long lNum,DEV_ViewPort3D *p_oViewport);
void PutCameraInViewPort(Camera *p_oCamera,DEV_ViewPort3D *p_oViewPort,tdeMakeCopy = MakeACopy);
void SetInterface(Camera_Interface *p_oInterface) { m_p_oInterface = p_oInterface;};
long GetNbBusySlots();
CString GetNameOfSlotIfBusy(long lNum);
Camera *GetCameraFromPopUpMenu(CWnd *p_oParent, tdeMakeCopy eCopy = MakeACopy);
long GetSlotFromPopUpMenu(CWnd *p_oParent);
BOOL IsEmpty(long lNum) { return (m_oCameraSlots[lNum] == NULL);};
};
#endif // __CAMSLOTS_HPP__

View File

@@ -0,0 +1,72 @@
#ifndef AFX_COMPPROP_HPP
#define AFX_COMPPROP_HPP
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// compprop.hpp : header file
//
#include "pagebase.hpp"
#include "pagetarget.hpp"
#include "pagerotcenter.hpp"
#include "pagegeneral.hpp"
/////////////////////////////////////////////////////////////////////////////
// CompleteProperties dialog
class Camera;
class CompleteProperties : public CDialog
{
typedef enum {TargetPage = 0, RotCenterPage, GeneralPage }tdePages;
// Construction
public:
CompleteProperties(Camera* p_oCamera, CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CompleteProperties)
enum { IDD = IDD_COMPLETEPROPERTIES };
CTabCtrl m_oTabControl;
CString m_csTypeName;
CString m_csCameraName;
//}}AFX_DATA
private:
PageTarget m_oTargetPage;
PageRotationCenter m_oRotCenterPage;
PageGeneral m_oGeneralPage;
Camera *m_p_oCamera;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CompleteProperties)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CompleteProperties)
virtual BOOL OnInitDialog();
afx_msg void OnSelchangingTabProperties(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangeTabProperties(NMHDR* pNMHDR, LRESULT* pResult);
virtual void OnOK();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COMPPROP_HPP__CC24C3C7_DC14_11D0_BE57_00609775AC86__INCLUDED_)

View File

@@ -0,0 +1,101 @@
#ifndef __DIALOGBA_HPP__
#define __DIALOGBA_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
//**************************************
#include "itf.h"
#include "camresrc.h"
class Camera;
class Camera_Interface;
class DialogBar
{
private:
Camera *m_p_oCamera;
Camera_Interface *m_p_oInterface;
CPA_DialogBar *m_p_oParentWnd;
CPA_PopUpToolBar m_oToolBar;
public:
DialogBar(void);
DialogBar(DialogBar& r_src);
void SetCamera(Camera *p_oCamera);
CPA_DialogBar *GetCPA_DialogBar() {return m_p_oParentWnd;};
CPA_PopUpToolBar *GetToolBar() {return (m_p_oParentWnd == NULL) ? NULL : &m_oToolBar;};
void InitInertCameraDialogBar(Camera* p_oCamera);
void Show();
void Hide();
void UpdateToolBar();
BOOL GetToolTipText(TOOLTIPTEXT *p_TTT, UINT nID);
void Create(CPA_DialogBar *p_oPopUpParent, CPoint oPos);
void Destroy();
void OnCommand(UINT nID);
};
class Camera_NewSlot : public CDialog
{
// Construction
protected:
CString m_csName;
BOOL m_bDefault;
public:
// parent editor
CString GetName (void) { return m_csName; }
// standard constructor
Camera_NewSlot (CWnd* pParent = NULL);
// Dialog
int fn_iDoDialog (CString _csName, BOOL bDefault = FALSE);
// Dialog Data
//{{AFX_DATA(Camera_NewSlot)
enum { IDD = IDD_NEW_SLOT };
CEdit m_cNewName;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(Camera_NewSlot)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(Camera_NewSlot)
virtual BOOL OnInitDialog();
afx_msg void OnOK();
afx_msg void OnCancel();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // __CAMSLOTS_HPP__

View File

@@ -0,0 +1,29 @@
#ifndef PAGEBASE_HPP
#define PAGEBASE_HPP
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
//---------------------------------------------------------------
//---------------------------------------------------------------
//---------------------------------------------------------------
//---------------------------------------------------------------
// base class for all property page:
class PageBase : public CDialog
{
public:
PageBase(UINT IDD) : CDialog(IDD) {};
virtual void MakeChangesAvailable() {};
virtual BOOL IsPageValid() {return FALSE;};
virtual void DoUpdate() {};
};
#endif

View File

@@ -0,0 +1,87 @@
#ifndef AFX_PAGEGENERAL_HPP__
#define AFX_PAGEGENERAL_HPP__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// pagegeneral.hpp : header file
//
#include "camera.hpp"
#include "pagebase.hpp"
/////////////////////////////////////////////////////////////////////////////
// PageGeneral dialog
class PageGeneral : public PageBase
{
// Construction
public:
PageGeneral(Camera *p_oCameraL); // standard constructor
void MakeChangesAvailable();
BOOL IsPageValid();
void DoUpdate();
float GetTrans() { return m_fTransValue; };
float GetRot() { return m_fRotValue; };
tdeAxisSystem GetTransAxis() {return m_eTranslationAxis; };
tdeAxisSystem GetRotAxis() {return m_eRotationAxis; };
// Dialog Data
//{{AFX_DATA(PageGeneral)
enum { IDD = IDD_PROPPAGE_GENERAL };
int m_iTranslationAxis;
int m_iRotationAxis;
CString m_csRotationValue;
CString m_csTranslationValue;
int m_iTranslationStep;
int m_iRotationStep;
BOOL m_bPrivilegeMode;
//}}AFX_DATA
private:
long m_lIDofCurrentEdit;
Camera *m_p_oCamera;
float m_fTransValue;
float m_fRotValue;
tdeAxisSystem m_eRotationAxis;
tdeAxisSystem m_eTranslationAxis;
BOOL UpdateTransRadioButtons(float fTransValue = -1);
BOOL UpdateRotRadioButtons(float fRotValue = -1);
void UpdateRotText();
void UpdateTransText();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(PageGeneral)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(PageGeneral)
afx_msg void OnSetfocusEditRotvalue();
afx_msg void OnKillfocusEditRotvalue();
afx_msg void OnKillfocusEditTransvalue();
afx_msg void OnSetfocusEditTransvalue();
afx_msg void OnBtReturn();
virtual BOOL OnInitDialog();
afx_msg void OnRbTranslationStep();
afx_msg void OnRbTranslationstep();
afx_msg void OnRbRotationStep();
afx_msg void OnChkPrivilegemode();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PAGEGENERAL_HPP__2DF0418B_DCB9_11D0_BE58_00609775AC86__INCLUDED_)

View File

@@ -0,0 +1,93 @@
#if !defined(AFX_PAGEROTCENTER_HPP__CC24C3C9_DC14_11D0_BE57_00609775AC86__INCLUDED_)
#define AFX_PAGEROTCENTER_HPP__CC24C3C9_DC14_11D0_BE57_00609775AC86__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// pagerotcenter.hpp : header file
//
#include "pagebase.hpp"
#include "incitf.h"
class Camera;
class CPA_SuperObject;
/////////////////////////////////////////////////////////////////////////////
// PageRotationCenter dialog
class PageRotationCenter : public PageBase
{
// Construction
public:
PageRotationCenter(Camera* p_oCamera);
~PageRotationCenter();
BOOL IsPageValid();
void MakeChangesAvailable();
void DoUpdate();
private:
BOOL CheckComboSO();
BOOL CheckRotationCenterType();
// Dialog Data
//{{AFX_DATA(PageRotationCenter)
enum { IDD = IDD_PROPPAGE_ROTATIONCENTER };
CComboBox m_oComboSO;
CString m_csPointX;
CString m_csPointY;
CString m_csPointZ;
CString m_csSuperObjectX;
CString m_csSuperObjectY;
CString m_csSuperObjectZ;
int m_iRotationCenterType;
int m_iPointCoords;
CString m_csComboEdit;
BOOL m_bPointRelative;
//}}AFX_DATA
private:
Camera *m_p_oCamera;
long m_lIDofCurrentEdit;
CPA_CameraCoords m_oRotationCenterPoint;
CPA_SuperObject *m_p_oRotationCenterSuperObject;
tdeRotationCenterType m_eRotationCenterType;
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(PageRotationCenter)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(PageRotationCenter)
afx_msg void OnBtCopytopoint();
afx_msg void OnBtReturn();
afx_msg void OnKillfocusEditPointx();
afx_msg void OnSetfocusEditPointx();
afx_msg void OnKillfocusEditPointy();
afx_msg void OnSetfocusEditPointy();
afx_msg void OnKillfocusEditPointz();
afx_msg void OnSetfocusEditPointz();
virtual BOOL OnInitDialog();
afx_msg void OnRbPointCoords();
afx_msg void OnSelChangeComboSO();
afx_msg void OnEditChangeComboSO();
afx_msg void OnSetfocusComboso();
afx_msg void OnKillfocusComboso();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PAGEROTCENTER_HPP__CC24C3C9_DC14_11D0_BE57_00609775AC86__INCLUDED_)

View File

@@ -0,0 +1,96 @@
#ifndef PAGETARGET_HPP
#define PAGETARGET_HPP
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// pagetarget.hpp : header file
//
/////////////////////////////////////////////////////////////////////////////
// PageTarget dialog
#include "pagebase.hpp"
#include "incITF.h"
class Camera;
class CPA_SuperObject;
class PageTarget : public PageBase
{
// Construction
public:
PageTarget(Camera* p_oCamera);
~PageTarget();
BOOL IsPageValid();
void MakeChangesAvailable();
void DoUpdate();
private:
BOOL CheckComboSO();
BOOL CheckTargetType();
// Dialog Data
//{{AFX_DATA(PageTarget)
enum { IDD = IDD_PROPPAGE_TARGET };
CComboBox m_oComboSO;
CString m_csPointX;
CString m_csPointY;
CString m_csPointZ;
CString m_csSuperObjectX;
CString m_csSuperObjectY;
CString m_csSuperObjectZ;
int m_iTargetType;
int m_iPointCoords;
CString m_csComboEdit;
//}}AFX_DATA
private:
Camera *m_p_oCamera;
long m_lIDofCurrentEdit;
CPA_CameraCoords m_oTargetPoint;
CPA_SuperObject *m_p_oTargetSuperObject;
tdeTargetType m_eTargetType;
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(PageTarget)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(PageTarget)
afx_msg void OnBtCopytopoint();
afx_msg void OnBtReturn();
afx_msg void OnKillfocusEditPointx();
afx_msg void OnSetfocusEditPointx();
afx_msg void OnKillfocusEditPointy();
afx_msg void OnSetfocusEditPointy();
afx_msg void OnKillfocusEditPointz();
afx_msg void OnSetfocusEditPointz();
virtual BOOL OnInitDialog();
afx_msg void OnRbPointCoords();
afx_msg void OnSelChangeComboSO();
afx_msg void OnEditChangeComboSO();
afx_msg void OnSetfocusComboso();
afx_msg void OnKillfocusComboso();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PAGETARGET_HPP__CC24C3C8_DC14_11D0_BE57_00609775AC86__INCLUDED_)

View File

@@ -0,0 +1,79 @@
#if !defined(AFX_PROPERT_HPP)
#define AFX_PROPERT_HPP
#include "camresrc.h"
/////////////////////////////////////////////////////////////////////////////
// Properties dialog
class Properties : public CDialog
{
// Construction
public:
Properties(Camera* p_oCamera,CWnd* pParent = NULL); // standard constructor
BOOL WantToOpenCompleteProperties() {return m_bWantToOpenMore;};
void DoUpdate();
private:
BOOL UpdateTransRadioButtons(float fTransValue = -1);
BOOL UpdateRotRadioButtons(float fVRotValue = -1);
void UpdateRotText();
void UpdateTransText();
public:
// Dialog Data
//{{AFX_DATA(Properties)
enum { IDD = IDD_PROPERTIES };
int m_iRotationAxis;
int m_iTranslationAxis;
int m_iRotationStep;
CString m_csRotationValue;
CString m_csTranslationValue;
int m_iTranslationStep;
BOOL m_bPrivilegeMode;
//}}AFX_DATA
private:
float m_fTransValue;
float m_fRotValue;
tdeAxisSystem m_eRotationAxis;
tdeAxisSystem m_eTranslationAxis;
BOOL m_bWantToOpenMore;
Camera *m_p_oCamera;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(Properties)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(Properties)
virtual BOOL OnInitDialog();
afx_msg void OnKillfocusTransvalue();
afx_msg void OnKillfocusRotvalue();
afx_msg void OnRbRotationStep();
afx_msg void OnRbTranslationStep();
virtual void OnOK();
afx_msg void OnBtMore();
afx_msg void OnChkPrivilege();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PROPERT_HPP__23B05615_BFC3_11D0_BE2B_00609775AC86__INCLUDED_)