8#ifndef META_OCEAN_TRACKING_SLAM_GRAVITIES_H
9#define META_OCEAN_TRACKING_SLAM_GRAVITIES_H
45 inline bool setGravity(
const Index32 frameIndex,
const Vector3& gravity);
53 inline bool hasGravity(
const Index32 frameIndex,
Vector3* gravity)
const;
77 const GravityMap::const_iterator iGravity =
gravityMap_.find(frameIndex);
84 if (gravity !=
nullptr)
86 *gravity = iGravity->second;
This class implements a container for gravity vectors associated with frame indices.
Definition Gravities.h:29
bool setGravity(const Index32 frameIndex, const Vector3 &gravity)
Sets the gravity vector for a specific frame index.
Definition Gravities.h:64
Mutex mutex_
The mutex of this object.
Definition Gravities.h:61
bool hasGravity(const Index32 frameIndex, Vector3 *gravity) const
Returns whether this container holds a gravity vector for a specific frame index.
Definition Gravities.h:73
GravityMap gravityMap_
The map mapping frame indices to gravity vectors.
Definition Gravities.h:58
std::unordered_map< Index32, Vector3 > GravityMap
Definition of an unordered map mapping frame indices to gravity vectors.
Definition Gravities.h:35
This class implements a scoped read lock for a shared mutex.
Definition Mutex.h:261
This class implements a scoped write lock for a shared mutex.
Definition Mutex.h:323
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::shared_mutex Mutex
Definition of a mutex supporting read and write locks.
Definition Mutex.h:78
The namespace covering the entire Ocean framework.
Definition Accessor.h:15