Stellarium 0.12.0 | |||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure |
Allows iteration over triangles in QVectors of vertices. More...
#include <TriangleIterator.hpp>
Public Member Functions | |
TriangleIterator (const QVector< V > &vertices, const PrimitiveType primitiveType) | |
Construct a TriangleIterator iterating over specified vertex array. | |
bool | next (V &a, V &b, V &c) |
Get the next triangle, if any. |
Allows iteration over triangles in QVectors of vertices.
How the vertices are iterated depends on specified primitive type. Triangles iterated will match triangles that would be drawn if the vertices were drawn with specified primitive type.
Used by StelSphereGeometry classes.
Definition at line 37 of file TriangleIterator.hpp.
TriangleIterator< V >::TriangleIterator | ( | const QVector< V > & | vertices, | |
const PrimitiveType | primitiveType | |||
) | [inline] |
Construct a TriangleIterator iterating over specified vertex array.
vertices | Vertices to iterate over. | |
primitiveType | Primitive type to determine how the vertices form triangles. Must be PrimitiveType_Triangles, PrimitiveType_TriangleStrip or PrimitiveType_TriangleFan. |
Vertex count can be 0, but can't be 1 or 2. If primitiveType is PrimitiveType_Triangles, vertex count must be divisible by 3.
Definition at line 49 of file TriangleIterator.hpp.
bool TriangleIterator< V >::next | ( | V & | a, | |
V & | b, | |||
V & | c | |||
) | [inline] |
Get the next triangle, if any.
a | The first vertex of the triangle will be written here. | |
b | The second vertex of the triangle will be written here. | |
c | The third vertex of the triangle will be written here. |
Definition at line 83 of file TriangleIterator.hpp.