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

OpenGL sphere object

Methods

drawshape   new  

Constants

SLICES_NUMBER = 20   Sphere fidelity
STACKS_NUMBER = 20

Attributes

radius  [RW]  Sphere 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 FXGLSphere instance.

One option is to initialize the sphere with a specified origin and radius:

    aSphere = FXGLSphere.new(x, y, z, r)

If left unspecified, the radius (r) defaults to 1.0.

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

    aSphere = FXGLSphere.new(x, y, z, r, material)

where the material is an FXMaterial instance.

Public Instance methods

Draw this sphere into viewer (an FXGLViewer instance).

[Validate]