recti namespace
Classes
- class halton
- Halton sequence generator.
-
template<typename T>struct HSegment
- Horizontal Line Segment.
-
template<typename T = int>class Interval
- Interval.
-
template<typename T1 = int, typename T2 = T1>class MergeObj
- Merging Object (for deferred-merge embedding (DME) algorithm)
-
template<typename T1 = int, typename T2 = T1>class Point
- Point.
-
template<typename T>class Polygon
- Polygon.
-
template<typename T>struct Rectangle
- Rectangle (Rectilinear)
- class Recti
- A class for saying hello in multiple languages.
-
template<typename T>class RPolygon
- Rectilinear Polygon.
- class Vdcorput
- van der Corput sequence generator
-
template<typename T1, typename T2 = T1>class Vector2
- vector2
-
template<typename T>struct VSegment
- Vertical Line Segment.
Enums
- enum class LanguageCode { EN, DE, ES, FR }
Functions
-
template<typename U1, typename U2>auto overlap(const U1& lhs, const U2& rhs) -> bool -> auto constexpr
- overlap
-
template<typename U1, typename U2>auto contain(const U1& lhs, const U2& rhs) -> bool -> auto constexpr
- contain
-
template<typename U1, typename U2>auto intersection(const U1& lhs, const U2& rhs) -> auto constexpr
- intersection
-
template<typename U1, typename U2>auto min_dist(const U1& lhs, const U2& rhs) -> auto constexpr
- min_dist
-
template<typename U1, typename U2>auto min_dist_change(U1& lhs, U2& rhs) -> auto constexpr
- min_dist with change
- auto vdc(unsigned num, unsigned base = 2, unsigned scale = 10) noexcept -> unsigned -> auto
- van der Corput sequence
-
template<typename U1, typename U2>auto enlarge(const U1& lhs, const U2& rhs) -> auto constexpr
-
template<class Stream, typename T>auto operator<<(Stream& out, const Polygon<T>& poly) -> Stream & -> auto
-
template<typename FwIter, typename Compare>void create_mono_polygon(FwIter&& first, FwIter&& last, Compare&& dir)
- Create a mono Polygon object.
-
template<typename FwIter>auto create_xmono_polygon(FwIter&& first, FwIter&& last) -> void -> auto
- Create a xmono Polygon object.
-
template<typename FwIter>auto create_ymono_polygon(FwIter&& first, FwIter&& last) -> void -> auto
- Create a ymono Polygon object.
-
template<typename T>auto point_in_polygon(gsl::span<const Point<T>> pointset, const Point<T>& ptq) -> bool -> auto
- determine if a Point is within a Polygon
-
template<typename T>auto polygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool -> auto
- Polygon is clockwise.
-
template<typename FwIter, typename KeyFn>auto create_mono_rpolygon(FwIter&& first, FwIter&& last, KeyFn&& dir) -> bool -> auto
- Create a xmono RPolygon object.
-
template<typename FwIter>auto create_xmono_rpolygon(FwIter&& first, FwIter&& last) -> bool -> auto
- Create a xmono RPolygon object.
-
template<typename FwIter>auto create_ymono_rpolygon(FwIter&& first, FwIter&& last) -> bool -> auto
- Create a ymono RPolygon object.
-
template<typename FwIter>void create_test_rpolygon(FwIter&& first, FwIter&& last)
-
template<typename T>auto point_in_rpolygon(gsl::span<const Point<T>> pointset, const Point<T>& ptq) -> bool -> auto
- determine if a Point is within a Polygon
-
template<typename T>auto rpolygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool -> auto
- Polygon is clockwise.
Enum documentation
enum class recti:: LanguageCode
#include <recti/greeter.h>
Language codes to be used with the Recti class
Function documentation
#include <recti/generic.hpp>
template<typename U1, typename U2>
auto recti:: overlap(const U1& lhs,
const U2& rhs) -> bool constexpr
overlap
Template parameters | |
---|---|
U1 | |
U2 | |
Parameters | |
lhs in | |
rhs in | |
Returns | true |
The above code defines a template function called overlap
that takes two arguments lhs
and rhs
. The function checks if the two arguments overlap with each other.
.---------------------. | | | .--------+-------. | | | | `------------+--------' | | | `----------------'
#include <recti/generic.hpp>
template<typename U1, typename U2>
auto recti:: contain(const U1& lhs,
const U2& rhs) -> bool constexpr
contain
Template parameters | |
---|---|
U1 | |
U2 | |
Parameters | |
lhs in | |
rhs in | |
Returns | true |
The above code is defining a template function called contain
that checks if one object contains another object.
.---------------------. | .--. | | . | ---- | | | | `--' | `---------------------'
#include <recti/generic.hpp>
template<typename U1, typename U2>
auto recti:: intersection(const U1& lhs,
const U2& rhs) constexpr
intersection
Template parameters | |
---|---|
U1 | |
U2 | |
Parameters | |
lhs in | |
rhs in | |
Returns | constexpr auto |
.---------------------. | | | .--------+-------. | | | | `------------+--------' | | | `----------------'
#include <recti/generic.hpp>
template<typename U1, typename U2>
auto recti:: min_dist(const U1& lhs,
const U2& rhs) constexpr
min_dist
Template parameters | |
---|---|
U1 | |
U2 | |
Parameters | |
lhs in | |
rhs in | |
Returns | constexpr auto |
.-----------. | | | |~~~~~.-------------. | | | | `-----------' | | | | `-------------'
#include <recti/generic.hpp>
template<typename U1, typename U2>
auto recti:: min_dist_change(U1& lhs,
U2& rhs) constexpr
min_dist with change
Template parameters | |
---|---|
U1 | |
U2 | |
Parameters | |
lhs in | |
rhs in | |
Returns | constexpr auto |
auto recti:: vdc(unsigned num,
unsigned base = 2,
unsigned scale = 10) noexcept -> unsigned
#include <recti/halton_int.hpp>
van der Corput sequence
Parameters | |
---|---|
num | |
base in | |
scale in | |
Returns | unsigned |
#include <recti/interval.hpp>
template<typename U1, typename U2>
auto recti:: enlarge(const U1& lhs,
const U2& rhs) constexpr
The above code is defining a template function called enlarge
. This function takes two parameters, lhs
and rhs
, of any type U1
and U2
respectively.
#include <recti/polygon.hpp>
template<class Stream, typename T>
auto recti:: operator<<(Stream& out,
const Polygon<T>& poly) -> Stream &
Template parameters | |
---|---|
Stream | |
T | |
Parameters | |
out out | |
poly | |
Returns | Stream& |
#include <recti/polygon.hpp>
template<typename FwIter, typename Compare>
void recti:: create_mono_polygon(FwIter&& first,
FwIter&& last,
Compare&& dir)
Create a mono Polygon object.
Template parameters | |
---|---|
FwIter | |
Compare | |
Parameters | |
first in | |
last in | |
dir in |
#include <recti/polygon.hpp>
template<typename FwIter>
auto recti:: create_xmono_polygon(FwIter&& first,
FwIter&& last) -> void
Create a xmono Polygon object.
Template parameters | |
---|---|
FwIter | |
Parameters | |
first in | |
last in |
#include <recti/polygon.hpp>
template<typename FwIter>
auto recti:: create_ymono_polygon(FwIter&& first,
FwIter&& last) -> void
Create a ymono Polygon object.
Template parameters | |
---|---|
FwIter | |
Parameters | |
first in | |
last in |
#include <recti/polygon.hpp>
template<typename T>
auto recti:: point_in_polygon(gsl::span<const Point<T>> pointset,
const Point<T>& ptq) -> bool
determine if a Point is within a Polygon
Template parameters | |
---|---|
T | |
Returns | true |
The code below is from Wm. Randolph Franklin wrf@ecse.rpi.edu (see URL below) with some minor modifications for integer. It returns true for strictly interior points, false for strictly exterior, and ub for points on the boundary. The boundary behavior is complex but determined; in particular, for a partition of a region into polygons, each Point is "in" exactly one Polygon. (See p.243 of [O'Rourke (C)] for a discussion of boundary behavior.)
See http:/
#include <recti/polygon.hpp>
template<typename T>
auto recti:: polygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool
Polygon is clockwise.
Template parameters | |
---|---|
T | |
Returns | true |
#include <recti/rpolygon.hpp>
template<typename FwIter, typename KeyFn>
auto recti:: create_mono_rpolygon(FwIter&& first,
FwIter&& last,
KeyFn&& dir) -> bool
Create a xmono RPolygon object.
Template parameters | |
---|---|
FwIter | |
KeyFn | |
Parameters | |
first in | |
last in | |
dir | |
Returns | true |
#include <recti/rpolygon.hpp>
template<typename FwIter>
auto recti:: create_xmono_rpolygon(FwIter&& first,
FwIter&& last) -> bool
Create a xmono RPolygon object.
Template parameters | |
---|---|
FwIter | |
Parameters | |
first in | |
last in | |
Returns | true |
#include <recti/rpolygon.hpp>
template<typename FwIter>
auto recti:: create_ymono_rpolygon(FwIter&& first,
FwIter&& last) -> bool
Create a ymono RPolygon object.
Template parameters | |
---|---|
FwIter | |
Parameters | |
first in | |
last in | |
Returns | true |
#include <recti/rpolygon.hpp>
template<typename FwIter>
void recti:: create_test_rpolygon(FwIter&& first,
FwIter&& last)
Template parameters | |
---|---|
FwIter | |
Parameters | |
first in | |
last in |
#include <recti/rpolygon.hpp>
template<typename T>
auto recti:: point_in_rpolygon(gsl::span<const Point<T>> pointset,
const Point<T>& ptq) -> bool
determine if a Point is within a Polygon
Template parameters | |
---|---|
T | |
Parameters | |
pointset in | |
ptq in | |
Returns | true |
The code below is from Wm. Randolph Franklin wrf@ecse.rpi.edu (see URL below) with some minor modifications for rectilinear. It returns true for strictly interior points, false for strictly exterior, and ub for points on the boundary. The boundary behavior is complex but determined; in particular, for a partition of a region into polygons, each Point is "in" exactly one Polygon. (See p.243 of [O'Rourke (C)] for a discussion of boundary behavior.)
See http:/
#include <recti/rpolygon.hpp>
template<typename T>
auto recti:: rpolygon_is_clockwise(gsl::span<const Point<T>> pointset) -> bool
Polygon is clockwise.
Template parameters | |
---|---|
T | |
Parameters | |
pointset in | |
Returns | true |