Class Fox::FXGLSphere

In: | ../lib/fox/glshapes.rb
Parent: | FXGLShape

OpenGL sphere object

Methods

drawshape new

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

new(*args)

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

drawshape(viewer)

Draw this sphere into viewer (an FXGLViewer instance).