AnimatLab  2
Test
VsScriptedSimulationWindow.h
1 #pragma once
2 
3 #include "OsgLinearPath.h"
4 
5 namespace VortexAnimatSim
6 {
7  namespace Visualization
8  {
9 
11 {
12  protected:
13  CStdPtrArray<OsgLinearPath> m_aryCameraPaths;
14  CStdMap<double, OsgLinearPath *> m_arySortedCameraPaths;
15  CStdMap<double, OsgLinearPath *>::iterator m_iCurrentPathIter;
16 
17  OsgLinearPath *m_lpCurrentPath;
18 
21  //This is the body part that we will switch to once sim starts.
22  BodyPart *m_lpDefaultTrackBody;
23  std::string m_strDefaultPartID;
24 
25  CStdFPoint m_vDefaultPosition;
26 
27  virtual void AddCameraPath(std::string strXml);
28  virtual void RemoveCameraPath(std::string strID, bool bThrowError = true);
29  virtual OsgLinearPath *LoadCameraPath(CStdXml &oXml);
30  virtual void TrackCamera();
31  virtual void FindNextCameraPath();
32 
33  public:
35  virtual ~VsScriptedSimulationWindow(void);
36 
37  virtual std::string DefaultPartID();
38  virtual void DefaultPartID(std::string strID);
39 
40  virtual CStdFPoint DefaultPosition();
41  virtual void DefaultPosition(CStdFPoint &oPoint, bool bUseScaling = true);
42  virtual void DefaultPosition(float fltX, float fltY, float fltZ, bool bUseScaling = true);
43  virtual void DefaultPosition(std::string strXml, bool bUseScaling = true);
44 
45  virtual int FindCameraPath(std::string strID, bool bThrowError = true);
46  virtual void SortPaths();
47 
48  virtual void SimStarting();
49 
50  virtual void Update();
51 
52  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
53  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
54  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
55  virtual void Initialize();
56  virtual void ResetSimulation();
57  virtual void Load(CStdXml &oXml);
58 };
59 
60  }// end Visualization
61 }// end VortexAnimatSim
62 
BodyPart * m_lpOriginalTrackBody
Used to keep track of the body part that was being tracked before sim started.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.