org.deegree.rendering.r3d.opengl.rendering.model.geometry
Class BillBoard
java.lang.Object
org.deegree.rendering.r3d.model.QualityModel<RenderableQualityModelPart>
org.deegree.rendering.r3d.opengl.rendering.model.geometry.RenderableQualityModel
org.deegree.rendering.r3d.opengl.rendering.model.geometry.BillBoard
- All Implemented Interfaces:
- Serializable, MemoryAware, JOGLRenderable, PositionableModel
public class BillBoard
- extends RenderableQualityModel
- implements PositionableModel
The BillBoard class represents a billboard an object always facing the viewer, with the z-axis as it's
rotation axis.
- Version:
- $Revision: 19841 $, $Date: 2009-09-29 14:03:45 +0200 (Di, 29 Sep 2009) $
- Author:
- Rutger Bezema, last edited by: $Author: rbezema $
- See Also:
- Serialized Form
|
Constructor Summary |
BillBoard(String texture,
float[] location,
float width,
float height)
Constructs a billboard data structure with the given texture id. |
BillBoard
public BillBoard(String texture,
float[] location,
float width,
float height)
- Constructs a billboard data structure with the given texture id.
- Parameters:
texture - location - of the billboardwidth - of this billboardheight - of this billboard
render
public void render(RenderContext glRenderContext)
- Description copied from interface:
JOGLRenderable
- Called to render this object to an OpenGL context.
The following pre-conditions hold:
- The projection matrix of
context has been set up correctly by the caller.
- The view parameters
params matches the projection and the screen size, so the callee can depend
on them to perform view frustum culling and LOD adaptation.
- Specified by:
render in interface JOGLRenderable- Overrides:
render in class RenderableQualityModel
- Parameters:
glRenderContext - TODO
toString
public String toString()
- Overrides:
toString in class RenderableQualityModel
sizeOf
public long sizeOf()
- Specified by:
sizeOf in interface MemoryAware- Overrides:
sizeOf in class QualityModel<RenderableQualityModelPart>
- Returns:
- the bytes this geometry occupies
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
getTextureID
public final String getTextureID()
- Returns:
- the id of it's texture
getLocation
public final float[] getLocation()
- Returns:
- the location of this billboard (it's center axis)
getPosition
public float[] getPosition()
- Specified by:
getPosition in interface PositionableModel
- Returns:
- the position of the implementing class.
getWidth
public final float getWidth()
- Returns:
- the width
getHeight
public final float getHeight()
- Returns:
- the height
renderPrepared
public void renderPrepared(javax.media.opengl.GL context,
float[] eye)
- Parameters:
context - eye -
getErrorScalar
public float getErrorScalar()
- Specified by:
getErrorScalar in interface PositionableModel
- Returns:
- a scalar which is represents the 'error' of this positionable.
getObjectHeight
public float getObjectHeight()
- Specified by:
getObjectHeight in interface PositionableModel
- Returns:
- a scalar which represents the 'height' of this positionable.
getGroundLevel
public float getGroundLevel()
- Specified by:
getGroundLevel in interface PositionableModel
- Returns:
- a scalar which represents the 'groundlevel' of this positionable.
getModelBBox
public float[] getModelBBox()
- Specified by:
getModelBBox in interface PositionableModel
- Returns:
- the boundingbox of the model with float[0][0-3] the min, float[1][0-3] the max.
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>