org.deegree.rendering.r3d.model.geometry
Class SimpleAccessGeometry
java.lang.Object
org.deegree.rendering.r3d.model.geometry.SimpleAccessGeometry
- All Implemented Interfaces:
- Serializable, MemoryAware, QualityModelPart
- Direct Known Subclasses:
- TexturedGeometry
public class SimpleAccessGeometry
- extends Object
- implements QualityModelPart
The SimpleAccessGeometry class, defines geometry by a coordinate array with or without innerrings and
a set of colors.
- Version:
- $Revision: 15598 $, $Date: 2009-01-12 15:03:49 +0100 (Mo, 12 Jan 2009) $
- Author:
- Rutger Bezema, last edited by: $Author: rbezema $
- See Also:
- Serialized Form
coordinates
protected transient float[] coordinates
- The coordinates of this geometry may be null
innerRings
transient int[] innerRings
vertexCount
transient int vertexCount
SimpleAccessGeometry
public SimpleAccessGeometry(float[] coordinates,
int[] innerRings,
SimpleGeometryStyle style)
- Parameters:
coordinates - innerRings - style -
SimpleAccessGeometry
public SimpleAccessGeometry(float[] coordinates,
SimpleGeometryStyle style)
- Parameters:
coordinates - style -
SimpleAccessGeometry
public SimpleAccessGeometry(float[] coordinates,
int[] innerRings)
- Parameters:
coordinates - innerRings - containing indizes to the vertex, not the array offset.
SimpleAccessGeometry
public SimpleAccessGeometry(float[] coordinates)
- Parameters:
coordinates -
getGeometry
public final float[] getGeometry()
- Returns:
- the coordinates
setGeometry
public final void setGeometry(float[] coordinates)
- Parameters:
coordinates - the originalGeometry to set
getInnerRings
public final int[] getInnerRings()
- Returns:
- the innerRings
setInnerRings
public final void setInnerRings(int[] innerRings)
- Parameters:
innerRings - the innerRings to set
getCoordinate
public float[] getCoordinate(int coordinateLocation)
- Parameters:
coordinateLocation - of the x ordinate of the requested coordinate.
- Returns:
- a copy of the coordinate at the given location (location, location +1,location +2)
- Throws:
IndexOutOfBoundsException - is outside the coordinate array
getCoordinateForVertex
public float[] getCoordinateForVertex(int vertex)
- Parameters:
vertex - the vertex index(starting at 0), e.g. if you would like to get the coordinates of the second vertex
the vertex index would be 1
- Returns:
- a copy of the coordinates for the vertex at given index
- Throws:
IndexOutOfBoundsException - is outside the coordinate array
getVertexCount
public final int getVertexCount()
- Returns:
- the vertexCount
toString
public String toString()
- Overrides:
toString in class Object
sizeOf
public long sizeOf()
- Specified by:
sizeOf in interface MemoryAware
- Returns:
- the approximate size in bytes of this object. This value might not be perfectly correct (references in
the rendering.r3 package are called) but it will give an estimate of the amount of memory an
implementation uses.
getStyle
public SimpleGeometryStyle getStyle()
- Returns:
- the style information of this geometry
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org]]>