proland::PlanetViewController Class Reference
[util]

A TerrainViewController for spherical terrains (i.e., planets). More...

#include <PlanetViewController.h>

Inheritance diagram for proland::PlanetViewController:
proland::TerrainViewController

List of all members.

Public Member Functions

 PlanetViewController (ptr< SceneNode > node, double R)
 Creates a new PlanetViewController.
virtual ~PlanetViewController ()
 Deletes this PlanetViewController.
virtual double getHeight ()
 Returns the height of the camera above the z=0 surface.
virtual void move (vec3d &oldp, vec3d &p)
 Moves the "look at" point so that "oldp" appears at the position of "p" on screen.
virtual double interpolate (double sx0, double sy0, double stheta, double sphi, double sd, double dx0, double dy0, double dtheta, double dphi, double dd, double t)
 Sets the position as the interpolation of the two given positions with the interpolation parameter t (between 0 and 1).
virtual void update ()
 Sets the localToParent transform of the SceneNode associated with this TerrainViewController.

Public Attributes

const double R
 The radius of the planet at sea level.

Detailed Description

A TerrainViewController for spherical terrains (i.e., planets).

This subclass interprets the x0 and y0 fields as longitudes and latitudes on the planet, and considers theta and phi as relative to the tangent plane at the (x0,y0) point.

Authors:
Eric Bruneton, Antoine Begault, Guillaume Piolat

Constructor & Destructor Documentation

proland::PlanetViewController::PlanetViewController ( ptr< SceneNode >  node,
double  R 
)

Creates a new PlanetViewController.

Parameters:
node a SceneNode representing a camera position and orientation in the scene.
R the planet radius at sea level.
virtual proland::PlanetViewController::~PlanetViewController (  )  [virtual]

Deletes this PlanetViewController.


Member Function Documentation

virtual double proland::PlanetViewController::getHeight (  )  [virtual]

Returns the height of the camera above the z=0 surface.

Reimplemented from proland::TerrainViewController.

virtual double proland::PlanetViewController::interpolate ( double  sx0,
double  sy0,
double  stheta,
double  sphi,
double  sd,
double  dx0,
double  dy0,
double  dtheta,
double  dphi,
double  dd,
double  t 
) [virtual]

Sets the position as the interpolation of the two given positions with the interpolation parameter t (between 0 and 1).

The source position is sx0,sy0,stheta,sphi,sd, the destination is dx0,dy0,dtheta,dphi,dd.

Returns:
the new value of the interpolation parameter t.

Reimplemented from proland::TerrainViewController.

virtual void proland::PlanetViewController::move ( vec3d &  oldp,
vec3d &  p 
) [virtual]

Moves the "look at" point so that "oldp" appears at the position of "p" on screen.

Parameters:
oldp a terrain point.
p another terrain point.

Reimplemented from proland::TerrainViewController.

virtual void proland::PlanetViewController::update (  )  [virtual]

Sets the localToParent transform of the SceneNode associated with this TerrainViewController.

The transform is computed from the view parameters x0,y0,theta,phi and d.

Reimplemented from proland::TerrainViewController.


Member Data Documentation

The radius of the planet at sea level.


Generated on Sat May 12 09:41:40 2012 for proland by  doxygen 1.6.1