GLUcubeProducer Class Reference

#include <glu3.h>

Inheritance diagram for GLUcubeProducer:
GLUshapeProducer

List of all members.

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

Detailed Description

Shape generator that generates a cube.


Constructor & Destructor Documentation

GLUcubeProducer::GLUcubeProducer ( GLdouble  radius  ) 

Construct a new cube shape generator

Parameters:
radius Distance from the center of the cube to the center of one of the axis-aligned faces.

Member Function Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables

Generated by  doxygen 1.6.2