OpenGL::Sandbox::V1::Quadric - Rendering parameters for various geometric shapes
default_quadric->normals(GLU_SMOOTH)->texture(1)->sphere(100, 42, 42);
GLU Quadrics are a funny name for a small object that holds a few rendering parameters for another few geometry-plotting functions. They provide a quick/convenient way to render some simple polygon surfaces without messing with a bunch of trigonometry and loops.
Each of these is write-only. They return the object for convenient chaining.
$q->draw_style($x) # GLU_FILL, GLU_LINE, GLU_SILHOUETTE, GL_POINT
You can also use aliases of:
$q->normals($x) # GLU_NONE, GLU_FLAT, GLU_SMOOTH
$q->orientation($x) # GLU_OUTSIDE, GLU_INSIDE
You can also use aliases of
$q->texture($bool) # GL_TRUE, GL_FALSE
$q->sphere($radius, $slices, $stacks);
Plot a sphere around the origin with specified dimensions.
$q->cyliner($base_rad, $top_rad, $height, $slices, $stacks);
Plot a hollow cylinder (without ends) along the Z axis with the specified dimensions.
$q->disk($inner_rad, $outer_rad, $slices, $loops);
Plot a flat circle around the Z axis along the XY plane. Nonzero inner radius "subtracts" a circle from the center.
$q->partial_disk($inner, $outer, $slices, $loops, $start, $sweep);
Plot a wedge of a disk around the Z axis.
Michael Conrad <email@example.com>
This software is copyright (c) 2019 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install OpenGL::Sandbox::V1, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.