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