NAME

OpenGL::Sandbox::V1::Quadric - Rendering parameters for various geometric shapes

VERSION

version 0.042

SYNOPSIS

default_quadric->normals(GLU_SMOOTH)->texture(1)->sphere(100, 42, 42);

DESCRIPTION

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.

CONFIGURATION

Each of these is write-only. They return the object for convenient chaining.

draw_style

$q->draw_style($x)  # GLU_FILL, GLU_LINE, GLU_SILHOUETTE, GL_POINT

You can also use aliases of:

draw_fill
draw_line
draw_silhouette
draw_point

normals

$q->normals($x)  # GLU_NONE, GLU_FLAT, GLU_SMOOTH

You can also use aliases of:

no_normals, or normals(0)
flat_normals
smooth_normals

orientation

$q->orientation($x)   # GLU_OUTSIDE, GLU_INSIDE

You can also use aliases of

inside
outside

texture

$q->texture($bool)    # GL_TRUE, GL_FALSE

GEOMETRY PLOTTING

sphere

$q->sphere($radius, $slices, $stacks);

Plot a sphere around the origin with specified dimensions.

cylinder

$q->cyliner($base_rad, $top_rad, $height, $slices, $stacks);

Plot a hollow cylinder (without ends) along the Z axis with the specified dimensions.

disk

$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.

partial_disk

$q->partial_disk($inner, $outer, $slices, $loops, $start, $sweep);

Plot a wedge of a disk around the Z axis.

AUTHOR

Michael Conrad <mike@nrdvana.net>

COPYRIGHT AND LICENSE

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.