Class Fox::FXGLCylinder
In: lib/fox16/glshapes.rb
Parent: FXGLShape

OpenGL cylinder object

Methods

drawshape   new  

Constants

SLICES_NUMBER = 20   Cylinder fidelity
STACKS_NUMBER = 20
LOOPS = 4

Attributes

height  [RW]  Cylinder height [Float]
loops  [RW]  Number of loops (default is 4) [Integer]
radius  [RW]  Cylinder radius [Float]
slices  [RW]  Number of slices (default is 20) [Integer]
stacks  [RW]  Number of stacks (default is 20) [Integer]

Public Class methods

Returns an initialized FXGLCylinder instance.

One option is to initialize the cylinder with a specified origin, height and radius:

    aCylinder = FXGLCylinder.new(x, y, z, h, r)

If left unspecified, the height (h) and radius (r) default to 1.0.

Another option is to initialize the cylinder with a specified origin, height, radius and material:

    aCylinder = FXGLCylinder.new(x, y, z, h, r, material)

where the material is an FXMaterial instance.

Public Instance methods

Draw this cylinder into viewer (an FXGLViewer instance).

[Validate]