Gazebo Math

API Reference

8.0.0
TimeVaryingVolumetricGrid< T, V, S, P > Class Template Reference

A grid with interpolation where time can be varied. This class has no implementation to allow for different strategies. More...

#include <TimeVaryingVolumetricGrid.hh>

Public Member Functions

std::pair< Vector3< V >, Vector3< V > > Bounds (const S &_session) const
 Get the spatial bounds of this grid field at given time.
 
S CreateSession () const
 Creates a session. Call this before querying the interface.
 
S CreateSession (const T &_time) const
 Creates a session at a given time. Call this before querying the interface.
 
bool IsValid (const S &_session) const
 Returns true if a session is valid. False if invalid,.
 
std::optional< VLookUp (const S &_session, const Vector3< P > &_pos) const
 Looks up a value at a given point in time.
 
std::optional< SStepTo (const S &_session, const T &_time) const
 Steps the session to a fixed time step.
 

Detailed Description

template<typename T, typename V, typename S, typename P>
class gz::math::TimeVaryingVolumetricGrid< T, V, S, P >

A grid with interpolation where time can be varied. This class has no implementation to allow for different strategies.

See also
InMemoryTimeVaryingVolumetricGrid for an example specialization that loads all data into memory. To use this class you should use CreateSession so you can step through time.

Member Function Documentation

◆ Bounds()

template<typename T , typename V , typename S , typename P >
std::pair< Vector3< V >, Vector3< V > > Bounds ( const S _session) const

Get the spatial bounds of this grid field at given time.

Returns
A pair of vectors. All zeros if session is invalid.

◆ CreateSession() [1/2]

template<typename T , typename V , typename S , typename P >
S CreateSession ( ) const

Creates a session. Call this before querying the interface.

◆ CreateSession() [2/2]

template<typename T , typename V , typename S , typename P >
S CreateSession ( const T &  _time) const

Creates a session at a given time. Call this before querying the interface.

Parameters
[in]_time- The time at which to create the session.

◆ IsValid()

template<typename T , typename V , typename S , typename P >
bool IsValid ( const S _session) const

Returns true if a session is valid. False if invalid,.

◆ LookUp()

template<typename T , typename V , typename S , typename P >
std::optional< V > LookUp ( const S _session,
const Vector3< P > &  _pos 
) const

Looks up a value at a given point in time.

Parameters
[in]_session- The session with the time stamp to be looked up.
[in]_pos- The position of the point we want to query

◆ StepTo()

template<typename T , typename V , typename S , typename P >
std::optional< S > StepTo ( const S _session,
const T &  _time 
) const

Steps the session to a fixed time step.

Parameters
[in]_session- The session to be stepped
[in]_time- The time at which the session should be set.
Returns
the session cursor if the step was successful. If there was no more data return nullopt.

The documentation for this class was generated from the following file: