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

#include <GrTriangulator.h>

Public Member Functions

 VertexList ()
 
 VertexList (Vertex *head, Vertex *tail)
 
void insert (Vertex *v, Vertex *prev, Vertex *next)
 
void append (Vertex *v)
 
void append (const VertexList &list)
 
void prepend (Vertex *v)
 
void remove (Vertex *v)
 
void close ()
 

Public Attributes

VertexfHead
 
VertexfTail
 

Detailed Description

Definition at line 325 of file GrTriangulator.h.

Constructor & Destructor Documentation

◆ VertexList() [1/2]

GrTriangulator::VertexList::VertexList ( )
inline

Definition at line 326 of file GrTriangulator.h.

326: fHead(nullptr), fTail(nullptr) {}

◆ VertexList() [2/2]

GrTriangulator::VertexList::VertexList ( Vertex head,
Vertex tail 
)
inline

Member Function Documentation

◆ append() [1/2]

void GrTriangulator::VertexList::append ( const VertexList list)
inline

Definition at line 332 of file GrTriangulator.h.

332 {
333 if (!list.fHead) {
334 return;
335 }
336 if (fTail) {
337 fTail->fNext = list.fHead;
338 list.fHead->fPrev = fTail;
339 } else {
340 fHead = list.fHead;
341 }
342 fTail = list.fTail;
343 }

◆ append() [2/2]

void GrTriangulator::VertexList::append ( Vertex v)
inline

Definition at line 331 of file GrTriangulator.h.

331{ insert(v, fTail, nullptr); }
void insert(Vertex *v, Vertex *prev, Vertex *next)

◆ close()

void GrTriangulator::VertexList::close ( )
inline

Definition at line 346 of file GrTriangulator.h.

346 {
347 if (fHead && fTail) {
348 fTail->fNext = fHead;
349 fHead->fPrev = fTail;
350 }
351 }

◆ insert()

void GrTriangulator::VertexList::insert ( Vertex v,
Vertex prev,
Vertex next 
)

Definition at line 128 of file GrTriangulator.cpp.

128 {
129 list_insert<Vertex, &Vertex::fPrev, &Vertex::fNext>(v, prev, next, &fHead, &fTail);
130}
static float next(float f)
static float prev(float f)

◆ prepend()

void GrTriangulator::VertexList::prepend ( Vertex v)
inline

Definition at line 344 of file GrTriangulator.h.

344{ insert(v, nullptr, fHead); }

◆ remove()

void GrTriangulator::VertexList::remove ( Vertex v)

Definition at line 132 of file GrTriangulator.cpp.

132 {
133 list_remove<Vertex, &Vertex::fPrev, &Vertex::fNext>(v, &fHead, &fTail);
134}

Member Data Documentation

◆ fHead

Vertex* GrTriangulator::VertexList::fHead

Definition at line 328 of file GrTriangulator.h.

◆ fTail

Vertex* GrTriangulator::VertexList::fTail

Definition at line 329 of file GrTriangulator.h.


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