homog2d library
|
Functions | |
template<typename T > | |
HOMOG2D_INUMTYPE | h2d::area (const T &elem) |
Returns area of element or variant (free function) More... | |
template<typename U , typename T , typename std::enable_if< trait::IsContainer< T >::value, T >::type * = nullptr> | |
void | h2d::draw (img::Image< U > &img, const T &cont, const img::DrawParams &dp=img::DrawParams()) |
Free function, draws a set of primitives. More... | |
template<typename T > | |
Dtype | h2d::dtype (const T &elem) |
Returns the underlying data type of object or variant. More... | |
template<typename T > | |
FRect_< HOMOG2D_INUMTYPE > | h2d::getBB (const T &t) |
Return Bounding Box of primitive or container holding primitives (free function) More... | |
template<typename T > | |
HOMOG2D_INUMTYPE | h2d::length (const T &elem) |
Returns length of element or variant (free function) More... | |
template<typename T > | |
HOMOG2D_INUMTYPE | h2d::size (const T &elem) |
Returns size of element or variant (free function) More... | |
template<typename T , typename FPT > | |
CommonType_< FPT > | h2d::transform (const Homogr_< FPT > &h, const T &elem) |
Apply homography to primitive. More... | |
template<typename T > | |
Type | h2d::type (const T &elem) |
Free function. Returns the type of object or variant. More... | |
defgroup
These function can be used on a "regular" geometric object or on a CommonType
object, holding a std::variant and allowing run-time polymorphism,
See md_docs_homog2d_manual.html::section_rtp
HOMOG2D_INUMTYPE h2d::area | ( | const T & | elem | ) |
void h2d::draw | ( | img::Image< U > & | img, |
const T & | cont, | ||
const img::DrawParams & | dp = img::DrawParams() |
||
) |
Free function, draws a set of primitives.
T
can be std::array<type>
or std::vector<type>
, with type
being anything drawable.h2d
types (FRect
, Segment
, ...) of variant types, using the CommonType
class (requires HOMOG2D_ENABLE_VRTP symbol). Dtype h2d::dtype | ( | const T & | elem | ) |
Returns the underlying data type of object or variant.
Can be printed with getString()
FRect_<HOMOG2D_INUMTYPE> h2d::getBB | ( | const T & | t | ) |
Return Bounding Box of primitive or container holding primitives (free function)
tests: [BB-cont]
HOMOG2D_INUMTYPE h2d::length | ( | const T & | elem | ) |
HOMOG2D_INUMTYPE h2d::size | ( | const T & | elem | ) |
CommonType_<FPT> h2d::transform | ( | const Homogr_< FPT > & | h, |
const T & | elem | ||
) |
Apply homography to primitive.
h
, NOT the one of the input element. Type h2d::type | ( | const T & | elem | ) |
Free function. Returns the type of object or variant.
Can be printed with getString()