FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
RopeTube.h
1#pragma once
2
3#ifdef FH_VISUALIZATION
4
5# include "RopeLook.h"
6
7# include <array>
8# include <string>
9# include <vector>
10
11namespace Ogre
12{
13class ManualObject;
14class SceneManager;
15} // namespace Ogre
16
17namespace marine_elements
18{
19
23class RopeTube
24{
25public:
32 RopeTube(Ogre::SceneManager* scene, const std::string& name, int numPoints, int numFaces, double diameter, const RopeLook& look);
33 ~RopeTube();
34 RopeTube(const RopeTube&) = delete;
35 RopeTube& operator=(const RopeTube&) = delete;
36
38 void Update(const std::vector<std::array<double, 3>>& points);
39 void SetVisible(bool visible);
40 int NumPoints() const { return m_numPoints; }
41
42private:
43 void Write(const std::vector<std::array<double, 3>>* points, bool update);
44
45 Ogre::SceneManager* m_scene;
46 Ogre::ManualObject* m_object = nullptr;
47 int m_numPoints;
48 int m_numFaces;
49 double m_diameter;
50 RopeLook m_look;
51};
52
53} // namespace marine_elements
54
55#endif