Gamp v0.0.7-54-gccdc599
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Gamp Graph Implementation Detail

Gamp Graph Implementation Detail. More...

Classes

class  gamp::graph::tess::impl::CDTriangulator2D
 Constrained Delaunay Triangulation implementation of a list of Outlines that define a set of Closed Regions with optional n holes. More...
 
class  gamp::graph::tess::impl::GraphOutline
 
class  gamp::graph::tess::impl::GraphVertex
 
class  gamp::graph::tess::impl::HEdge
 
class  gamp::graph::tess::impl::Loop
 

Typedefs

typedef std::shared_ptr< GraphOutlinegamp::graph::tess::impl::GraphOutlineRef
 
typedef jau::darray< GraphOutlineRef, uint32_t > gamp::graph::tess::impl::GraphOutlineRefList
 
typedef std::shared_ptr< GraphVertexgamp::graph::tess::impl::GraphVertexRef
 
typedef std::vector< GraphVertexRefgamp::graph::tess::impl::GraphVertexRefList
 
typedef HEdgegamp::graph::tess::impl::HEdgePtr
 <Unique HEdge reference (pointer) w/ ownership, help at caller site
 
typedef std::vector< HEdgePtrgamp::graph::tess::impl::HEdgePtrList
 <Plain naked HEdge pointer w/o ownership for simplification and efficiency
 
typedef std::unique_ptr< HEdgegamp::graph::tess::impl::HEdgeRef
 
typedef std::shared_ptr< Loopgamp::graph::tess::impl::LoopRef
 
typedef std::vector< LoopRefgamp::graph::tess::impl::LoopRefList
 

Functions

constexpr double gamp::graph::impl::area2D (const VertexList &vertices) noexcept
 Computes the area of a list of vertices via shoelace formula.
 
constexpr Winding gamp::graph::impl::getWinding (const VertexList &vertices) noexcept
 Compute the winding using the area2D() function over all vertices for complex shapes.
 
static constexpr bool gamp::graph::impl::isConvex1 (const VertexList &polyline, bool shortIsConvex) noexcept
 Returns whether the given on-curve polyline points denotes a convex shape with O(n) complexity.
 
constexpr bool gamp::graph::impl::testTri2SegIntersection2D (const Vertex &a, const Vertex &b, const Vertex &c, const Vertex &d, const Vertex &e)
 Check if a segment intersects with a triangle using FloatUtil#EPSILON w/o considering collinear-case.
 
bool gamp::graph::tess::impl::HEdge::vertexOnCurveVertex () const noexcept
 

Detailed Description

Gamp Graph Implementation Detail.

Typedef Documentation

◆ GraphOutlineRef

Definition at line 38 of file GraphOutline.hpp.

◆ GraphOutlineRefList

◆ GraphVertexRef

Definition at line 38 of file HEdge.hpp.

◆ GraphVertexRefList

Definition at line 39 of file HEdge.hpp.

◆ HEdgeRef

typedef std::unique_ptr<HEdge> gamp::graph::tess::impl::HEdgeRef

Definition at line 42 of file HEdge.hpp.

◆ HEdgePtr

<Unique HEdge reference (pointer) w/ ownership, help at caller site

Definition at line 43 of file HEdge.hpp.

◆ HEdgePtrList

<Plain naked HEdge pointer w/o ownership for simplification and efficiency

Definition at line 44 of file HEdge.hpp.

◆ LoopRef

typedef std::shared_ptr<Loop> gamp::graph::tess::impl::LoopRef

Definition at line 43 of file Loop.hpp.

◆ LoopRefList

Definition at line 44 of file Loop.hpp.

Function Documentation

◆ area2D()

double gamp::graph::impl::area2D ( const VertexList & vertices)
constexprnoexcept

Computes the area of a list of vertices via shoelace formula.

This method is utilized e.g. to reliably compute the Winding of complex shapes.

Implementation uses double precision.

Parameters
vertices
Returns
positive area if ccw else negative area value
See also
getWinding()

Definition at line 50 of file VertexMath.hpp.

Here is the caller graph for this function:

◆ getWinding()

Winding gamp::graph::impl::getWinding ( const VertexList & vertices)
constexprnoexcept

Compute the winding using the area2D() function over all vertices for complex shapes.

Uses the area(List) function over all points on complex shapes for a reliable result!

Implementation uses double precision.

Parameters
verticesarray of Vertices
Returns
Winding::CCW or Winding::CLW
See also
area2D()

Definition at line 73 of file VertexMath.hpp.

◆ isConvex1()

static constexpr bool gamp::graph::impl::isConvex1 ( const VertexList & polyline,
bool shortIsConvex )
staticconstexprnoexcept

Returns whether the given on-curve polyline points denotes a convex shape with O(n) complexity.

See Determine whether a polygon is convex based on its vertices

All off-curve points are ignored.

Parameters
polylineconnected Vert2fImmutable, i.e. a poly-line
shortIsConvexreturn value if vertices have less than three elements, allows simplification

Definition at line 88 of file VertexMath.hpp.

◆ testTri2SegIntersection2D()

bool gamp::graph::impl::testTri2SegIntersection2D ( const Vertex & a,
const Vertex & b,
const Vertex & c,
const Vertex & d,
const Vertex & e )
constexpr

Check if a segment intersects with a triangle using FloatUtil#EPSILON w/o considering collinear-case.

Implementation uses float precision.

Parameters
avertex 1 of the triangle
bvertex 2 of the triangle
cvertex 3 of the triangle
dvertex 1 of first segment
evertex 2 of first segment
Returns
true if the segment intersects at least one segment of the triangle, false otherwise
See also
#testSeg2SegIntersection(Vert2fImmutable, Vert2fImmutable, Vert2fImmutable, Vert2fImmutable, float, boolean)

Definition at line 232 of file VertexMath.hpp.

◆ vertexOnCurveVertex()

bool gamp::graph::tess::impl::HEdge::vertexOnCurveVertex ( ) const
inlinenoexcept

Definition at line 102 of file GraphVertex.hpp.

Here is the caller graph for this function: