8#ifndef META_OCEAN_TRACKING_SLAM_CAMERA_POSES_H
9#define META_OCEAN_TRACKING_SLAM_CAMERA_POSES_H
155 inline size_t size()
const;
249 return iCameraPose->second;
269 return cameraPose->world_T_camera();
280 return cameraPose->flippedCamera_T_world();
Index32 frameIndex_
The current frame index, with range [0, infinity), -1 before the first call of nextFrame().
Definition CameraPoses.h:183
Mutex mutex_
The mutex of this object.
Definition CameraPoses.h:192
size_t size() const
Returns the number of camera poses stored in this container.
Definition CameraPoses.h:283
bool hasPose(const Index32 frameIndex, SharedCameraPose &cameraPose) const
Returns whether this container holds a valid camera pose for a specific frame index.
bool hasPose(const Index32 frameIndex) const
Returns whether this container holds a valid camera pose for a specific frame index.
Definition CameraPoses.h:252
static constexpr Index32 invalidFrameIndex_
Invalid frame index constant.
Definition CameraPoses.h:41
void removePoses()
Removes all poses.
CameraPoseMap cameraPoseMap_
The map mapping frame indices to camera poses.
Definition CameraPoses.h:189
bool isValidLockFree() const
Returns whether this container has been activated.
Definition CameraPoses.h:306
bool isValid() const
Returns whether this container has been activated.
Definition CameraPoses.h:299
CameraPoses()
Creates a new container object.
Indices32 validPoseFrameIndices(const Index32 lastFrameIndex, const Index32 numberFrames) const
Returns the indices of all valid camera poses within a specified range.
bool isEmpty() const
Returns whether this container holds no valid camera pose.
Definition CameraPoses.h:292
Index32 previousFrameIndex() const
Returns the index of the previous frame.
Definition CameraPoses.h:213
Index32 frameIndex() const
Returns the current frame index.
Definition CameraPoses.h:195
void setPose(const Index32 frameIndex, SharedCameraPose &&cameraPose, const Index32 mapVersion)
Sets or updates the camera pose for a specific frame index.
SharedCameraPose pose(const Index32 frameIndex) const
Returns the camera pose for a specific frame index.
Definition CameraPoses.h:236
Box3 boundingBox() const
Returns the 3D bounding box enclosing the positions/translations of all camera poses.
Index32 lastValidPoseFrameIndex_
The frame index of the last valid camera pose, with range [0, frameIndex()], -1 if no valid camera po...
Definition CameraPoses.h:186
void nextFrame()
Increases the frame index by one and makes the current camera pose the previous camera pose.
Index32 lastValidPoseFrameIndex() const
Returns the index of the last valid camera pose.
Definition CameraPoses.h:227
HomogenousMatrix4 flippedCamera_T_world(const Index32 frameIndex) const
Returns the transformation between world and flipped camera for a specific frame index.
Definition CameraPoses.h:272
std::unordered_map< Index32, SharedCameraPose > CameraPoseMap
Definition of an unordered map mapping frame indices to camera poses.
Definition CameraPoses.h:38
HomogenousMatrix4 world_T_camera(const Index32 frameIndex) const
Returns the transformation between camera and world for a specific frame index.
Definition CameraPoses.h:261
Index32 nextFrameIndex() const
Returns the next frame index.
Definition CameraPoses.h:204
This class implements a scoped read lock for a shared mutex.
Definition Mutex.h:261
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
BoxT3< Scalar > Box3
Definition of the Box3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single or...
Definition Box3.h:28
std::shared_mutex Mutex
Definition of a mutex supporting read and write locks.
Definition Mutex.h:78
std::shared_ptr< CameraPose > SharedCameraPose
Definition of a shared pointer holding a CameraPose object.
Definition CameraPose.h:36
Namespace of the SLAM Tracking library.
Definition BackgroundTask.h:24
Namespace of the Tracker library.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15