Gouraud mesh colour gradient paint server.
GradientGouraud interpolates colour barycentrically across a caller-supplied mesh of coloured triangles. The mesh is defined by Vertices and optional Indices.
The inherited colour-ramp fields Stops, ColourMap, SpreadMethod and Colour are not supported by this class. Per-vertex colour values are supplied directly through Vertices.
The GradientGouraud class consists of the following fields:
Access | Name | Type | Comment |
|---|---|---|---|
| Indices | kt::vector<int> | Defines triangle connectivity for a Gouraud gradient. | |
The Indices array provides triangle connectivity for a Gouraud gradient's Vertices, with three indices per triangle referencing vertices in counter-clockwise order. Supplying indices allows vertices to be shared between adjacent triangles. If left empty, the Vertices array is treated as a flat triangle list, where every three consecutive vertices form one triangle. | |||
| Vertices | kt::vector<GouraudVertex> | Defines the coloured vertices for a Gouraud gradient. | |
The Vertices array defines the mesh of coloured points across which colour is interpolated barycentrically. Each GouraudVertex carries an By default the vertices are treated as a flat triangle list, where every three consecutive vertices form one triangle. Supplying an Indices array instead expresses triangle connectivity explicitly. The coordinate system for vertex positions is determined by Gradient⇒Units. Under | |||
Describes a coloured vertex for the GradientGouraud Vertices field.
| Field | Type | Description |
|---|---|---|
| X | DOUBLE | The X coordinate of the vertex. |
| Y | DOUBLE | The Y coordinate of the vertex. |
| Colour | struct FRGB | The floating point RGB colour assigned to this vertex. |