Marine systems simulation
CCameraController.h
1
55#ifndef C_CAMERA_CONTROLLER_H
56#define C_CAMERA_CONTROLLER_H
57
58#include <string>
59
60#ifdef FH_VISUALIZATION
61# pragma warning(push)
62# pragma warning(disable : 4251)
63# pragma warning(disable : 4267)
64# include "CFhCamera.h"
65
66# include <Ogre.h>
67# include <OgreResourceGroupManager.h>
68# pragma warning(pop)
69#endif
70#include "sfh/math/math.h"
71
72#include <SimObject.h>
73
74class CCameraController : public SimObject
75{
76 public:
77 CCameraController(std::string sSimObjectName, ISimObjectCreator* pCreator);
78 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep)
79 {
80 }
81#ifdef FH_VISUALIZATION
82 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
83 void RenderUpdate(const double T, const double* const X);
84#endif
85
86 protected:
87 void ReadParameter(ISimObjectCreator* pCreator, std::string sTag, double* adDistance, int iNumStates);
88
89#ifdef FH_VISUALIZATION
90 double GetAngle(double dOldAngle, double dSuggestedNewAngle);
91#endif
92
93 ISignalPort** m_apInPos;
94 int m_iTarget;
95 int m_iNumStates;
96 double* adStartTimes;
97 double* adDistance;
98 double* adAzimuth;
99 double* adElevation;
100 double m_adTargetPos[3];
101 double m_dTrackPos;
102#ifdef FH_VISUALIZATION
103 CFhCamera* m_pFhCamera;
104 Ogre::Camera* m_pCamera;
105 Ogre::SimpleSpline m_CameraSpline;
106 double m_posFilterTime;
107
108#endif
109};
110
111#endif //C_CAMERA_CONTROLLER_H
Definition: CCameraController.h:75