org.deegree.rendering.r3d.model.geometry
Class TexturedGeometry

java.lang.Object
  extended by org.deegree.rendering.r3d.model.geometry.SimpleAccessGeometry
      extended by org.deegree.rendering.r3d.model.geometry.TexturedGeometry
All Implemented Interfaces:
Serializable, MemoryAware, QualityModelPart

public class TexturedGeometry
extends SimpleAccessGeometry

The RenderableTexturedGeometry class TODO add class documentation here.

Version:
$Revision: 30126 $, $Date: 2011-03-22 11:11:00 +0100 (Tue, 22 Mar 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.deegree.rendering.r3d.model.geometry.SimpleAccessGeometry
coordinates
 
Constructor Summary
TexturedGeometry(float[] geometry, int[] innerRings, String texture, float[] textureCoordinates)
           
TexturedGeometry(float[] geometry, SimpleGeometryStyle style, String texture, float[] textureCoordinates)
           
TexturedGeometry(float[] geometry, String texture, float[] textureCoordinates)
           
 
Method Summary
 String getTexture()
           
 float[] getTextureCoordinate(int location)
           
 float[] getTextureCoordinateForVertex(int vertex)
           
 float[] getTextureCoordinates()
           
 void setTexture(String texture)
           
 void setTextureCoordinates(float[] textureCoordinates)
           
 long sizeOf()
           
 String toString()
           
 
Methods inherited from class org.deegree.rendering.r3d.model.geometry.SimpleAccessGeometry
getCoordinate, getCoordinateForVertex, getGeometry, getHorizontalGeometries, getInnerRings, getStyle, getVertexCount, setGeometry, setInnerRings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TexturedGeometry

public TexturedGeometry(float[] geometry,
                        SimpleGeometryStyle style,
                        String texture,
                        float[] textureCoordinates)
Parameters:
geometry -
style -
texture - to use
textureCoordinates - of this data

TexturedGeometry

public TexturedGeometry(float[] geometry,
                        String texture,
                        float[] textureCoordinates)
Parameters:
geometry -
texture -
textureCoordinates -

TexturedGeometry

public TexturedGeometry(float[] geometry,
                        int[] innerRings,
                        String texture,
                        float[] textureCoordinates)
Parameters:
geometry -
innerRings -
texture -
textureCoordinates -
Method Detail

getTexture

public final String getTexture()
Returns:
the texture

setTexture

public final void setTexture(String texture)
Parameters:
texture - the texture to set

getTextureCoordinates

public final float[] getTextureCoordinates()
Returns:
the textureCoordinates

setTextureCoordinates

public final void setTextureCoordinates(float[] textureCoordinates)
Parameters:
textureCoordinates - the textureCoordinates to set

getTextureCoordinate

public float[] getTextureCoordinate(int location)
Parameters:
location - of the x ordinate of the requested texture coordinate.
Returns:
a copy of the coordinate at the given location (location, location +1)
Throws:
IndexOutOfBoundsException - is outside the coordinate array

getTextureCoordinateForVertex

public float[] getTextureCoordinateForVertex(int vertex)
Parameters:
vertex - the vertex index(starting at 0), e.g. if you would like to get the texture coordinates for the second vertex the vertex index would be 1
Returns:
a copy of the texture coordinates for the given vertex.
Throws:
IndexOutOfBoundsException - is outside the coordinate array

toString

public String toString()
Overrides:
toString in class SimpleAccessGeometry

sizeOf

public long sizeOf()
Specified by:
sizeOf in interface MemoryAware
Overrides:
sizeOf in class SimpleAccessGeometry
Returns:
the bytes this geometry occupies


Copyright © 2011. All Rights Reserved.