Marine systems simulation
CBasicEnvironment.h
1#ifndef CBasicEnvironment_H
2#define CBasicEnvironment_H
3
73#include "CBasicBottom.h"
74#include "CBasicCurrentVel.h"
75#include "CBottomDepth.h"
76#include "SimObject.h"
77
78#include <string>
79
80#ifdef FH_VISUALIZATION
81class CFhCamera;
82# include "sfh/ogre/NMeshGenerators.h"
83#endif
84
85const int kNumLights = 1;
86const int k_iWorldOriginParamIndex = 1;
87const int k_iSurfaceSpecParamIndex = 2;
88const int k_iSimTimeParamIndex = 3;
89
90
91class CBasicEnvironment : public SimObject
92{
93 public:
95 CBasicEnvironment(std::string sSimObjectName, ISimObjectCreator* pCreator);
96
99
101 virtual void OdeFcn(const double dT, const double* const adX, double* const adXDot, const bool bIsMajorTimeStep);
102
104 virtual void FinalSetup(const double dT, const double* const adX, ISimObjectCreator* const pCreator);
105
106 void BottomSetup();
107
108#ifdef FH_VISUALIZATION
110 virtual void RenderInit(Ogre::Root* const pOgreRoot, ISimObjectCreator* const pCreator);
111
113 virtual void RenderUpdate(const double dT, const double* const adX);
114#endif
115
116 protected:
119
120 ISignalPort* m_pInCurrentVel;
121
122 CBasicCurrentVel* m_pCurrentVel;
125 double m_dMeanDepth;
126 double m_dBottomRoughness;
127 double m_dBottomStructureScale;
128 double m_dSeaFloorDampingHor;
129 double m_dSeaFloorDampingVert;
130 double m_dSeaFloorHardness;
131 double m_dSeaFloorDensity;
132 double m_dCableDampingTangential;
133 double m_dCableDampingNormal;
134
135#ifdef FH_VISUALIZATION
136 Ogre::Vector4 CalcWorldOrigin();
137
138 double m_dFrameRate;
139 Ogre::Light* m_light[kNumLights];
140 meshgenerators::SCircleSpec m_SSurfacePerimeterSpec;
141 meshgenerators::SCircleSpec m_SBottomPerimeterSpec;
142
143 CFhCamera* m_pCamera;
144 Ogre::Entity* m_OceanEntity;
145 Ogre::Entity* m_SubOceanEntity;
146 Ogre::SceneNode* m_WorldSceneNode;
147 Ogre::SceneManager* m_pSceneMgr;
148 double m_dSurfaceTextureScale;
149 double m_dBottomTextureScale;
150 double m_dTerrainRadius;
151 double m_dSurfaceDepth;
152 int m_iNumTerrainRings;
153 std::string m_sSurfaceMaterial;
154 std::string m_sSubSurfaceMaterial;
155 std::string m_sSeabedMaterial;
156
157#endif
158};
159
160
161#endif
Definition: CBasicBottom.h:21
Definition: CBasicCurrentVel.h:14
Definition: CBasicEnvironment.h:92
~CBasicEnvironment()
The destructor cleans up.
ISignalPort * m_pInCurrentVel
A pointer to the input current velocity.
Definition: CBasicEnvironment.h:120
CBasicEnvironment(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
virtual void FinalSetup(const double dT, const double *const adX, ISimObjectCreator *const pCreator)
Make final preparations before simulation starts. Called before RenderInit.
void InitParameters()
Sets the parameters of the mass object.
CBottomDepth * m_pBottomDepth
The bottom object.
Definition: CBasicEnvironment.h:123
CBasicBottom * m_pBottomForce
The bottom object.
Definition: CBasicEnvironment.h:124
Definition: CBottomDepth.h:14