Class unicell_entity3D
Defined in File unicell_entity3D.hpp
Inheritance Relationships
Base Types
public cosm::repr::entity3D
(Class entity3D)public rer::client< unicell_entity3D >
Derived Type
public cosm::repr::unicell_movable_entity3D
(Class unicell_movable_entity3D)
Class Documentation
-
class unicell_entity3D : public cosm::repr::entity3D, public rer::client<unicell_entity3D>
Representation of a 3D entity in the arena.
Resides in a single cell (“unicell”)
Has an extent that can span multiple cells, even though the entity itself “resides” in a single cell. A useful, simplifying abstraction in dealing with the kinds of entities that robots interact with because the handshaking logic is much simpler.
Subclassed by cosm::repr::unicell_movable_entity3D
Public Functions
-
~unicell_entity3D(void) override = default
-
inline bool contains_point(const rmath::vector2d &point) const
Return if a real-valued point lies within the extent of the 3D entity in 2D for:
Visualization purposes.
Determining if a robot is on top of an entity.
- Parameters:
point – The point to check.
- Returns:
TRUE
if the condition is met, andFALSE
otherwise.
-
inline bool contains_point(const rmath::vector3d &point) const
-
inline rmath::vector3z danchor3D(void) const
-
inline rmath::vector3z dcenter3D(void) const
-
inline rmath::vector3d ranchor3D(void) const
Protected Functions
-
inline unicell_entity3D(const rtypes::type_uuid &id, const rmath::vector3d &dims, const rmath::vector3d ¢er, const rtypes::discretize_ratio &resolution)
-
inline unicell_entity3D(const rtypes::type_uuid &id, const rmath::vector3d &dims, const rtypes::discretize_ratio &resolution)
-
inline const rtypes::discretize_ratio &arena_res(void) const
-
template<typename T, typename std::enable_if<T::is_movable(), int>::type = 0>
inline void danchor3D(const rmath::vector3z &danchor) SFINAE to allow only derived classes that mark themselves as movable to change the initial position of the entity.
Updates the discrete anchor,center. Does not change the real anchor,center of the entity.
-
template<typename T, typename std::enable_if<T::is_movable(), int>::type = 0>
inline void ranchor3D(const rmath::vector3d &ranchor) SFINAE to allow only derived classes that mark themselves as movable to change the initial position of the entity.
Updates the real anchor,center. Does not change the discrete anchor,center of the entity.