hmi.graphics.opengl.geometry
Class CapsuleGeometry
java.lang.Object
  
hmi.graphics.opengl.geometry.CapsuleGeometry
- All Implemented Interfaces: 
 - GLRenderObject
 
public class CapsuleGeometry
- extends Object
- implements GLRenderObject
  
A simple capsule object, centered at (0,0,0) rendered using direct mode OpenGL
 Primary for debugging purposes, optimized for flexibility, not rendering speed.
 [DR]: I did not really understand what I was doing, but I adapted some of the code of Job's SphereGeometry. Textures on this capsule
 are surely going to be wrong.
- Author:
 
  - Herwin van Welbergen, Job Zwiers, Dennis Reidsma
 
 
| 
Constructor Summary | 
CapsuleGeometry(float r,
                float h,
                int slices,
                int stacks)
 
          Constructor | 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
NUM_SLICES
public static final int NUM_SLICES
- See Also:
 - Constant Field Values
 
NUM_STACKS
public static final int NUM_STACKS
- See Also:
 - Constant Field Values
 
cylinderHeight
private float cylinderHeight
height
private float height
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
CapsuleGeometry
public CapsuleGeometry(float r,
                       float h,
                       int slices,
                       int stacks)
- Constructor
- Parameters:
 h - height of the cylindrical partr - radius
 
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)