GLUshapeProducer Class Reference

#include <glu3.h>

Inheritance diagram for GLUshapeProducer:
GLUcubeProducer GLUsphereProducer

List of all members.

Public Member Functions

void orientation (bool outside)
virtual unsigned vertex_count (void) const =0
virtual unsigned element_count (void) const =0
virtual unsigned primitive_count (void) const =0
virtual void generate (GLUshapeConsumer *consumer) const =0

Protected Attributes

bool normals_point_out

Detailed Description

Base class of a shape generators.

Base class defines the interface for all shape generators. Each concrete subclass is responsible for providing the pure virtual query and data generation methods. Data produced by a shape generator is pushed to a GLUshapeConsumer as it is generated.

See also:
GLUshapeConsumer

Member Function Documentation

virtual unsigned GLUshapeProducer::element_count ( void   )  const [pure 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.

Implemented in GLUsphereProducer, and GLUcubeProducer.

virtual void GLUshapeProducer::generate ( GLUshapeConsumer consumer  )  const [pure 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.

Implemented in GLUsphereProducer, and GLUcubeProducer.

void GLUshapeProducer::orientation ( bool  outside  ) 

Select the orientation of generated normals

Parameters:
outside Set to true if normals should point towards the outside of the object.
virtual unsigned GLUshapeProducer::primitive_count ( void   )  const [pure 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.

Implemented in GLUsphereProducer, and GLUcubeProducer.

virtual unsigned GLUshapeProducer::vertex_count ( void   )  const [pure 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.

Implemented in GLUsphereProducer, and GLUcubeProducer.


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

Generated by  doxygen 1.6.2