Om
1.0.0
A universal framework for multimedia simulation
|
A class that is used to specify the type of an indexed primitive. More...
#include <omGraphicsIndexedPrimitiveType.h>
Public Types | |
enum | Enum { UNDEFINED = 0, POINTS = 1, LINES = 2, LINE_STRIP = 3, LINE_LOOP = 4, TRIANGLES = 5, TRIANGLE_STRIP = 6, TRIANGLE_FAN = 7, QUADS = 8, QUAD_STRIP = 9, POLYGON = 10 } |
An enum representing the type of indexed primitive. More... | |
Public Member Functions | |
IndexedPrimitiveType () | |
Create a default indexed primitive type with the UNDEFINED primitive type enum value. More... | |
IndexedPrimitiveType (Enum newType) | |
Create a new indexed primitive type with the specified indexed primitive type enum value. More... | |
IndexedPrimitiveType (Size vertexCount) | |
Create a new indexed primitive type for the specified vertex count. More... | |
operator Enum () const | |
Convert this indexed primitive type to an enum value. More... | |
Size | getMinimumVertexCount () const |
Return the minimum number of vertices needed to define an instance of this primitive type. More... | |
Size | getVertexCount () const |
Return the number of vertices needed to define an instance of this primitive type after the first primitive. More... | |
Size | getPrimitiveVertexCount (Size numVertices) const |
Return the number of vertices that should be used to define primitives from a list of the given vertex count. More... | |
String | toString () const |
Return a string representation of the indexed primitive type. More... | |
operator String () const | |
Convert this indexed primitive type into a string representation. More... | |
A class that is used to specify the type of an indexed primitive.
This class is used to tell the GPU what kind of primitives are represented by an index buffer. For instance, one could specify a list of indexed points, lines, triangles, or quads.
An enum representing the type of indexed primitive.
|
inline |
Create a default indexed primitive type with the UNDEFINED primitive type enum value.
|
inline |
Create a new indexed primitive type with the specified indexed primitive type enum value.
|
inline |
Create a new indexed primitive type for the specified vertex count.
The constructor guesses the primitive type from the given vertex count.
|
inline |
Convert this indexed primitive type to an enum value.
Size om::graphics::buffers::IndexedPrimitiveType::getMinimumVertexCount | ( | ) | const |
Return the minimum number of vertices needed to define an instance of this primitive type.
Size om::graphics::buffers::IndexedPrimitiveType::getVertexCount | ( | ) | const |
Return the number of vertices needed to define an instance of this primitive type after the first primitive.
Return the number of vertices that should be used to define primitives from a list of the given vertex count.
If there are not enough vertices to completely define every primitive, the number of vertices that is returned is modulo those extra vertices that are unable to define the last primitive.
String om::graphics::buffers::IndexedPrimitiveType::toString | ( | ) | const |
Return a string representation of the indexed primitive type.
|
inline |
Convert this indexed primitive type into a string representation.