Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::Tessellator::VertexGenerator Class Referenceabstract

An object which produces a list of vertices as |Point|s that tessellate a previously provided shape and delivers the vertices through a |TessellatedVertexProc| callback. More...

#include <tessellator.h>

Inheritance diagram for impeller::Tessellator::VertexGenerator:
impeller::Tessellator::EllipticalVertexGenerator

Public Member Functions

virtual PrimitiveType GetTriangleType () const =0
 Returns the |PrimitiveType| that describes the relationship among the list of vertices produced by the |GenerateVertices| method.
 
virtual size_t GetVertexCount () const =0
 Returns the number of vertices that the generator plans to produce, if known.
 
virtual void GenerateVertices (const TessellatedVertexProc &proc) const =0
 Generate the vertices and deliver them in the necessary order (as required by the PrimitiveType) to the given callback function.
 

Detailed Description

An object which produces a list of vertices as |Point|s that tessellate a previously provided shape and delivers the vertices through a |TessellatedVertexProc| callback.

The object can also provide advance information on how many vertices it will generate.

See also
|TessellatorFilledCircle|
|TessellatorStrokedCircle|
|TessellatorRoundCapLine|
|TessellatorFilledEllipse|

Definition at line 89 of file tessellator.h.

Member Function Documentation

◆ GenerateVertices()

virtual void impeller::Tessellator::VertexGenerator::GenerateVertices ( const TessellatedVertexProc proc) const
pure virtual

Generate the vertices and deliver them in the necessary order (as required by the PrimitiveType) to the given callback function.

Implemented in impeller::Tessellator::EllipticalVertexGenerator.

◆ GetTriangleType()

virtual PrimitiveType impeller::Tessellator::VertexGenerator::GetTriangleType ( ) const
pure virtual

Returns the |PrimitiveType| that describes the relationship among the list of vertices produced by the |GenerateVertices| method.

Most generators will deliver |kTriangleStrip| triangles

Implemented in impeller::Tessellator::EllipticalVertexGenerator.

◆ GetVertexCount()

virtual size_t impeller::Tessellator::VertexGenerator::GetVertexCount ( ) const
pure virtual

Returns the number of vertices that the generator plans to produce, if known.

This value is advisory only and can be used to reserve space where the vertices will be placed, but the count may be an estimate.

Implementations are encouraged to avoid overestimating the count by too large a number and to provide a best guess so as to minimize potential buffer reallocations as the vertices are delivered.

Implemented in impeller::Tessellator::EllipticalVertexGenerator.


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