Lookup table for a time-varying volumetric dataset. This is an unimplemented template as the actual methods depend on the underlying structure. The key idea is that one uses a session S
to hold a session token. This is so that we don't keep doing O(logn) lookups and instead step along the axis.
More...
#include <TimeVaryingVolumetricGridLookupField.hh>
Public Member Functions | |
TimeVaryingVolumetricGridLookupField () | |
Constructor. More... | |
void | AddVolumetricGridField (const T &time, const VolumetricGridLookupField< V > &_field) |
Adds a volumetric grid field. More... | |
std::pair< Vector3< V >, Vector3< V > > | Bounds (const S &_session) |
Get the bounds of this grid field. More... | |
S | CreateSession () const |
Creates a session for querying. More... | |
S | CreateSession (const T &_time) const |
Creates a session startingg at time T. More... | |
template<typename X > | |
std::optional< X > | EstimateQuadrilinear (const S &_session, const std::vector< InterpolationPoint4D< T, V >> &_points, const std::vector< X > &_values1, const std::vector< X > &_values2, const X _default=X(0)) const |
Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range. More... | |
std::vector< InterpolationPoint4D< T, V > > | LookUp (const S &_session, const Vector3< V > &_point, const Vector3< V > &_tol) const |
Looks up interpolators at a given time step. Use the session to set the time step. More... | |
std::optional< S > | StepTo (const S &_session, const T &_time) |
Update session to new time. Returns new session pointer if more is available. Otherwise returns nullopt if we have run out of time. More... | |
Detailed Description
template<typename T, typename V, typename S>
class gz::math::TimeVaryingVolumetricGridLookupField< T, V, S >
Lookup table for a time-varying volumetric dataset. This is an unimplemented template as the actual methods depend on the underlying structure. The key idea is that one uses a session S
to hold a session token. This is so that we don't keep doing O(logn) lookups and instead step along the axis.
Constructor & Destructor Documentation
◆ TimeVaryingVolumetricGridLookupField()
Constructor.
Member Function Documentation
◆ AddVolumetricGridField()
void AddVolumetricGridField | ( | const T & | time, |
const VolumetricGridLookupField< V > & | _field | ||
) |
Adds a volumetric grid field.
◆ Bounds()
Get the bounds of this grid field.
- Returns
- A pair of vectors.
◆ CreateSession() [1/2]
S CreateSession | ( | ) | const |
Creates a session for querying.
◆ CreateSession() [2/2]
S CreateSession | ( | const T & | _time | ) | const |
Creates a session startingg at time T.
- Parameters
-
[in] _time The time to create the session at.
◆ EstimateQuadrilinear()
std::optional<X> EstimateQuadrilinear | ( | const S & | _session, |
const std::vector< InterpolationPoint4D< T, V >> & | _points, | ||
const std::vector< X > & | _values1, | ||
const std::vector< X > & | _values2, | ||
const X | _default = X(0) |
||
) | const |
Uses quadrilinear interpolation to estimate value of current point. Returns nullopt if query is out of range.
- Parameters
-
[in] _session - The session [in] _points - The interpolation points retrieved from LookUp()
.[in] _values1 - Value array at timestep 1. [in] _values2 - Value array at timestep 2. [in] _default - Value used if there is a hole in the data.
- Returns
- The estimated value for the point. Nullopt if we are outside the field. Default value if in the field but no value is in the index.
◆ LookUp()
std::vector<InterpolationPoint4D<T, V> > LookUp | ( | const S & | _session, |
const Vector3< V > & | _point, | ||
const Vector3< V > & | _tol | ||
) | const |
Looks up interpolators at a given time step. Use the session to set the time step.
- Parameters
-
[in] _session - The session [in] _point - The point to query [in] _tol - Tolerance
◆ StepTo()
std::optional<S> StepTo | ( | const S & | _session, |
const T & | _time | ||
) |
Update session to new time. Returns new session pointer if more is available. Otherwise returns nullopt if we have run out of time.
- Parameters
-
[in] _session - The session [in] _time - Time to step to.
The documentation for this class was generated from the following file: