Enum opengex::structure::GeometricPrimitive [] [src]

pub enum GeometricPrimitive {
    Points,
    Lines,
    LineStrip,
    Triangles,
    TriangleStrip,
    Quads,
}

Helper enum for the Mesh structure, representing different geometric primitives supported by OpenGEX.

In the documentation, n refers to the number of indices if an IndexArray structure is present, and otherwise, the number of vertices in every VertexArray structure. Primitives are indexed by the letter i, starting at zero.

Variants

The mesh is composed of a set of independent points. The number of points is n, and point i is given by vertex i.

The mesh is composed of a set of independent lines. The number of lines equals n/2, and line i is composed of vertices 2i and 2i+1.

The mesh is composed of one or more line strips. The number of lines equals n-1, and line i is composed of vertices i and i+1.

The mesh is composed of a set of independent triangles. The number of triangles equals n/3, and triangle i is composed of vertices 3i, 3i+1 and 3i+1.

The mesh is composed of one or more triangle strips.

When i is even, the triangle is composed out of vertices i, i+1 and i+2. When i is odd, the triangle is composed out of vertices i, i+2 and i+1.

The mesh is composed of a set of individual quads. The number of quads equals n/4, and quad i is composed of vertices 4i, 4i+1, 4i+2 and 4i+3.

Trait Implementations

impl Default for GeometricPrimitive
[src]

Returns the "default value" for a type. Read more