|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.geometry.MeshContainer
public class MeshContainer
This class is a container for meshes. If a mesh get added to the container it gets sorted by its alpha value to allow correct blending.
| Constructor Summary | |
|---|---|
MeshContainer()
Creates a new mesh container. |
|
| Method Summary | |
|---|---|
void |
add(AbstractMesh mesh)
Adds a mesh to the container. |
void |
draw(javax.media.opengl.GL gl)
Draws the meshes in the container. |
void |
drawGeometryBoundsToDepthBuffer(javax.media.opengl.GL gl)
This method draws the geometrys bounding volumes to the depth buffer. |
void |
drawTransparent(javax.media.opengl.GL gl,
float transparency)
Draws the meshes of the container with a global transparency value. |
void |
drawWithShadowMap(javax.media.opengl.GL gl,
PositionalLight light,
int shadowTexSize,
float fov,
float range)
Deprecated. I don't recommend to use it, because it is pretty experimental |
void |
drawWithShadowMatrix(javax.media.opengl.GL gl,
PositionalLightIface light)
Draws the scene with shadow matrix shadows of the meshes in the container. |
java.util.List<BoundingSphere> |
getBoundingSpheres()
Returns the bounding spheres of the meshes in the container that have a bounding sphere assigned to. |
AbstractMesh |
getMeshByName(java.lang.String name)
Returns the mesh with the specified name. |
java.util.List<AbstractMesh> |
getMeshes()
Returns the meshes of the mesh container |
void |
remove(AbstractMesh mesh)
Removes the specified mesh from the container |
void |
sortByAlpha()
Sorts the meshes in the mesh container by their tranparency value, i.e. |
void |
sortByViewingDistance()
Sorts the meshes in the container according to their center points distance to the viewer (camera). |
void |
update(long elapsedTime)
Updates the meshes in the container |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MeshContainer()
| Method Detail |
|---|
public void add(AbstractMesh mesh)
mesh - the mesh to add to the containerpublic void remove(AbstractMesh mesh)
mesh - mesh to remove from the containerpublic java.util.List<AbstractMesh> getMeshes()
public AbstractMesh getMeshByName(java.lang.String name)
null.
name - name of the mesh to retrieve
public java.util.List<BoundingSphere> getBoundingSpheres()
public void sortByAlpha()
public void sortByViewingDistance()
public void update(long elapsedTime)
elapsedTime - time between two framespublic void drawGeometryBoundsToDepthBuffer(javax.media.opengl.GL gl)
gl - public void draw(javax.media.opengl.GL gl)
gl -
public void drawTransparent(javax.media.opengl.GL gl,
float transparency)
gl - transparency - transparency value [0..1]
public void drawWithShadowMatrix(javax.media.opengl.GL gl,
PositionalLightIface light)
gl - light - reference light for drawing the shadows
@Deprecated
public void drawWithShadowMap(javax.media.opengl.GL gl,
PositionalLight light,
int shadowTexSize,
float fov,
float range)
gl - light - reference lightshadowTexSize - size of the shadow map texture (e.g. 512)fov - field of view of the shadow maprange - range of the shadow (how far to cast the shadow?)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||