|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.rendering.r3d.opengl.rendering.dem.RenderMeshFragment
public class RenderMeshFragment
Encapsulates a MeshFragment
of a MultiresolutionMesh
that can be rendered via JOGL.
The geometry data of a RenderMeshFragment
has one of the following states:
FragmentTexture
,
MultiresolutionMesh
,
MeshFragment
Constructor Summary | |
---|---|
RenderMeshFragment(MeshFragment fragment)
|
Method Summary | |
---|---|
boolean |
canAllocateEnoughMemory()
|
int |
compareTo(RenderMeshFragment o)
|
void |
disable(javax.media.opengl.GL gl)
Disables the fragment in the given OpenGL context and frees the associated VBOs and texture object. |
void |
enable(javax.media.opengl.GL gl)
Enables the fragment in the given OpenGL context, so it can be rendered. |
boolean |
equals(Object other)
|
float[][] |
getBBox()
|
MeshFragmentData |
getData()
|
float |
getGeometricError()
|
int |
getId()
|
float[][] |
getTrianglePoints()
|
int |
hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. |
boolean |
isEnabled()
Returns whether fragment is ready for rendering (prepared VBOs). |
boolean |
isLoaded()
Returns whether the geometry data is available in main memory. |
void |
load()
Loads the geometry data into main memory. |
void |
render(javax.media.opengl.GL gl)
Render the fragment data. |
void |
render(javax.media.opengl.GL gl,
List<FragmentTexture> textures,
ShaderProgram shaderProgram)
Renders this fragment to the given OpenGL context with given (optional) textures. |
int |
size()
|
void |
unload()
Removes the geometry data from main memory (and disables it). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RenderMeshFragment(MeshFragment fragment)
fragment
- a MultiresolutionMesh fragment to create a renderable fragment from.Method Detail |
---|
public int getId()
public float[][] getBBox()
public float getGeometricError()
public MeshFragmentData getData()
public boolean isLoaded()
public void load() throws IOException
IOException
public void unload()
public boolean isEnabled()
public void enable(javax.media.opengl.GL gl) throws IOException
gl
-
IOException
public void disable(javax.media.opengl.GL gl)
gl
- public void render(javax.media.opengl.GL gl)
gl
- public void render(javax.media.opengl.GL gl, List<FragmentTexture> textures, ShaderProgram shaderProgram)
gl
- context to render in.textures
- may be empty, or nullshaderProgram
- the shader program containing composite texturing code.
RuntimeException
- if the geometry data is currently not bound to VBOspublic int compareTo(RenderMeshFragment o)
compareTo
in interface Comparable<RenderMeshFragment>
public boolean equals(Object other)
equals
in class Object
public int hashCode()
Combining the hash code(s) computed above: result = 37 * result + code;
hashCode
in class Object
Object.hashCode()
public int size()
public boolean canAllocateEnoughMemory()
public float[][] getTrianglePoints()
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |