4# include <OgreManualObject.h>
6# include <OgreSceneNode.h>
7# include <OgreSubMesh.h>
9# include <fhsim_environment/EnvironmentProvider.h>
17struct FlowPlaneSettings
20 double position[3] = {0.0, 0.0, 0.0};
22 double localX[3] = {1.0, 0.0, 0.0};
24 double localY[3] = {0.0, 1.0, 0.0};
26 double size[2] = {50.0, 50.0};
28 int vertexCounts[2] = {50, 50};
30 double visibleRange[2] = {0.0, 1.0};
32 double colorRange[2] = {0.0, 1.0};
34 double alphaRange[2] = {0.3, 0.6};
38using ComputeFunction = std::function<double(
double T,
const double pos[3])>;
56 FlowPlane(Ogre::Root* ogreRoot,
57 environment::EnvironmentProvider* provider,
58 const FlowPlaneSettings& settings,
59 ComputeFunction computeFunc =
nullptr);
61 ~FlowPlane() =
default;
62 FlowPlane(
const FlowPlane&) =
delete;
63 FlowPlane& operator=(
const FlowPlane&) =
delete;
69 void Update(
double T);
77 void SetTransform(
const double position[3],
const double localX[3],
const double localY[3]);
86 void SetComputeFunction(ComputeFunction func);
93 void UpdateVertexPositions();
99 void UpdateOgreNodeOrientation();
102 environment::EnvironmentProvider* m_provider;
104 Ogre::SceneNode* m_node;
106 Ogre::SubMesh* m_subMesh;
108 int m_vertexCounts[2];
112 double m_position[3];
122 std::vector<std::array<double, 3>> m_vertexWorldPos;
124 ComputeFunction m_computeFunction;
126 Ogre::Entity* m_entity;
128 int m_defaultRenderQueueGroup;
Visualization utilities.
Definition EnvironmentSettings.h:13