| Flutter Impeller |

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:

## 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. More...
virtual size_t | GetVertexCount () const =0
| Returns the number of vertices that the generator plans to produce, if known. More...
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. More...

## 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
  |Tessellator::FilledCircle|
  |Tessellator::StrokedCircle|
  |Tessellator::RoundCapLine|
  |Tessellator::FilledEllipse|

Definition at line 91 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.

Referenced by impeller::Geometry::ComputePositionGeometry().

## ◆ 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.

Referenced by impeller::Geometry::ComputePositionGeometry().

## ◆ 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.

Referenced by impeller::Geometry::ComputePositionGeometry().

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

- impeller/tessellator/tessellator.h