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

java.lang.Object
  extended by 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: 29127 $, $Date: 2011-01-10 16:13:35 +0100 (Mon, 10 Jan 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $
See Also:
Serialized Form

Field Summary
protected  float[] coordinates
          The coordinates of this geometry may be null
 
Constructor Summary
SimpleAccessGeometry(float[] coordinates)
           
SimpleAccessGeometry(float[] coordinates, int[] innerRings)
           
SimpleAccessGeometry(float[] coordinates, int[] innerRings, SimpleGeometryStyle style)
           
SimpleAccessGeometry(float[] coordinates, SimpleGeometryStyle style)
           
 
Method Summary
 float[] getCoordinate(int coordinateLocation)
           
 float[] getCoordinateForVertex(int vertex)
           
 float[] getGeometry()
           
 float[] getHorizontalGeometries(float[] coordinates)
          If the geometry is horizontal lying.
 int[] getInnerRings()
           
 SimpleGeometryStyle getStyle()
           
 int getVertexCount()
           
 void setGeometry(float[] coordinates)
           
 void setInnerRings(int[] innerRings)
           
 long sizeOf()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

coordinates

protected transient float[] coordinates
The coordinates of this geometry may be null

Constructor Detail

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 -
Method Detail

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

getHorizontalGeometries

public float[] getHorizontalGeometries(float[] coordinates)
If the geometry is horizontal lying.

Parameters:
coordinates -
Returns:
the coordinates that are horizontal, can be null.

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


Copyright © 2011. All Rights Reserved.