org.j3d.renderer.aviatrix3d.geom
Class Teapot
java.lang.Object
org.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.NodeComponent
org.j3d.aviatrix3d.Geometry
org.j3d.renderer.aviatrix3d.geom.Teapot
- All Implemented Interfaces:
- PickableObject, Renderable, RenderableObject
- public class Teapot
- extends Geometry
A simple teapot that is a low-level geometry primitive.
Internally this uses the OpenGL evaluators to work through the bezier patch
data for rendering. The code is liberally stolen from the GLUT source which
is copyright SGI. Converted to the JOGL API methods and different calling
conventions.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
Constructor Summary |
Teapot(float scale,
int gridSize)
Construct a default instance of the teapot with the given scale factor. |
Method Summary |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to it's geometry having
changed. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state. |
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this renderable object. |
protected void |
updateBounds()
Update this node's bounds and then call the parent to update it's
bounds. |
Methods inherited from class org.j3d.aviatrix3d.Geometry |
addParent, boundsChanged, getBounds, getPickMask, hasTransparency, pickBatch, pickLineRay, pickLineSegment, pickSingle, removeParent, setBounds, setPickMask |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Teapot
public Teapot(float scale,
int gridSize)
- Construct a default instance of the teapot with the given scale factor.
- Parameters:
scale
- The scale of the teapot to use
render
public void render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
- Issue ogl commands needed for this renderable object.
- Parameters:
gl
- The gl context to draw withglu
- The utility context to draw with
postRender
public void postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
- Restore all openGL state.
- Parameters:
gl
- The gl context to draw withglu
- The utility context to draw with
updateBounds
protected void updateBounds()
- Update this node's bounds and then call the parent to update it's
bounds. Used to propogate bounds changes from the leaves of the tree
to the root. A node implementation may decide when and where to tell
the parent(s)s that updates are ready.
- Overrides:
updateBounds
in class Geometry
recomputeBounds
protected void recomputeBounds()
- Internal method to recalculate the implicit bounds of this Node. By
default the bounds are a point sphere, so derived classes should
override this method with something better.
- Specified by:
recomputeBounds
in class Geometry
markBoundsDirty
protected void markBoundsDirty()
- Mark this node as having dirty bounds due to it's geometry having
changed.
- Overrides:
markBoundsDirty
in class Geometry
Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org