hmi.graphics.opengl.geometry
Class SphereGeometry

java.lang.Object
  extended by hmi.graphics.opengl.geometry.SphereGeometry
All Implemented Interfaces:
GLRenderObject

public class SphereGeometry
extends Object
implements GLRenderObject

A simple Sphere object, rendered using direct mode OpenGL

Author:
Job Zwiers

Field Summary
private  float drho
           
private  float ds
           
private  float dt
           
private  float dtheta
           
private  int numSlices
           
private  int numStacks
           
private  float radius
           
private  int sphereList
           
 
Constructor Summary
SphereGeometry(float radius, int numSlices, int numStacks)
          Create a new Sphere object
 
Method Summary
 void glInit(GLRenderContext gl)
          Called during OpenGL initialization.
 void glRender(GLRenderContext gl)
          Called during openGL rendering.
private  void render(GLRenderContext gl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radius

private float radius

numSlices

private int numSlices

numStacks

private int numStacks

drho

private float drho

dtheta

private float dtheta

ds

private float ds

dt

private float dt

sphereList

private int sphereList
Constructor Detail

SphereGeometry

public SphereGeometry(float radius,
                      int numSlices,
                      int numStacks)
Create a new Sphere object

Method Detail

glInit

public void glInit(GLRenderContext gl)
Description copied from interface: GLRenderObject
Called during OpenGL initialization.

Specified by:
glInit in interface GLRenderObject

glRender

public void glRender(GLRenderContext gl)
Description copied from interface: GLRenderObject
Called during openGL rendering.

Specified by:
glRender in interface GLRenderObject

render

private void render(GLRenderContext gl)