FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
VisualFieldPlane.h
1#pragma once
2
8#include "VisualField.h"
9
10#include <memory>
11#include <string>
12
13#ifdef FH_VISUALIZATION
14# include "visual/ScalarPlane.h"
15#endif
16
17namespace environmentmodels
18{
19
83{
84public:
92 VisualFieldPlane(std::string SimObjectName, ISimObjectCreator* Creator);
93
96
97#ifdef FH_VISUALIZATION
105 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* Creator) override;
106
112 void RenderUpdate(const double T, const double* const X) override;
113#endif
114
115private:
117 struct Frame
118 {
119 double position[3];
120 double localX[3];
121 double localY[3];
122 };
123
129 void ResolvePlaneAxes(ISimObjectCreator* Creator);
130
132 void ReadMotion(ISimObjectCreator* Creator);
133
135 [[nodiscard]] Frame FrameAt(double T) const;
136
138 [[nodiscard]] util::SamplingBox MakeBox(const Frame& frame) const;
139
140 double m_position[3];
141 double m_localX[3];
142 double m_localY[3];
143 double m_size[2];
144
145 bool m_hasPosition2;
146 double m_position2[3];
147 double m_positionPeriod;
148 double m_rotationPeriodX;
149 double m_rotationPeriodY;
150
151 int m_counts[3];
152
153#ifdef FH_VISUALIZATION
154 std::unique_ptr<visual::ScalarPlane> m_scalarPlane;
155#endif
156};
157
158} // namespace environmentmodels
Definition VisualFieldPlane.h:83
~VisualFieldPlane() override
Releases the plane geometry; the base releases the material and the textures.
VisualFieldPlane(std::string SimObjectName, ISimObjectCreator *Creator)
Definition VisualField.h:53
Environment SimObjects.
Definition Environment.h:25
Definition ScalarFieldBake.h:44