org.deegree.rendering.r3d.opengl.rendering.dem.texturing
Class TextureTileRequest

java.lang.Object
  extended by org.deegree.rendering.r3d.opengl.rendering.dem.texturing.TextureTileRequest
Direct Known Subclasses:
TextureRequest

public class TextureTileRequest
extends Object

Represents the request for a TextureTile.

Version:
$Revision: 29127 $, $Date: 2011-01-10 16:13:35 +0100 (Mon, 10 Jan 2011) $
Author:
Markus Schneider, last edited by: $Author: aschmitz $

Constructor Summary
TextureTileRequest(double minX, double minY, double maxX, double maxY, float metersPerPixel)
           
TextureTileRequest(TextureRequest request)
           
 
Method Summary
 boolean equals(Object o)
           
 double getMaxX()
           
 double getMaxY()
           
 double getMinX()
           
 double getMinY()
           
 float getUnitsPerPixel()
           
 int hashCode()
          Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast.
 boolean isFullfilled(TextureTile candidate)
           
 boolean isFullfilled(TextureTileRequest candidate, double epsilon)
           
 void merge(TextureTileRequest otherRequest)
          Merge two requests.
 boolean shareCorner(TextureTileRequest that)
           
 boolean shareCornerNE(TextureTileRequest that)
           
 boolean shareCornerNW(TextureTileRequest that)
           
 boolean shareCornerSE(TextureTileRequest that)
           
 boolean shareCornerSW(TextureTileRequest that)
           
 boolean supersedes(TextureTileRequest that)
          Returns whether this TextureRequest supersedes another TextureRequest.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextureTileRequest

public TextureTileRequest(TextureRequest request)
Parameters:
request - to copy the values from.

TextureTileRequest

public TextureTileRequest(double minX,
                          double minY,
                          double maxX,
                          double maxY,
                          float metersPerPixel)
Parameters:
minX -
minY -
maxX -
maxY -
metersPerPixel -
Method Detail

shareCorner

public boolean shareCorner(TextureTileRequest that)
Parameters:
that -
Returns:
true if two request share a border.

shareCornerNW

public boolean shareCornerNW(TextureTileRequest that)
Parameters:
that -
Returns:
true if the two request share the North-West corner.

shareCornerNE

public boolean shareCornerNE(TextureTileRequest that)
Parameters:
that -
Returns:
true if the two request share the North-East corner.

shareCornerSW

public boolean shareCornerSW(TextureTileRequest that)
Parameters:
that -
Returns:
true if the two request share the South-West corner.

shareCornerSE

public boolean shareCornerSE(TextureTileRequest that)
Parameters:
that -
Returns:
true if the two request share the South-East corner.

merge

public void merge(TextureTileRequest otherRequest)
Merge two requests.

Parameters:
otherRequest -

getMinX

public double getMinX()
Returns:
min x position

getMinY

public double getMinY()
Returns:
min y position

getMaxX

public double getMaxX()
Returns:
max x position

getMaxY

public double getMaxY()
Returns:
max y position

getUnitsPerPixel

public float getUnitsPerPixel()
Returns:
number of meters per pixel (a scale).

hashCode

public int hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. It is created from field f as follows:

Combining the hash code(s) computed above: result = 37 * result + code;

Overrides:
hashCode in class Object
Returns:
(int) ( result >>> 32 ) ^ (int) result;
See Also:
Object.hashCode()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

isFullfilled

public boolean isFullfilled(TextureTile candidate)
Parameters:
candidate -
Returns:
true if this request covers the total area of the given 'candiate'.

supersedes

public boolean supersedes(TextureTileRequest that)
Returns whether this TextureRequest supersedes another TextureRequest.

This is true iff:

Parameters:
that -
Returns:
true, if this request supersedes the given request, false otherwise

isFullfilled

public boolean isFullfilled(TextureTileRequest candidate,
                            double epsilon)
Parameters:
candidate - which values are taken into consideration.
epsilon - is used to determine the tolerance of the scale factor.
Returns:
true if this request lies within the area of the given 'candiate' and the the resolution of this is larger or withing epsilon range of the given candidate.


Copyright © 2011. All Rights Reserved.