version 3.3

VRS::GroundPlateNavigation Class Reference

The GroundNavigation is an abstract class for all navigation classes that. More...

#include <vrs/sg/groundplatenavigation.h>

Inheritance diagram for VRS::GroundPlateNavigation:

VRS::InteractionTechnique VRS::SharedObj VRS::Visitable VRS::MoveFocusGroundPlateNavigation VRS::PanGroundPlateNavigation VRS::SphereGroundPlateNavigation VRS::ZoomGroundPlateNavigation VRS::ZoomOrthoGroundPlateNavigation

List of all members.

Public Member Functions

 VRS_TYPEINFO (GroundPlateNavigation, InteractionTechnique)

Static Public Member Functions

*static Vector polar2Cartesian (const Vector &v)
 Maps special polar coordinates to cartesian coordinates.
*static VRS::Vector cartesian2Polar (const VRS::Vector &v)
 Inverse mapping for polar2cartesian, assuming that the up-VRSVector did not change in between.
static Vector getUp ()
 Returns simply the standard world up Vector (0,1,0).
static double getMaxAltitude ()
 Returns the maximum allowed altitude.
static double visualFlow2horizontalMovement (double screens, double fov=45.0)
 For 'ground plate'-based navigations it can be useful to keep the horizontal movement speed proportional to the camera height.
*static double horizontalMovement2visualFlow (double units, double fov=45.0)
 Converts horizontal lengths (in units) to visual flow (in screens).
static bool performRayRequest (int x, int y, SO< Canvas > canvas, SO< RayRequest > request)
 performs a ray request at (x,y) in window coords.

Protected Member Functions

 GroundPlateNavigation (double yValOfGroundPlate=0.0)
void setYValOfGroundPlate (double yVal=0.0)
 Set y value of ground plate.
double getYValOfGroundPlate () const
 Returns the y value of ground plate.
double getHeightAboveGroundPlate (const Vector &pos) const
 get height above ground plate
bool performRayRequest (int x, int y, SO< Canvas > canv, Vector &hitPoint)
 performs a ray request at (x,y) in window coords


Detailed Description

The GroundNavigation is an abstract class for all navigation classes that.

need to assume a virtual ground plate to work properly. The virtual ground plate's normal vector is (0,1,0) and the plate cuts the y axis at yValOfGroundPlate.


Constructor & Destructor Documentation

VRS::GroundPlateNavigation::GroundPlateNavigation ( double  yValOfGroundPlate = 0.0  )  [protected]


Member Function Documentation

* static Vector VRS::GroundPlateNavigation::polar2Cartesian ( const Vector v  )  [static]

Maps special polar coordinates to cartesian coordinates.

The polar VRS::Vector (0,0,1) is mapped to a unit VRS::Vector on the plane through the origin with the up VRS::Vector as normal. The first two coordinates are angles in degrees, the first one specifying rotation around the up-VRSVector, the second one specifying the rotation around an orthogonal right VRS::Vector, the third coordinate specifies the length.

* static VRS::Vector VRS::GroundPlateNavigation::cartesian2Polar ( const VRS::Vector v  )  [static]

Inverse mapping for polar2cartesian, assuming that the up-VRSVector did not change in between.

The resulting angles are inside the range ]-180, 180] for the first component (latitude) and inside ]-90, 90] for the second component (altitude).

static Vector VRS::GroundPlateNavigation::getUp (  )  [static]

Returns simply the standard world up Vector (0,1,0).

static double VRS::GroundPlateNavigation::getMaxAltitude (  )  [static]

Returns the maximum allowed altitude.

static double VRS::GroundPlateNavigation::visualFlow2horizontalMovement ( double  screens,
double  fov = 45.0 
) [static]

For 'ground plate'-based navigations it can be useful to keep the horizontal movement speed proportional to the camera height.

This allows to specify horizontal movement speed in an intuitive way by visual flow: Looking down from an height h the time in which "one screen width of terrain" passes the camera should should be independent on the value of h. To calculate it, a field-of-view-value is needed. This method can be used by derivatives to convert from visual flow (in screens) to the absolute lengths (in units when moving in a height of 1.0). To obtain the necessary length at a heigth of h, multiply the result with h.

* static double VRS::GroundPlateNavigation::horizontalMovement2visualFlow ( double  units,
double  fov = 45.0 
) [static]

Converts horizontal lengths (in units) to visual flow (in screens).

See visualFlow2horizontalMovement() comment for details.

static bool VRS::GroundPlateNavigation::performRayRequest ( int  x,
int  y,
SO< Canvas canvas,
SO< RayRequest request 
) [static]

performs a ray request at (x,y) in window coords.

After the call, 'request' contains the results (if any). 'request' and 'canvas' must not be NULL. Returns 'true' if the result is non-empty.

VRS::GroundPlateNavigation::VRS_TYPEINFO ( GroundPlateNavigation  ,
InteractionTechnique   
)

void VRS::GroundPlateNavigation::setYValOfGroundPlate ( double  yVal = 0.0  )  [protected]

Set y value of ground plate.

double VRS::GroundPlateNavigation::getYValOfGroundPlate (  )  const [protected]

Returns the y value of ground plate.

double VRS::GroundPlateNavigation::getHeightAboveGroundPlate ( const Vector pos  )  const [protected]

get height above ground plate

bool VRS::GroundPlateNavigation::performRayRequest ( int  x,
int  y,
SO< Canvas canv,
Vector hitPoint 
) [protected]

performs a ray request at (x,y) in window coords


The documentation for this class was generated from the following file:

Generated on Mon May 21 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact