Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center, its width and its height.
More...
#include <gr_rectangle_2d.h>
Class that represents an axis-aligned 2D rectangle. It is defined in terms of its (2D) center, its width and its height.
kjb::Rectangle_2d::Rectangle_2d |
( |
const Vector & |
center = Vector().set(0.0, 0.0) , |
|
|
double |
orientation = 0.0 , |
|
|
double |
width = 1.0 , |
|
|
double |
height = 1.0 |
|
) |
| |
|
inline |
const Vector& kjb::Rectangle_2d::get_center |
( |
| ) |
const |
|
inline |
returns the center of this rectangle.
std::vector< Vector > kjb::Rectangle_2d::get_corners |
( |
| ) |
const |
Returns the corners of this rectangle.
double kjb::Rectangle_2d::get_height |
( |
| ) |
const |
|
inline |
returns the height of this rectangle.
double kjb::Rectangle_2d::get_orientation |
( |
| ) |
const |
|
inline |
Returns the orientation of this rectangle.
std::vector< Vector > kjb::Rectangle_2d::get_side_midpoints |
( |
| ) |
const |
Returns the midpoints of the sides of this rectangle.
double kjb::Rectangle_2d::get_width |
( |
| ) |
const |
|
inline |
returns the width of this rectangle.
void kjb::Rectangle_2d::rotate |
( |
double |
angle | ) |
|
|
inline |
void kjb::Rectangle_2d::set_center |
( |
const Vector & |
center | ) |
|
|
inline |
sets the center of this rectangle.
void kjb::Rectangle_2d::set_height |
( |
double |
height | ) |
|
|
inline |
sets the height of this rectangle.
void kjb::Rectangle_2d::set_orientation |
( |
double |
orientation | ) |
|
|
inline |
Sets the orientation of this rectangle.
void kjb::Rectangle_2d::set_width |
( |
double |
width | ) |
|
|
inline |
sets the width of this rectangle.
void kjb::Rectangle_2d::translate |
( |
const Vector & |
t | ) |
|
|
inline |
void kjb::Rectangle_2d::wire_render |
( |
| ) |
const |
The documentation for this class was generated from the following files: