8#include <ScalarFieldBake.h>
10#include <fhsim/simobject/SimObject.h>
16class EnvironmentProvider;
19#ifdef FH_VISUALIZATION
20# include "visual/BakedFieldTexture.h"
22# include <OgreMaterial.h>
58 void FinalSetup(
const double T,
const double*
const X, ISimObjectCreator* Creator)
override;
61 void OdeFcn(
const double T,
const double*
const X,
double*
const XDot)
const override;
87 void ResolveCounts(
const double extent[3], std::size_t budget,
int counts[3])
const;
108 void ValidateGridCounts(ISimObjectCreator* Creator,
const int counts[3],
const std::string& extentParameterName)
const;
119 [[nodiscard]] environment::field::ScalarField&
Field()
const;
121#ifdef FH_VISUALIZATION
151 void SwapTextures(std::unique_ptr<visual::BakedFieldTexture> textures);
159 Ogre::MaterialPtr CloneMaterial(
const Ogre::String& baseMaterialName);
169 void ApplyMaterialSettings(
double valueMin,
double valueMax)
const;
174 [[nodiscard]]
const Ogre::MaterialPtr& Material()
const {
return m_material; }
178 std::string m_fieldName;
182 bool m_hasResolution;
187 double m_colorRange[2];
188 double m_visibleRange[2];
189 double m_alphaRange[2];
191 bool m_hasColorRange;
192 bool m_hasVisibleRange;
193 bool m_showExtrapolated;
194 bool m_visualiseAsConstant;
196 environment::EnvironmentProvider* m_pEnvironment;
198 std::shared_ptr<environment::field::ScalarField> m_field;
200 bool m_fieldIsThreadSafe;
202#ifdef FH_VISUALIZATION
203 std::unique_ptr<visual::BakedFieldTexture> m_texture;
204 Ogre::MaterialPtr m_material;
Definition VisualBakedScalarField.h:46
environment::field::ScalarField & Field() const
void OdeFcn(const double T, const double *const X, double *const XDot) const override
No state; the ODE function is a no-op.
bool MaskInaccurate() const
Definition VisualBakedScalarField.h:113
void ValidateGridCounts(ISimObjectCreator *Creator, const int counts[3], const std::string &extentParameterName) const
VisualBakedScalarField(std::string SimObjectName, ISimObjectCreator *Creator, int numAxes)
~VisualBakedScalarField() override
Releases the cloned material and the baked textures.
void ResolveCounts(const double extent[3], std::size_t budget, int counts[3]) const
void FinalSetup(const double T, const double *const X, ISimObjectCreator *Creator) override
Environment SimObjects.
Definition Environment.h:25
A scalar field evaluated over a SamplingBox and encoded to 16-bit codes.
Definition ScalarFieldBake.h:52
Definition ScalarFieldBake.h:44