Marine systems simulation
CDiskBase.h
1#ifndef CDiskBase_h__
2#define CDiskBase_h__
3
4#include "sfh/constants.h"
5
6#ifdef FH_VISUALIZATION
7#pragma warning(push)
8#pragma warning( disable : 4251 )
9 #include <Ogre.h>
10#pragma warning(pop)
11#endif
12
14{
15public:
16 inline static double DragForceTangential( double Rho, double Cd, double Ddisk, double Tdisk, double Dcable, double Ampvel, double Vnormal)
17 {
18 return 1./2. * Rho * Ampvel * Cd * (Ddisk- Dcable) * Tdisk*Vnormal;
19 }
20
21 inline static double DragForceNormal( double Rho, double Cd, double Ddisk, double Tdisk, double Dcable, double Ampvel, double Vtangential)
22 {
23 return 1./8. * Rho * sfh::pi * Ampvel* Cd* Ddisk * (Ddisk- Dcable/sfh::pi)*Vtangential;
24 }
25
26#ifdef FH_VISUALIZATION
27 inline static void CreateOgreDisk(Ogre::SceneManager* SceneManager, Ogre::String DiskName, Ogre::SceneNode** pNode, Ogre::Entity** pEntity,double Diameter=1, double Thickness=0.1,Ogre::String DiskMaterial="DiffuseSpecular")
28 {
29 *pNode = SceneManager->getRootSceneNode()->createChildSceneNode( DiskName + "Node");
30 *pEntity = SceneManager->createEntity( DiskName+"Entity", "fhDisk.mesh" );
31 (*pNode)->attachObject( *pEntity );
32 (*pNode)->scale(static_cast<Ogre::Real>(Diameter), static_cast<Ogre::Real>(Diameter), static_cast<Ogre::Real>(Thickness) );
33 (*pEntity)->setMaterialName(DiskMaterial);
34 }
35#endif
36
37};
38#endif // CDiskBase_h__
Definition: CDiskBase.h:14