1 #ifndef ROGUELIKE_COMPONENT_SHAPE_RECTANGULAR_H_
2 #define ROGUELIKE_COMPONENT_SHAPE_RECTANGULAR_H_
10 #include <ugdk/math/integer2D.h>
30 const ugdk::math::Integer2D&
PlaceAt(
const ugdk::math::Integer2D& destination);
31 const ugdk::math::Integer2D&
Move(
const std::list<ugdk::math::Integer2D>& mov);
32 const ugdk::math::Integer2D&
Step(
const ugdk::math::Integer2D& dir);
34 bool CheckForOob(
const ugdk::math::Integer2D& destination)
const;
37 const ugdk::math::Integer2D
TryStep(
const ugdk::math::Integer2D& dir)
const;
41 const ugdk::math::Integer2D&
dimensions()
const {
return dimensions_; }
44 ugdk::math::Integer2D dimensions_;
45 std::vector<std::set<game::base::GameObject*> > bumps_;
51 #endif // ROGUELIKE_COMPONENT_SHAPE_RECTANGULAR_H_
Definition: gameobject.h:53
double enter_sizeclass() const
Definition: shape.h:40
ShapeRectangular(game::base::GameObject *owner, int size_x=1, int size_y=1, double stay_sizeclass=1.0, double pass_sizeclass=0.25, double enter_sizeclass=1.0e-5)
Definition: shape_rectangular.cc:33
Definition: shape_rectangular.h:21
void EvalBumpsAt(const ugdk::math::Integer2D &destination, game::base::GameObject *ignore=0) const
Definition: shape_rectangular.cc:163
double pass_sizeclass() const
Definition: shape.h:39
bool CheckForOob(const ugdk::math::Integer2D &destination) const
Definition: shape_rectangular.cc:151
const ugdk::math::Integer2D TryStep(const ugdk::math::Integer2D &dir) const
Definition: shape_rectangular.cc:131
const ugdk::math::Integer2D & dimensions() const
Definition: shape_rectangular.h:41
Definition: componentbase.h:19
const ugdk::math::Integer2D & PlaceAt(const ugdk::math::Integer2D &destination)
Definition: shape_rectangular.cc:47
bool TryPlace(const ugdk::math::Integer2D &destination, game::base::GameObject *ignore=0) const
Definition: shape_rectangular.cc:115
const ugdk::math::Integer2D & Step(const ugdk::math::Integer2D &dir)
Definition: shape_rectangular.cc:101
~ShapeRectangular()
Definition: shape_rectangular.cc:43
const ugdk::math::Integer2D & Move(const std::list< ugdk::math::Integer2D > &mov)
Definition: shape_rectangular.cc:85
double stay_sizeclass() const
Definition: shape.h:38