The Quadric module is provided to draw simple quadric surfaces, in particular disks, cones, cylinders and spheres. The resolution of the tesselation, type of surface normal generation, texture coordinate generation, etc. may be specified.
*vgl_QuadricBegin - create an instance of a Quadric object vgl_QuadricEnd - destroy an instance of a Quadric object vgl_QuadricError - return Quadric object error flag
vgl_QuadricCylinder - draw variations of a cylinder vgl_QuadricSetObject - set pointers to attribute objects. vgl_QuadricSetParamf - set drawing parameters. vgl_QuadricSetParamfv - set drawing parameters. vgl_QuadricSetParami - set drawing parameters. vgl_QuadricSphere - draw a sphere
*vgl_QuadricBegin - create an instance of a Quadric object
vgl_Quadric *vgl_QuadricBegin ()
None
Destroy an instance of a Quadric object using
void vgl_QuadricEnd (vgl_Quadric *quadric)
Return the current value of a Quadric object error flag using
Vint vgl_QuadricError (vgl_Quadric *quadric)
vgl_QuadricCylinder - draw variations of a cylinder
void vgl_QuadricCylinder (vgl_Quadric *quadric, Vfloat baserad, Vfloat toprad, Vfloat height)
quadric Pointer to Quadric object. baserad Radius of base of cylinder toprad Radius of top of cylinder height Height of cylinder
None
vgl_QuadricSetObject - set pointers to attribute objects
void vgl_QuadricSetObject (vgl_Quadric *quadric, Vint objecttype, Vobject *object)
quadric Pointer to Quadric object. objecttype The name of the object type to be set. =VGL_DRAWFUN DrawFun object object Pointer to the object to be set.
None
vgl_QuadricSetParam - set drawing style parameters
void vgl_QuadricSetParamf (vgl_Quadric *quadric, Vint ptype, Vfloat fparam) void vgl_QuadricSetParami (vgl_Quadric *quadric, Vint ptype, Vint iparam)
quadric Pointer to Quadric object. ptype Type of drawing parameter to set =QUADRIC_AZIMUTHSTART Starting value of azimuthal angle =QUADRIC_AZIMUTHSTOP Stopping value of azimuthal angle =QUADRIC_LINE Feature line flag =QUADRIC_FILL Fill flag =QUADRIC_SHADE Type of normals to generate =QUADRIC_SLICES Resolution along azimuth. =QUADRIC_STACKS Resolution along elevation. =QUADRIC_TEXTURECOORD Texture coordinate generation flag fparam Specifies the float value that ptype will be set to. iparam Specifies the integer value that ptype will be set to.
None
The QUADRIC_FILL parameter enables polygon generation By default QUADRIC_FILL is enabled. The QUADRIC_LINE parameter enables feature polyline generation By default QUADRIC_LINE is disabled.
The QUADRIC_SHADE parameter specifies the type of normals generated for light source shading. Possible values are VGL_NOSHADE, VGL_FLATSHADE and VGL_VERTEXSHADE. The default normal generation is VGL_FLATSHADE.
The QUADRIC_SLICES and QUADRIC_STACKS parameters specify the resolution of the surface tesselation. The default slices and stacks are 17 and 9. This resolution generates 128 quadrilateral polygons.
The QUADRIC_TEXTURECOORD parameter enables texture coordinate generation. The default is off.
vgl_QuadricSetParamfv - set drawing parameters.
void vgl_QuadricSetParamfv (vgl_Quadric *quadric, Vint ptype, Vfloat fparam[])
quadric Pointer to Quadric object. ptype Type of drawing parameter to set =QUADRIC_ORIGIN Origin of quadric fparam Specifies the float values that ptype will be set to.
None
vgl_QuadricSphere - draw a sphere
void vgl_QuadricSphere (vgl_Quadric *quadric, Vfloat rad),
quadric Pointer to Quadric object. rad Radius of sphere
None