feisty meow concerns codebase
2.140
|
Contains all of our objects for geometry and avoids name clashes. More...
Classes | |
class | angle |
class | double_angle |
double_angle provides a non-templated class for forward declarations. More... | |
class | cartesian_point |
Provides a geometric point that use double floating points numbers. More... | |
class | cartesian_line |
Provides a geometric line that use double floating points numbers. More... | |
class | cartesian_rectangle |
Provides a geometric rectangle that use double floating points numbers. More... | |
class | circle |
Represents a geometric circle. More... | |
class | ellipse |
Represents a geometric ellipse. More... | |
class | line |
Represents a geometric line segment. More... | |
class | point |
Represents a geometric point. More... | |
class | polygon |
class | rectangle |
Represents a geometric rectangle. More... | |
class | screen_point |
a simple class used to describe points on a graphics screen. More... | |
class | screen_rectangle |
Represents a rectangle as interpreted on display screens. More... | |
class | triangle |
Represents a geometric triangle. More... | |
class | rectangle_warper |
Typedefs | |
typedef rectangle< int > | int_rectangle |
< A commonly used rectangle of integers. More... | |
Enumerations | |
enum | angular_units { DEGREES , RADIANS } |
Represents a geometric angle. More... | |
Functions | |
astring | crop_numeric (const basis::astring &input) |
Eats the numeric characters from the front of "input". More... | |
astring | crop_non_numeric (const basis::astring &input) |
Eats the non-numeric characters from the front of "input". More... | |
template<class numeric_type > | |
bool | is_floating_point (numeric_type t) |
returns true if the specified numeric_type is a floating_point type. More... | |
template<class numeric_type > | |
bool | is_integral (numeric_type t) |
returns true if the instantiation type is an integer. More... | |
template<class numeric_type > | |
bool | is_short (numeric_type) |
returns true if the specified type is short on the PC. More... | |
template<class numeric_type > | |
bool | is_unsigned (numeric_type t) |
returns true if the templated type is unsigned. More... | |
template<class numeric_type > | |
bool | is_signed (numeric_type t) |
returns true if the templated type is signed. More... | |
template<class numeric_type > | |
basis::astring | numeric_specifier (numeric_type t) |
Guesses the formatting string needed for the type provided. More... | |
const screen_point & | screen_origin () |
the origin of the screen coordinate system (which is top-left here). More... | |
Contains all of our objects for geometry and avoids name clashes.
Warps points in one frame of reference to a different one.
Represents a multi-sided geometric figure made of line segments.
The polygon is a list of points that are assumed to be connected. It will have as many sides as its point count minus one. Thus there is no valid polygon with less than three points. A function that tests whether a point is inside or outside the polygon is provided.
This class encapsulates the notion of a rectangular region that is referred to from two different points of view. This relates two two-dimensional frames of reference to each other. Each frame of reference is specified by two rectangles. A point that is measured in one frame of reference can be transformed into a point that is measured in the other, and vice-versa.
typedef rectangle<int> geometric::int_rectangle |
< A commonly used rectangle of integers.
Definition at line 132 of file rectangle.h.
basis::astring geometric::crop_non_numeric | ( | const astring & | input | ) |
Eats the non-numeric characters from the front of "input".
Definition at line 37 of file math_bits.cpp.
References basis::astring::length(), and basis::astring::zap().
Referenced by geometric::point< numeric_type >::from_text(), and geometric::rectangle< numeric_type >::from_text().
basis::astring geometric::crop_numeric | ( | const basis::astring & | input | ) |
Eats the numeric characters from the front of "input".
This and crop_non_numeric() return a string that is constructed from "input" by chopping the numerical (or non-numerical) characters off of the beginning. The types of numbers supported are floating point, but it will generally work for integers also (problems arise when mixing in the period, e, E, +, and - characters with integer numbers).
Definition at line 23 of file math_bits.cpp.
References basis::astring::length(), and basis::astring::zap().
Referenced by geometric::point< numeric_type >::from_text(), and geometric::rectangle< numeric_type >::from_text().
bool geometric::is_floating_point | ( | numeric_type | t | ) |
returns true if the specified numeric_type is a floating_point type.
this is useful in templates where one wants to know about the templated type.
Definition at line 42 of file math_bits.h.
References basis::absolute_value().
Referenced by is_integral(), and numeric_specifier().
bool geometric::is_integral | ( | numeric_type | t | ) |
returns true if the instantiation type is an integer.
Definition at line 48 of file math_bits.h.
References is_floating_point().
bool geometric::is_short | ( | numeric_type | ) |
returns true if the specified type is short on the PC.
Definition at line 55 of file math_bits.h.
Referenced by numeric_specifier().
bool geometric::is_signed | ( | numeric_type | t | ) |
returns true if the templated type is signed.
Definition at line 62 of file math_bits.h.
References is_unsigned().
bool geometric::is_unsigned | ( | numeric_type | t | ) |
returns true if the templated type is unsigned.
Definition at line 59 of file math_bits.h.
Referenced by is_signed(), and numeric_specifier().
basis::astring geometric::numeric_specifier | ( | numeric_type | t | ) |
Guesses the formatting string needed for the type provided.
Returns a string that is appropriate as the format specifier of a printf (or the astring constructor) given the template type. templates can rely on this to print numerical types correctly.
Definition at line 69 of file math_bits.h.
References basis::astring::insert(), is_floating_point(), is_short(), and is_unsigned().
Referenced by geometric::rectangle< numeric_type >::from_text(), and geometric::point< numeric_type >::text_form().
const screen_point& geometric::screen_origin | ( | ) |
the origin of the screen coordinate system (which is top-left here).