GLUsphereProducer Class Reference

#include <glu3.h>

Inheritance diagram for GLUsphereProducer:
GLUshapeProducer

List of all members.

Public Member Functions

 GLUsphereProducer (GLdouble radius, GLint slices, GLint stacks)
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 sphere.


Constructor & Destructor Documentation

GLUsphereProducer::GLUsphereProducer ( GLdouble  radius,
GLint  slices,
GLint  stacks 
)

Construct a new sphere shape generator

Parameters:
radius Specifies the radius of the sphere.
slices Specifies the number of subdivisions around the z-axis. These subdivisions are analogous to the slices of an orange. These also match longitude lines on the globe.
stacks Specifies the number of subdivisions along the z-axis. These match the latitude lines on the globe.

Member Function Documentation

unsigned GLUsphereProducer::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 GLUsphereProducer::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 GLUsphereProducer::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 GLUsphereProducer::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