AnimatLab  2
Test
SimulationWindow.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
20  class ANIMAT_PORT SimulationWindow : public AnimatBase
21  {
22  protected:
25 
27  HWND m_HWND;
28 
30  CStdFPoint m_ptPosition;
31 
33  CStdFPoint m_ptSize;
34 
39 
43  std::string m_strLookAtBodyID;
44 
50 
57  virtual void TrackCamera() = 0;
58 
59  public:
60  SimulationWindow(void);
61  SimulationWindow(HWND win);
62  ~SimulationWindow(void);
63 
64  static SimulationWindow *CastToDerived(AnimatBase *lpBase) {return static_cast<SimulationWindow*>(lpBase);}
65 
66  virtual void LookAtStructureID(std::string strID);
67  virtual std::string LookAtStructureID();
68 
69  virtual void LookAtBodyID(std::string strID);
70  virtual std::string LookAtBodyID();
71 
72  virtual void UsingTrackCamera(bool bVal);
73  virtual bool UsingTrackCamera();
74 
75  virtual HWND WindowID();
76  virtual void WindowID(HWND win);
77 
78  virtual bool StandAlone();
79  virtual void StandAlone(bool bVal);
80 
81  virtual CStdFPoint GetCameraPosition() = 0;
82 
89  virtual void SetupTrackCamera(bool bResetEyePos) = 0;
90  virtual void SetupTrackCamera(bool bTrackCamera, std::string strLookAtStructureID, std::string strLookAtBodyID);
91  virtual void SetCameraLookAt(CStdFPoint oTarget, bool bResetEyePos);
92  virtual void SetCameraPositionAndLookAt(CStdFPoint oCameraPos, CStdFPoint oTarget);
93  virtual void SetCameraPostion(CStdFPoint vCameraPos);
94 
95  virtual void UpdateBackgroundColor();
96 
97 #pragma region DataAccesMethods
98 
99  virtual float *GetDataPointer(const std::string &strDataType);
100  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
101  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
102 
103 #pragma endregion
104 
111  virtual void Update() = 0;
112 
119  virtual void Close() = 0;
120 
121  virtual void Load(CStdXml &oXml);
122 
131  virtual void Load(std::string strXml);
132 
139  virtual void OnGetFocus();
140 
147  virtual void OnLoseFocus();
148  };
149 
150 }//end namespace AnimatSim
Root namespace for the base simulation library for AnimatLab.
Base class for a simulation window.
bool m_bStandAlone
true if the window is seperate from all other windows.
CStdFPoint m_ptSize
Size of the window.
HWND m_HWND
Handle of the hwnd.
CStdFPoint m_ptPosition
The position of the window.
Animat base class.
Definition: AnimatBase.h:36