30 #ifndef KJB_RECTANGLE_2D_H
31 #define KJB_RECTANGLE_2D_H
52 double orientation = 0.0,
57 m_orientation(orientation),
102 m_orientation = orientation;
139 double m_orientation;
double get_orientation() const
Returns the orientation of this rectangle.
Definition: gr_rectangle_2d.h:69
void set_height(double height)
sets the height of this rectangle.
Definition: gr_rectangle_2d.h:112
Definition for the Matrix class, a thin wrapper on the KJB Matrix struct and its related functionalit...
std::vector< Vector > get_corners() const
Returns the corners of this rectangle.
Definition: gr_rectangle_2d.cpp:7
double get_height() const
returns the height of this rectangle.
Definition: gr_rectangle_2d.h:81
void set_width(double width)
sets the width of this rectangle.
Definition: gr_rectangle_2d.h:106
height
Definition: APPgetLargeConnectedEdges.m:33
void rotate(double angle)
Definition: gr_rectangle_2d.h:126
This class implements vectors, in the linear-algebra sense, with real-valued elements.
Definition: m_vector.h:87
std::vector< Vector > get_side_midpoints() const
Returns the midpoints of the sides of this rectangle.
Definition: gr_rectangle_2d.cpp:24
Rectangle_2d(const Vector ¢er=Vector().set(0.0, 0.0), double orientation=0.0, double width=1.0, double height=1.0)
Constructs a Rectangle_2d.
Definition: gr_rectangle_2d.h:50
const Vector & get_center() const
returns the center of this rectangle.
Definition: gr_rectangle_2d.h:63
double get_width() const
returns the width of this rectangle.
Definition: gr_rectangle_2d.h:75
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center...
Definition: gr_rectangle_2d.h:45
void set_orientation(double orientation)
Sets the orientation of this rectangle.
Definition: gr_rectangle_2d.h:99
Definition for the Vector class, a thin wrapper on the KJB Vector struct and its related functionalit...
void wire_render() const
Definition: gr_rectangle_2d.cpp:41
void set_center(const Vector ¢er)
sets the center of this rectangle.
Definition: gr_rectangle_2d.h:93
void translate(const Vector &t)
Definition: gr_rectangle_2d.h:121