Typedef mola::Entity
Defined in File Entity.h
Typedef Documentation
-
using mola::Entity = std::variant<std::monostate, RefPose3, RelPose3, RelPose3KF, RelDynPose3KF, LandmarkPoint3, EntityOther>
Variant type for “entities” in the world model. It’s guaranteed that the type is either:
std::monostate
: Not initialized, orA class derived from
EntityBase
(stored by value), orEntityOther
, which is a wrapper aroundEntityBase::Ptr
(an object allocated in the heap).
In this way,
Entity
can be handled as a polymorphic class, without the cost of dynamic memory allocation for the most-common classes, while still allowing using any user-derived class via dynamic memory.