452 454














Open GL Super Bible:Quadrics: Spheres, Cylinders, and Disks















To access the contents, click the chapter and section titles.


Open GL Super Bible


(Publisher: Macmillan Computer Publishing)

Author(s): Waite group Press

ISBN: 1571690735

Publication Date: 08/01/96

 




Previous
Table of Contents
Next




gluQuadricCallback

Purpose
Defines a quadric callback function.
Include File
<GL/glu.h>
Syntax
void gluQuadricCallback(GLUquadricObj *obj, GLenum which, void (*fn)());
Description
This function defines callback functions to be
used when drawing quadric shapes. At present, the only defined callback
function is GLU_ERROR, which is called whenever an OpenGL or GLU error
occurs.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
which

GLenum: The callback function to define. Must be GLU_ERROR.
fn

void (*)(): The callback function (receives one GLenum containing the error).
Returns
None.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricDrawStyle, gluQuadricNormals, gluQuadricOrientation,
gluQuadricTexture


gluQuadricDrawStyle

Purpose
Sets the drawing style of a quadric state object.
Include File
<GL/glu.h>
Syntax
void gluQuadricDrawStyle(GLUquadricObj *obj, GLenum drawStyle);
Description
This function selects a drawing style for all
quadric shapes.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
drawStyle

GLenum: The drawing style. Valid styles are as
follows:






GLU_FILL
Quadrics are drawn filled, using polygon and strip primitives.

GLU_LINE
Quadrics are drawn “wireframe," using line primitives.

GLU_SILHOUETTE
Quadrics are drawn using line primitives; only the outside edges are drawn.

GLU_POINT
Quadrics are drawn using point primitives.



Returns
None.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricCallback, gluQuadricNormals, gluQuadricOrientation,
gluQuadricTexture


gluQuadricNormals

Purpose
Sets the type of lighting normals used for quadric objects.
Include File
<GL/glu.h>
Syntax
void gluQuadricNormals(GLUquadricObj *obj, GLenum normals);
Description
This function sets the type of lighting normals
that are generated when drawing shapes using the specified quadric state
object.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
normals

GLenum: The type of normals to generate. Valid
types are as follows:






GLU_NONE
No lighting normals are generated.

GLU_FLAT
Lighting normals are generated for each polygon to generate a faceted appearance.

GLU_SMOOTH
Lighting normals are generated for each
vertex to generate a smooth appearance.



Returns
None.
Example
See the example in CH13\PENCIL.C.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricCallback, gluQuadricDrawStyle, gluQuadricOrientation,
gluQuadricTexture


gluQuadricOrientation

Purpose
Sets the orientation of lighting normals for quadric objects.
Include File
<GL/glu.h>
Syntax
void gluQuadricOrientation(GLUquadricObj *obj, GLenum orientation);
Description
This function sets the direction of lighting
normals for hollow objects. The orientation parameter may be GLU_OUTSIDE
to point lighting normals outward, or GLU_INSIDE to point them inward.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
orientation

GLenum: The orientation of lighting normals, GLU_OUTSIDE or GLU_INSIDE. The default is GLU_OUTSIDE.
Returns
None.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricCallback, gluQuadricDrawStyle, gluQuadricNormals,
gluQuadricTexture


gluQuadricTexture

Purpose
Enables or disables texture coordinate generation for texture-mapping images onto quadrics.
Include File
<GL/glu.h>
Syntax
void gluQuadricTexture(GLUquadricObj *obj, GLboolean textureCoords);
Description
This function controls whether or not texture
coordinates are generated for quadric shapes.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
textureCoords

GLboolean: GL_TRUE if texture coordinates should be generated; GL_FALSE otherwise.
Returns
None.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricCallback, gluQuadricDrawStyle, gluQuadricNormals,
gluQuadricOrientation


gluSphere

Purpose
Draws a quadric sphere.
Include File
<GL/glu.h>
Syntax
void gluSphere(GLUquadricObj *obj, GLdouble radius, GLint slices, GLint stacks);
Description
This function draws a hollow sphere centered at
the origin. The slices argument controls the number of lines of
longitude on the sphere. The stacks argument controls the number of
lines of latitude on the sphere.


Parameters

obj

GLUquadricObj *: The quadric state information to use for rendering.
radius

GLdouble: The radius of the sphere.
slices

GLint: The number of lines of longitude on the sphere.
stacks

GLint: The number of lines of latitude on the sphere.
Returns
None.
See Also
gluDeleteQuadric, gluNewQuadric,
gluQuadricCallback, gluQuadricDrawStyle, gluQuadricNormals,
gluQuadricOrientation, gluQuadricTexture






Previous
Table of Contents
Next














 


Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.












Wyszukiwarka

Podobne podstrony:
452 454
INDEX (452)
452 456
452 464
index (452)
demo cgi 452
03 (452)

więcej podobnych podstron