Program Listing for File unicell_movable_entity2D.hpp

Return to documentation for file (cosm/repr/unicell_movable_entity2D.hpp)

#pragma once

/*******************************************************************************
 * Includes
 ******************************************************************************/
#include "rcppsw/math/vector2.hpp"

#include "cosm/cosm.hpp"
#include "cosm/repr/unicell_entity2D.hpp"

/*******************************************************************************
 * Namespaces
 ******************************************************************************/
namespace cosm::repr {

/*******************************************************************************
 * Class Definitions
 ******************************************************************************/
class unicell_movable_entity2D : public unicell_entity2D {
 public:
  using unicell_entity2D::danchor2D;
  using unicell_entity2D::ranchor2D;
  using unicell_entity2D::unicell_entity2D;

  static constexpr bool is_movable(void) { return true; }

  ~unicell_movable_entity2D(void) override = default;

  void ranchor2D(const rmath::vector2d& anchor) {
    unicell_entity2D::ranchor2D<unicell_movable_entity2D>(anchor);
  }
  void danchor2D(const rmath::vector2z& anchor) {
    unicell_entity2D::danchor2D<unicell_movable_entity2D>(anchor);
  }
};

} /* namespace cosm::repr */