right_rectangle.hpp
Go to the documentation of this file.
1 
6 #ifndef RECTANGLE_HPP
7 #define RECTANGLE_HPP 1
8 
9 #include "shape_2d.hpp"
10 
11 using std::pair;
12 
14 class RightRectangle: public Shape2D
15 {
16 public:
17 
22  RightRectangle(const Vector2D& lower_left,
23  const Vector2D& upper_right);
24 
28  explicit RightRectangle(const pair<Vector2D,Vector2D>& ll_ur);
29 
30  bool operator()(const Vector2D& point) const;
31 
32 private:
33  const Vector2D lower_left_;
34  const Vector2D upper_right_;
35 };
36 
37 #endif // RECTANGLE_HPP
RightRectangle(const Vector2D &lower_left, const Vector2D &upper_right)
Class constructor.
Two dimensional shapes.
A rectangle aligned with the primary axis (x and y)
2D Mathematical vector
Definition: geometry.hpp:15
Abstract type for a two dimensional shape.
Definition: shape_2d.hpp:12
bool operator()(const Vector2D &point) const
Returns true is a point is inside the shape, false otherwise.