Limbo
|
namespace for Limbo.Geometry More...
Classes | |
class | container_traits |
type traits for containers such as vector, list, multiset More... | |
struct | container_traits< std::list< T > > |
partial specialization of limbo::geometry::container_traits for commonly used data structures like std::list More... | |
struct | container_traits< std::vector< T > > |
partial specialization of limbo::geometry::container_traits for commonly used data structures like std::vector More... | |
struct | coordinate_traits |
type traits for coordinates More... | |
struct | coordinate_traits< int > |
specialization for default integer type More... | |
class | orientation_2d |
a class denoting orientation of lines More... | |
class | point_compare_type |
sort helper if orient == HORIZONTAL, sort by left lower if orient == VERTICAL, sort by lower left More... | |
class | point_traits |
type traits for point More... | |
struct | point_traits< bLib::bPoint > |
specialization of limbo::geometry::point_traits for bLib::bPoint More... | |
struct | point_traits< boost::polygon::point_data< T > > |
specialization of limbo::geometry::point_traits for boost::polygon::point_data More... | |
struct | point_traits< Point > |
if your point class setting is different from that in the default point_traits, please create a specialization More... | |
class | Polygon2Rectangle |
a class implement conversion from manhattan polygon to rectangle More... | |
class | Polygon2Rectangle< std::vector< PointType >, std::vector< RectangleType > > |
a class implement conversion from manhattan polygon to rectangle More... | |
class | rectangle_traits |
type traits for rectangle More... | |
struct | rectangle_traits< bLib::bBox > |
specialization of limbo::geometry::rectangle_traits for bLib::bBox More... | |
struct | rectangle_traits< boost::polygon::rectangle_data< T > > |
specialization of limbo::geometry::rectangle_traits for boost::polygon::rectangle_data More... | |
struct | rectangle_traits< Rectangle > |
if your rectangle class setting is different from that in the default point_traits, please create a specialization More... | |
Enumerations | |
enum | orientation_2d_enum { HORIZONTAL = 0, VERTICAL = 1 } |
orientation type for lines | |
enum | slicing_orientation_2d { HORIZONTAL_SLICING = 1, VERTICAL_SLICING = 2, HOR_VER_SLICING = 3, HOR_VER_SA_SLICING = 4, HOR_VER_AR_SLICING = 5 } |
orientation type for slicing More... | |
enum | direction_2d { LEFT = 0, BOTTOM = 1, RIGHT = 2, TOP = 3 } |
direction type for rectangles | |
enum | winding_direction { CLOCKWISE = 0, COUNTERCLOCKWISE = 1, UNKNOWN_WINDING = 2 } |
winding direction type CLOCKWISE and COUNTERCLOCKWISE refers to winding direction of a polygon | |
Functions | |
std::string | to_string (slicing_orientation_2d slicing_orient) |
convert enum type of slicing orientation to string More... | |
template<typename PointSet > | |
coordinate_traits< typename point_traits< typename container_traits< PointSet > ::value_type >::area_type > | area (PointSet const &vPoint) |
calculate signed area of a polygon, the result is positive if its winding is CLOCKWISE More... | |
template<typename InputIterator , typename PointSet , typename RectSet > | |
bool | polygon2rectangle (InputIterator input_begin, InputIterator input_end, PointSet const &, RectSet &r, slicing_orientation_2d slicing_orient=HORIZONTAL_SLICING) |
standby function for polygon-to-rectangle conversion More... | |
bool | polygon2RectangleBoost (std::vector< gtl::point_data< int > > const &vPoint, std::vector< gtl::rectangle_data< int > > &vRectangle) |
this function takes a set of points describing a rectilinear polygon and decomposes it into rectangles More... | |
bool | polygon2RectangleBoost (gtl::polygon_90_data< int > const &polygon, std::vector< gtl::rectangle_data< int > > &vRectangle) |
this function takes a rectilinear polygon and decomposes it into rectangles More... | |
namespace for Limbo.Geometry
orientation type for slicing
Definition at line 39 of file Geometry.h.
|
inline |
calculate signed area of a polygon, the result is positive if its winding is CLOCKWISE
PointSet | point set type |
Definition at line 330 of file Geometry.h.
|
inline |
standby function for polygon-to-rectangle conversion
InputIterator | represents the input iterators for points of polygon |
PointSet | represents the internal container for points of polygon, user needs to pass a hint for type deduction |
RectSet | represents the container for rectangles |
input_begin | begin iterator of input |
input_end | end iterator of input |
r | reference to container for rectangles |
slicing_orient | slicing orientations |
Definition at line 698 of file Polygon2Rectangle.h.
bool limbo::geometry::polygon2RectangleBoost | ( | std::vector< gtl::point_data< int > > const & | vPoint, |
std::vector< gtl::rectangle_data< int > > & | vRectangle | ||
) |
this function takes a set of points describing a rectilinear polygon and decomposes it into rectangles
vPoint | a set of points as input |
vRectangle | a set of rectangles as output |
bool limbo::geometry::polygon2RectangleBoost | ( | gtl::polygon_90_data< int > const & | polygon, |
std::vector< gtl::rectangle_data< int > > & | vRectangle | ||
) |
this function takes a rectilinear polygon and decomposes it into rectangles
polygon | rectilinear polygon as input |
vRectangle | a set of rectangles as output |
|
inline |
convert enum type of slicing orientation to string
slicing_orient | slicing orientation |
Definition at line 51 of file Geometry.h.