org.deegree.rendering.r3d.opengl.tesselation
Class GeometryCallBack
java.lang.Object
javax.media.opengl.glu.GLUtessellatorCallbackAdapter
org.deegree.rendering.r3d.opengl.tesselation.GeometryCallBack
- All Implemented Interfaces:
- javax.media.opengl.glu.GLUtessellatorCallback
- Direct Known Subclasses:
- TexturedGeometryCallBack
public class GeometryCallBack
- extends javax.media.opengl.glu.GLUtessellatorCallbackAdapter
The GeometryCallBack class will be called by the Tesselator if a SimpleAccessGeometry
must be triangulated. This class will calculate the normals from the resulting vertices as well.
- Version:
- $Revision: 15512 $, $Date: 2009-01-06 12:12:13 +0100 (Di, 06 Jan 2009) $
- Author:
- Rutger Bezema, last edited by: $Author: rbezema $
| Methods inherited from class javax.media.opengl.glu.GLUtessellatorCallbackAdapter |
beginData, combine, edgeFlag, endData, error, vertex |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeometryCallBack
GeometryCallBack(SimpleAccessGeometry geom)
begin
public void begin(int openGLType)
- Specified by:
begin in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
begin in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
end
public void end()
- Specified by:
end in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
end in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
errorData
public void errorData(int arg0,
Object originalVertex)
- Specified by:
errorData in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
errorData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
combineData
public void combineData(double[] coords,
Object[] coordinateData,
float[] weights,
Object[] outData,
Object originalVertex)
- Specified by:
combineData in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
combineData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
edgeFlagData
public void edgeFlagData(boolean arg0,
Object originalVertex)
- Specified by:
edgeFlagData in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
edgeFlagData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
vertexData
public void vertexData(Object newVertex,
Object originalVertex)
- Specified by:
vertexData in interface javax.media.opengl.glu.GLUtessellatorCallback- Overrides:
vertexData in class javax.media.opengl.glu.GLUtessellatorCallbackAdapter
getTesselatedVertices
public List<Vertex> getTesselatedVertices()
- Returns:
- the vertices of the tesselated geometry
addVertex
public void addVertex(Vertex vertex)
- Parameters:
vertex -
getGeometry
public final SimpleAccessGeometry getGeometry()
- Returns:
- the geometry object currently tesselated
createNewVertex
public Vertex createNewVertex(int currentVertexLocation)
- Create a vertex appropriate for the tesselation of the given type of geometry.
- Parameters:
currentVertexLocation - of the coordinates (the Vertex count)
- Returns:
- the vertex used for the tesselation process.
createRenderableGeometry
public RenderableGeometry createRenderableGeometry(boolean useDirectBuffers)
- Calculate the normals for the tesselated geometry and return a renderable geometry created from the given
SimpleAccessGeometry
- Parameters:
useDirectBuffers - to use direct buffers instead of heap buffers.
- Returns:
- the tesselated
SimpleAccessGeometry as a RenderableGeometry
getTesselatedCoordinates
protected float[] getTesselatedCoordinates()
- Returns:
- the coordinates of the vertices created by the tesselation process.
calculateNormals
protected float[] calculateNormals()
- Calculate the normals according to the openGL type.
- Returns:
- the normals appropriate for the openGL type.
getOpenGLType
public final int getOpenGLType()
- Returns:
- the openGLType
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>