Program Listing for File entity2D.hpp
↰ Return to documentation for file (cosm/repr/entity2D.hpp
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include "rcppsw/math/vector2.hpp"
#include "cosm/cosm.hpp"
#include "cosm/repr/spatial_entity2D.hpp"
/*******************************************************************************
* Namespaces
******************************************************************************/
namespace cosm::repr {
/*******************************************************************************
* Class Definitions
******************************************************************************/
class entity2D : public spatial_entity2D {
public:
using spatial_entity2D::spatial_entity2D;
~entity2D(void) override = default;
rmath::vector2d ranchor2D(void) const { return rbb().anchor3D().to_2D(); }
rmath::vector2d rcenter2D(void) const { return rbb().center3D().to_2D(); }
rmath::vector2z danchor2D(void) const { return dbb().anchor3D().to_2D(); }
rmath::vector2z dcenter2D(void) const { return dbb().center3D().to_2D(); }
rmath::vector2d rdims2D(void) const { return rbb().dims3D().to_2D(); }
rmath::vector2z ddims2D(void) const { return dbb().dims3D().to_2D(); }
entity_dimensionality dimensionality(void) const override final {
return entity_dimensionality::ek2D;
}
};
} /* namespace cosm::repr */