Class entity2D

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class entity2D : public cosm::repr::spatial_entity2D

A base class from which all spatial entities which can be represented in 2D derive.

Subclassed by cosm::repr::grid2D_view_entity< cads::arena_grid, cads::arena_grid::const_view >, cosm::repr::grid2D_view_entity< TGridType, TGridViewType >, cosm::repr::unicell_entity2D

Public Functions

~entity2D(void) override = default
inline rmath::vector2z danchor2D(void) const

Return the anchor (LL corner) of the object in discrete coordinates. This ALWAYS exists, evenif if dcenter2D() does not.

inline rmath::vector2z dcenter2D(void) const

Return the center of the object in discrete coordinates, IF it exists. If the entity X,Y dimensions are both odd, then it exists, otherwise, it does not.

If this function is called on an entity which has no center, an assertion should be triggered.

inline rmath::vector2z ddims2D(void) const
inline virtual entity_dimensionality dimensionality(void) const final override

Return whether the entity is 2D or 3D.

inline rmath::vector2d ranchor2D(void) const

Return the anchor (LL corner) of the object in real coordinates.

inline rmath::vector2d rcenter2D(void) const

Return the 2D center of the object in real coordinates. This ALWAYS exists, even if the dcenter2D() does not.

inline rmath::vector2d rdims2D(void) const