Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
GrTriangulator::Vertex Struct Reference

#include <GrTriangulator.h>

Public Member Functions

 Vertex (const SkPoint &point, uint8_t alpha)
 
bool isConnected () const
 

Public Attributes

SkPoint fPoint
 
VertexfPrev
 
VertexfNext
 
EdgefFirstEdgeAbove
 
EdgefLastEdgeAbove
 
EdgefFirstEdgeBelow
 
EdgefLastEdgeBelow
 
EdgefLeftEnclosingEdge
 
EdgefRightEnclosingEdge
 
VertexfPartner
 
uint8_t fAlpha
 
bool fSynthetic
 

Detailed Description

Vertices are used in three ways: first, the path contours are converted into a circularly-linked list of Vertices for each contour. After edge construction, the same Vertices are re-ordered by the merge sort according to the sweep_lt comparator (usually, increasing in Y) using the same fPrev/fNext pointers that were used for the contours, to avoid reallocation. Finally, MonotonePolys are built containing a circularly-linked list of Vertices. (Currently, those Vertices are newly-allocated for the MonotonePolys, since an individual Vertex from the path mesh may belong to multiple MonotonePolys, so the original Vertices cannot be re-used.

Definition at line 294 of file GrTriangulator.h.

Constructor & Destructor Documentation

◆ Vertex()

GrTriangulator::Vertex::Vertex ( const SkPoint point,
uint8_t  alpha 
)
inline

Definition at line 295 of file GrTriangulator.h.

296 : fPoint(point), fPrev(nullptr), fNext(nullptr)
297 , fFirstEdgeAbove(nullptr), fLastEdgeAbove(nullptr)
298 , fFirstEdgeBelow(nullptr), fLastEdgeBelow(nullptr)
299 , fLeftEnclosingEdge(nullptr), fRightEnclosingEdge(nullptr)
300 , fPartner(nullptr)
301 , fAlpha(alpha)
302 , fSynthetic(false)
303#if TRIANGULATOR_LOGGING
304 , fID (-1.0f)
305#endif
306 {}

Member Function Documentation

◆ isConnected()

bool GrTriangulator::Vertex::isConnected ( ) const
inline

Definition at line 322 of file GrTriangulator.h.

322{ return this->fFirstEdgeAbove || this->fFirstEdgeBelow; }

Member Data Documentation

◆ fAlpha

uint8_t GrTriangulator::Vertex::fAlpha

Definition at line 317 of file GrTriangulator.h.

◆ fFirstEdgeAbove

Edge* GrTriangulator::Vertex::fFirstEdgeAbove

Definition at line 310 of file GrTriangulator.h.

◆ fFirstEdgeBelow

Edge* GrTriangulator::Vertex::fFirstEdgeBelow

Definition at line 312 of file GrTriangulator.h.

◆ fLastEdgeAbove

Edge* GrTriangulator::Vertex::fLastEdgeAbove

Definition at line 311 of file GrTriangulator.h.

◆ fLastEdgeBelow

Edge* GrTriangulator::Vertex::fLastEdgeBelow

Definition at line 313 of file GrTriangulator.h.

◆ fLeftEnclosingEdge

Edge* GrTriangulator::Vertex::fLeftEnclosingEdge

Definition at line 314 of file GrTriangulator.h.

◆ fNext

Vertex* GrTriangulator::Vertex::fNext

Definition at line 309 of file GrTriangulator.h.

◆ fPartner

Vertex* GrTriangulator::Vertex::fPartner

Definition at line 316 of file GrTriangulator.h.

◆ fPoint

SkPoint GrTriangulator::Vertex::fPoint

Definition at line 307 of file GrTriangulator.h.

◆ fPrev

Vertex* GrTriangulator::Vertex::fPrev

Definition at line 308 of file GrTriangulator.h.

◆ fRightEnclosingEdge

Edge* GrTriangulator::Vertex::fRightEnclosingEdge

Definition at line 315 of file GrTriangulator.h.

◆ fSynthetic

bool GrTriangulator::Vertex::fSynthetic

Definition at line 318 of file GrTriangulator.h.


The documentation for this struct was generated from the following file: