deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.rendering.r3d.multiresolution
Class Arc

java.lang.Object
  extended by org.deegree.rendering.r3d.multiresolution.Arc

public class Arc
extends Object

A directed arc of a MultiresolutionMesh.

Version:
$Revision$
Author:
Markus Schneider, last edited by: $Author$

Field Summary
 int destinationNode
          Id of the destination node.
 float geometricError
          Geometric error (highest error of all fragments).
 int highestPatch
          Highest patch id in the label of the arc.
 int id
          Id of the arc.
 int lowestPatch
          Lowest patch id in the label of the arc.
 int nextArcWithSameDestination
          Id of the next arc with the same destination node (-1 if there is none).
static int SIZE
          Size of binary representation (in bytes)
 int sourceNode
          Id of the source node.
 
Constructor Summary
Arc(MultiresolutionMesh mt, int id, ByteBuffer buffer, int baseOffset)
          Creates a new Arc instance.
 
Method Summary
 float[][] getBBox()
          Returns the bounding box of the region that this arc represents.
 MeshFragment[] getFragments()
          Returns the fragments associated with this arc.
 boolean interferes(ViewFrustum roi, float zScale)
          Determines if this arc interferes with the given Geometry.
static void store(ByteBuffer target, int sourceNode, int destinationNode, int lowestPatch, int highestPatch, int nextArcWithSameDestination, float geometricError)
          Stores the information of an Arc in the given ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static int SIZE
Size of binary representation (in bytes)


id

public final int id
Id of the arc.


sourceNode

public final int sourceNode
Id of the source node.


destinationNode

public final int destinationNode
Id of the destination node.


lowestPatch

public final int lowestPatch
Lowest patch id in the label of the arc.


highestPatch

public final int highestPatch
Highest patch id in the label of the arc.


nextArcWithSameDestination

public final int nextArcWithSameDestination
Id of the next arc with the same destination node (-1 if there is none).


geometricError

public final float geometricError
Geometric error (highest error of all fragments).

Constructor Detail

Arc

Arc(MultiresolutionMesh mt,
    int id,
    ByteBuffer buffer,
    int baseOffset)
Creates a new Arc instance.

Parameters:
mt - MultiresolutionMesh instance that the arc is part of
id - id of the arc
buffer - buffer that contains the binary representation of the arc
baseOffset - offset in the buffer
Method Detail

store

public static void store(ByteBuffer target,
                         int sourceNode,
                         int destinationNode,
                         int lowestPatch,
                         int highestPatch,
                         int nextArcWithSameDestination,
                         float geometricError)
Stores the information of an Arc in the given ByteBuffer.

Parameters:
target - buffer where the binary representation is written to
sourceNode - id of the source node of the arc
destinationNode - id of the destination node of the arc
lowestPatch - lowest patch id in the label of the arc
highestPatch - highest patch id in the label of the arc
nextArcWithSameDestination - id of the next arc with the same destination node (-1 if there is none)
geometricError - geometric error

getFragments

public MeshFragment[] getFragments()
Returns the fragments associated with this arc.

Returns:
the fragments associated

interferes

public boolean interferes(ViewFrustum roi,
                          float zScale)
Determines if this arc interferes with the given Geometry.

Parameters:
roi - geometry that is tested for interference
zScale - scaling factor applied to z values of the mesh geometry (and bounding boxes)
Returns:
true, if the arc interferes with the geometry, false otherwise

getBBox

public float[][] getBBox()
Returns the bounding box of the region that this arc represents.

Returns:
the bounding box

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>