FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CExpandedLines.h
1#ifndef CExpandedLines_h__
2#define CExpandedLines_h__
3
4#include <string>
5
6#ifdef FH_VISUALIZATION
7# include <vector>
8# pragma warning(push)
9# pragma warning(disable : 4251)
10# pragma warning(disable : 4267)
11# include <Ogre.h>
12# pragma warning(pop)
13
14class CExpandedLines
15{
16 public:
17 // CExpandedLines();
18 CExpandedLines(int iNumPoints,
19 Ogre::Root* pOgreRoot,
20 Ogre::SceneNode* pSceneNode,
21 std::string materialName,
22 double radius,
23 double radiusFudge
24 /*,
25 Ogre::ColourValue* colour = NULL*/
26 );
27 CExpandedLines(int iNumPoints,
28 Ogre::Root* pOgreRoot,
29 Ogre::SceneNode* pSceneNode,
30 std::string materialName,
31 double radius,
32 std::vector<double>& radiusFudges
33 /*,
34 Ogre::ColourValue* colour = NULL*/
35 );
36 void Initialize();
37 ~CExpandedLines(void);
38 virtual void Update();
39 // int AddPoint( );
40 void SetPoint(int index, const double* adPos);
41 void SetPoint(int index, const double x, const double y, const double z);
42 void SetPoint(int index, const Ogre::Vector3& position);
43 void SetNumFaces(int iNumFaces);
44 void Finalize();
45 Ogre::ManualObject* GetRendererObject() { return m_pRendererObject; }
46
47 protected:
48 int m_iNumPoints;
49 int m_iNumFaces;
50 bool m_bFinalized;
51 bool m_bDirty;
52 double m_dRadius;
53 std::vector<double> m_VdRadiusFudges;
54 std::vector<Ogre::Vector3> m_aVPoints;
55 double* m_adTotalLength;
56 Ogre::ManualObject* m_pRendererObject;
57 Ogre::Root* m_pOgreRoot;
58 Ogre::SceneNode* m_pSceneNode;
59 std::string m_sMaterialName;
60 std::string m_sCableName;
61 Ogre::Vector3* m_aVExpandedPoints;
62 Ogre::Vector3* m_aVNormals;
63
64 int GetBestOffset(int j);
65
66 static int s_iCableID;
67};
68#endif
69#endif // CExpandedLines_h__