18 #ifndef GZ_MATH_TIME_VARYING_VOLUMETRIC_GRID_HH_
19 #define GZ_MATH_TIME_VARYING_VOLUMETRIC_GRID_HH_
35 template<
typename T,
typename V,
typename S,
typename P>
47 public:
bool IsValid(
const S &_session)
const;
54 public: std::optional<S>
StepTo(
const S &_session,
const T &_time)
const;
70 template<
typename T,
typename V,
typename P>
76 return indices.CreateSession();
82 return indices.CreateSession(_time);
88 return indices.IsValid(_session);
92 public: std::optional<InMemorySession<T, P>>
95 return indices.StepTo(_session, _time);
101 public: std::optional<V>
107 auto points = indices.LookUp(_session, _pos, _tol);
108 std::optional<V> result = indices.EstimateQuadrilinear(
122 return indices.Bounds(_session);
132 template<
typename U,
typename S,
typename X>
138 template<
typename T,
typename V = T,
typename P = T>
143 template<
typename T,
typename V,
typename P =
double>
151 const T &_time,
const Vector3<P> &_position,
const V &_value)
153 _points[_time].emplace_back(_position, _value);
160 for (
auto &[time, pts] : _points)
164 for (
auto &[pt, val] : pts)
171 grid.indices.AddVolumetricGridField(time, field);