#include <glu3.h>
Public Member Functions | |
GLUcubeProducer (GLdouble radius) | |
virtual unsigned | vertex_count (void) const |
virtual unsigned | element_count (void) const |
virtual unsigned | primitive_count (void) const |
virtual void | generate (GLUshapeConsumer *consumer) const |
Shape generator that generates a cube.
GLUcubeProducer::GLUcubeProducer | ( | GLdouble | radius | ) |
Construct a new cube shape generator
radius | Distance from the center of the cube to the center of one of the axis-aligned faces. |
unsigned GLUcubeProducer::element_count | ( | void | ) | const [virtual] |
Get the number of elements used to draw primitives for the shape
This can be used in the constructor for derived classes, for example, to determine how much storage to allocate for element data.
Implements GLUshapeProducer.
void GLUcubeProducer::generate | ( | GLUshapeConsumer * | consumer | ) | const [virtual] |
Generate the primitive
Causes the data for the primitive to be generated. This will result in the vertex
, begin_primitive
, index
, and end_primitive
methods of consumer
being invoked with the data as it is generated.
Implements GLUshapeProducer.
unsigned GLUcubeProducer::primitive_count | ( | void | ) | const [virtual] |
Get the number of primitves used to draw the shape
This can be used in the constructor for derived classes, for example, to determine the primitive count for a call to glMultiDrawElements
or to determine how much padding to allocate for restart values used with primitive restart.
Implements GLUshapeProducer.
unsigned GLUcubeProducer::vertex_count | ( | void | ) | const [virtual] |
Get the number of vertices in the shape
This can be used in the constructor for derived classes, for example, to determine how much storage to allocate for vertex data.
Implements GLUshapeProducer.