feisty meow concerns codebase
2.140
|
#include <warper.h>
Public Types | |
enum | origin_vertex { BOTTOM_LEFT , TOP_LEFT , TOP_RIGHT , BOTTOM_RIGHT } |
describes where a rectangle's origin is located on the rectangle. More... | |
enum | vertical_component { RW_BOTTOM , RW_TOP } |
enum | horizontal_component { RW_LEFT , RW_RIGHT } |
Public Member Functions | |
rectangle_warper (const rectangle< numeric_type > &system_1, const rectangle< numeric_type > &system_2, origin_vertex system_1_origin=BOTTOM_LEFT, origin_vertex system_2_origin=BOTTOM_LEFT) | |
constructs a warper given the two reference systems. More... | |
~rectangle_warper () | |
point< numeric_type > | to_system_1 (const point< numeric_type > &in_system_2) const |
Converts from the second system into the first. More... | |
point< numeric_type > | to_system_2 (const point< numeric_type > &in_system_1) const |
Converts from the first system into the second. More... | |
rectangle< numeric_type > | to_system_1 (const rectangle< numeric_type > &in_system_2) const |
flips a rectangle from the second system into the first. More... | |
rectangle< numeric_type > | to_system_2 (const rectangle< numeric_type > &in_system_1) const |
flips a rectangle from the first system into the second. More... | |
rectangle< numeric_type > | system_1 () const |
rectangle< numeric_type > | system_2 () const |
origin_vertex | origin_1 () const |
origin_vertex | origin_2 () const |
void | system_1 (const rectangle< numeric_type > &to_set, origin_vertex origin_corner=BOTTOM_LEFT) |
void | system_2 (const rectangle< numeric_type > &to_set, origin_vertex origin_corner=BOTTOM_LEFT) |
basis::astring | text_form () const |
Prints out the two systems held in the rectangle_warper. More... | |
basis::astring | vertex_name (origin_vertex v) const |
Prints out the name of the vertex location. More... | |
void | separate_vertical (origin_vertex v, vertical_component &to_set) const |
void | separate_horizontal (origin_vertex v, horizontal_component &to_set) const |
separates out a component of the placement of the vertex. More... | |
enum geometric::rectangle_warper::horizontal_component |
enum geometric::rectangle_warper::origin_vertex |
describes where a rectangle's origin is located on the rectangle.
our model is to consider the first vertex point of the rectangle as its origin and the second vertex point (diagonally opposite the first point) as its extent. since it may make sense for that first vertex point to be located at any one of the vertices of the rectangle (as in windowing coordinate system conversions), the enumeration below allows any one of the rectangle's vertices to be chosen as its origin.
Enumerator | |
---|---|
BOTTOM_LEFT | |
TOP_LEFT | |
TOP_RIGHT | |
BOTTOM_RIGHT |
enum geometric::rectangle_warper::vertical_component |
geometric::rectangle_warper< numeric_type >::rectangle_warper | ( | const rectangle< numeric_type > & | system_1, |
const rectangle< numeric_type > & | system_2, | ||
origin_vertex | system_1_origin = BOTTOM_LEFT , |
||
origin_vertex | system_2_origin = BOTTOM_LEFT |
||
) |
geometric::rectangle_warper< numeric_type >::~rectangle_warper |
|
inline |
|
inline |
void geometric::rectangle_warper< numeric_type >::separate_horizontal | ( | origin_vertex | v, |
horizontal_component & | to_set | ||
) | const |
void geometric::rectangle_warper< numeric_type >::separate_vertical | ( | origin_vertex | v, |
vertical_component & | to_set | ||
) | const |
|
inline |
void geometric::rectangle_warper< numeric_type >::system_1 | ( | const rectangle< numeric_type > & | to_set, |
origin_vertex | origin_corner = BOTTOM_LEFT |
||
) |
|
inline |
void geometric::rectangle_warper< numeric_type >::system_2 | ( | const rectangle< numeric_type > & | to_set, |
origin_vertex | origin_corner = BOTTOM_LEFT |
||
) |
basis::astring geometric::rectangle_warper< numeric_type >::text_form |
Prints out the two systems held in the rectangle_warper.
Definition at line 279 of file warper.h.
References basis::astring::text_form().
point< numeric_type > geometric::rectangle_warper< numeric_type >::to_system_1 | ( | const point< numeric_type > & | in_system_2 | ) | const |
rectangle< numeric_type > geometric::rectangle_warper< numeric_type >::to_system_1 | ( | const rectangle< numeric_type > & | in_system_2 | ) | const |
point< numeric_type > geometric::rectangle_warper< numeric_type >::to_system_2 | ( | const point< numeric_type > & | in_system_1 | ) | const |
rectangle< numeric_type > geometric::rectangle_warper< numeric_type >::to_system_2 | ( | const rectangle< numeric_type > & | in_system_1 | ) | const |
basis::astring geometric::rectangle_warper< numeric_type >::vertex_name | ( | origin_vertex | v | ) | const |