org.deegree_impl.services.wts
Class ViewPoint_Impl

java.lang.Object
  extended byorg.deegree_impl.services.wts.ViewPoint_Impl
All Implemented Interfaces:
ViewPoint

public class ViewPoint_Impl
extends java.lang.Object
implements ViewPoint

-----------------------------------------------------------------------

Version:
$Revision: 1.10 $ $Date: 2004/02/09 08:00:39 $
Author:
Katharina Lupp, Andreas Poth

Field Summary
private  double aov
           
private  Point3d[] footprint
           
private  double hdir
           
private  Point3d observerPosition
           
private static double rad0
           
private static double rad180
           
private static double rad270
           
private static double rad360
           
private static double rad90
           
private  Point3d targetPoint
           
private  double vdir
           
 
Constructor Summary
ViewPoint_Impl(double hdir, double vdir, double distance, Point3d targetPoint, double aov)
          Creates a new instance of ViewPoint_Impl
ViewPoint_Impl(Point3d observerPosition, double hdir, double vdir, double aov)
          Creates a new instance of ViewPoint_Impl
ViewPoint_Impl(Point3d observerPosition, Point3d targetPoint, double aov)
          Creates a new instance of ViewPoint_Impl
 
Method Summary
private  double calcDir(double height, double dist)
           
private  double[] calcDirections()
          calculates the vertical and horizontal direction of the observer's view
private  Point3d[] calcFootprint(double height)
          calculates footprint
private  Point3d calcObserverPosition(double distance)
          calculates the observers position for a given target point, distance and view directions.
private  Point3d calcTargetPoint(double height)
          calculates the target point of the view for the submitted height VP | \ | \ | \______________ height = XX | |\ |___|_\_____________ height = 0 TP1 TP2
 double getAoV()
          gets the field of view of the observer in radians
 Point3d[] getFootprint()
          get footprint or rather the field of view
 Point3d[] getFootprint(double height)
          get footprint or rather the field of view
 double getHDirection()
          gets the horizontal direction in radians the observer looks
 Point3d getObserverPosition()
          gets the position of the observer, the directions he looks and his field of view in radians
 Point3d getTarget()
          gets the directions the observer looks and his field of view in radians
 double getVDirection()
          gets vertical direction in radians the observer looks
 void setAoV(double aov)
          defines the field of view of the observer in radians
 void setHDirection(double hdir)
          defines the horizontal direction in radians the observer looks
 void setObserverPosition(Point3d observerPosition)
          defines the position of the observer, the directions he looks and his field of view in radians
 void setTarget(Point3d targetPoint)
          defines the directions the observer looks and his field of view in radians
 void setVDirection(double vdir)
          defines vertical direction in radians the observer looks
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rad0

private static double rad0

rad90

private static double rad90

rad180

private static double rad180

rad270

private static double rad270

rad360

private static double rad360

observerPosition

private Point3d observerPosition

targetPoint

private Point3d targetPoint

footprint

private Point3d[] footprint

aov

private double aov

hdir

private double hdir

vdir

private double vdir
Constructor Detail

ViewPoint_Impl

public ViewPoint_Impl(double hdir,
                      double vdir,
                      double distance,
                      Point3d targetPoint,
                      double aov)
Creates a new instance of ViewPoint_Impl


ViewPoint_Impl

public ViewPoint_Impl(Point3d observerPosition,
                      Point3d targetPoint,
                      double aov)
Creates a new instance of ViewPoint_Impl


ViewPoint_Impl

public ViewPoint_Impl(Point3d observerPosition,
                      double hdir,
                      double vdir,
                      double aov)
               throws InvalidArcException
Creates a new instance of ViewPoint_Impl

Method Detail

calcObserverPosition

private Point3d calcObserverPosition(double distance)
calculates the observers position for a given target point, distance and view directions.
 VP
 | \
 |  \
 |   \
 |    \
 |_____\_____________ 
      TP
 


calcTargetPoint

private Point3d calcTargetPoint(double height)
calculates the target point of the view for the submitted height
 VP
 | \
 |  \
 |   \______________ height = XX
 |   |\
 |___|_\_____________ height = 0
   TP1  TP2
 


calcDirections

private double[] calcDirections()
calculates the vertical and horizontal direction of the observer's view


calcDir

private double calcDir(double height,
                       double dist)
Parameters:
height -
dist -
Returns:

calcFootprint

private Point3d[] calcFootprint(double height)
calculates footprint


getAoV

public double getAoV()
gets the field of view of the observer in radians

Specified by:
getAoV in interface ViewPoint

setAoV

public void setAoV(double aov)
defines the field of view of the observer in radians

Specified by:
setAoV in interface ViewPoint

getHDirection

public double getHDirection()
gets the horizontal direction in radians the observer looks

Specified by:
getHDirection in interface ViewPoint

setHDirection

public void setHDirection(double hdir)
defines the horizontal direction in radians the observer looks

Specified by:
setHDirection in interface ViewPoint

getTarget

public Point3d getTarget()
gets the directions the observer looks and his field of view in radians

Specified by:
getTarget in interface ViewPoint

setTarget

public void setTarget(Point3d targetPoint)
defines the directions the observer looks and his field of view in radians

Specified by:
setTarget in interface ViewPoint

getVDirection

public double getVDirection()
gets vertical direction in radians the observer looks

Specified by:
getVDirection in interface ViewPoint

setVDirection

public void setVDirection(double vdir)
defines vertical direction in radians the observer looks

Specified by:
setVDirection in interface ViewPoint

getObserverPosition

public Point3d getObserverPosition()
gets the position of the observer, the directions he looks and his field of view in radians

Specified by:
getObserverPosition in interface ViewPoint

setObserverPosition

public void setObserverPosition(Point3d observerPosition)
defines the position of the observer, the directions he looks and his field of view in radians

Specified by:
setObserverPosition in interface ViewPoint

getFootprint

public Point3d[] getFootprint()
get footprint or rather the field of view

Specified by:
getFootprint in interface ViewPoint

getFootprint

public Point3d[] getFootprint(double height)
get footprint or rather the field of view

Specified by:
getFootprint in interface ViewPoint

toString

public java.lang.String toString()