Class spatial_entity2D

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class spatial_entity2D : public cosm::repr::spatial_entity

Entity class from which all entities that which occupy spatial space in the arena inherit. Note that occupying spatial space does not imply robots can physically interact with the entity. Basically defines the interface for a 2D bounding box for entities.

Subclassed by cosm::repr::entity2D, cosm::repr::spatial_entity3D

Public Functions

~spatial_entity2D(void) override = default
inline spatial_entity(const rtypes::type_uuid &id, const rmath::vector3d &dims, const rmath::vector3d &center, const rspatial::euclidean_dist &factor)
inline spatial_entity(const rtypes::type_uuid &id, const rmath::vector3d &dims, const rspatial::euclidean_dist &factor)
inline spatial_entity(const rtypes::type_uuid &id, const rmath::vector3z &dims, const rmath::vector3z &center, const rspatial::euclidean_dist &factor)
inline spatial_entity(const rtypes::type_uuid &id, const rmath::vector3z &dims, const rspatial::euclidean_dist &factor)
inline size_t xdsize(void) const

Get the size of the entity in the X direction in discrete coordinates.

inline rmath::rangez xdspan(void) const

Calculate the span in X of the entity in discrete coordinates.

Returns:

The span in X of the entity.

inline rspatial::euclidean_dist xrsize(void) const

Get the size of the entity in the X direction in real coordinates.

inline rmath::ranged xrspan(void) const

Calculate the span in X of th entity in real coordinates.

inline size_t ydsize(void) const

Get the size of the entity in the Y direction in discrete coordinates.

inline rmath::rangez ydspan(void) const

Calculate the span in Y of the entity in discrete coordinates.

inline rspatial::euclidean_dist yrsize(void) const

Get the size of the entity in the Y direction in real coordinates.

inline rmath::ranged yrspan(void) const

Calculate the span in Y of the entity in real coordinates.