proland::EditGraphOrthoLayer::EditGraphHandler Class Reference

The EventHandler associated to EditGraphOrthoLayer. More...

#include <EditGraphOrthoLayer.h>

Inheritance diagram for proland::EditGraphOrthoLayer::EditGraphHandler:
proland::EditHydroGraphOrthoLayer::EditHydroGraphHandler

List of all members.

Public Types

enum  edit_mode
 

Current edition mode.

More...

Public Member Functions

 EditGraphHandler ()
 Creates a new EditGraphHandler.
 EditGraphHandler (EditGraphOrthoLayer *e, ptr< ResourceManager > r, string t)
 Creates a new EditGraphHandler.
virtual ~EditGraphHandler ()
 Deletes this EditGraphHandler.
bool undo ()
 Cancels the last point move.
virtual void redisplay (double t, double dt)
 See EventHandler::redisplay.
virtual bool mouseClick (button b, state s, modifier m, int x, int y)
 See EventHandler::mouseClick.
virtual bool mouseMotion (int x, int y)
 See EventHandler::mouseMotion.
virtual bool keyTyped (unsigned char c, modifier m, int x, int y)
 See EventHandler::keyTyped.
virtual bool specialKey (key k, modifier m, int x, int y)
 See EventHandler::specialKey.
vec3d getWorldCoordinates (int x, int y)
 Returns the world position of a given screen coordinate, if it exists (i.e.
vec3i getScreenCoordinates (double x, double y, double z)
 Returns the screen position of a given world coordinate, if it exists (i.e.
void update ()
 Updates the state of many values depending of the current selection and what has been changed.

Public Attributes

string t
 Terrain name in xml file.
SceneNode * terrain
 Node containing the terrain.
TerrainNode * terrainNode
 Terrain on which this EditGraphOrthoLayer is applied.
ResourceManager * manager
 Manager creating the scene.
EditGraphOrthoLayereditor
 EditGraphOrthoLayer associated to this TweakGraphLayer.
int mode
 Current edition mode.
bool edited
 Determines if we need to call update() at redisplay() call (i.e.
vec3d newPos
 Last click coordinates.
vec3d prevPos
 Previous point position, used in undo() method.
vec2i lastScreenPos
 Previous frame mouse position in screen space.
bool initialized
 True if terrain has been initialized.

Static Public Attributes

static static_ptr< Program > displayPointsProgram
 GLSL Program used to draw editor::displayedPoints.
static static_ptr< Uniform2f > windowSizeU
 Current window size.

Detailed Description

The EventHandler associated to EditGraphOrthoLayer.


Member Enumeration Documentation

Current edition mode.


Constructor & Destructor Documentation

proland::EditGraphOrthoLayer::EditGraphHandler::EditGraphHandler (  ) 

Creates a new EditGraphHandler.

proland::EditGraphOrthoLayer::EditGraphHandler::EditGraphHandler ( EditGraphOrthoLayer e,
ptr< ResourceManager >  r,
string  t 
)

Creates a new EditGraphHandler.

Parameters:
e the associated EditGraphOrthoLayer on which the updates will occur.
r the RessourceManager used to load terrain Info.
t the name of the terrain from which we want to load info.
virtual proland::EditGraphOrthoLayer::EditGraphHandler::~EditGraphHandler (  )  [virtual]

Deletes this EditGraphHandler.


Member Function Documentation

vec3i proland::EditGraphOrthoLayer::EditGraphHandler::getScreenCoordinates ( double  x,
double  y,
double  z 
)

Returns the screen position of a given world coordinate, if it exists (i.e.

if the point is on a terrain node).

vec3d proland::EditGraphOrthoLayer::EditGraphHandler::getWorldCoordinates ( int  x,
int  y 
)

Returns the world position of a given screen coordinate, if it exists (i.e.

if the point is on a terrain node).

virtual bool proland::EditGraphOrthoLayer::EditGraphHandler::keyTyped ( unsigned char  c,
modifier  m,
int  x,
int  y 
) [virtual]

See EventHandler::keyTyped.

virtual bool proland::EditGraphOrthoLayer::EditGraphHandler::mouseClick ( button  b,
state  s,
modifier  m,
int  x,
int  y 
) [virtual]

See EventHandler::mouseClick.

Reimplemented in proland::EditHydroGraphOrthoLayer::EditHydroGraphHandler.

virtual bool proland::EditGraphOrthoLayer::EditGraphHandler::mouseMotion ( int  x,
int  y 
) [virtual]

See EventHandler::mouseMotion.

Reimplemented in proland::EditHydroGraphOrthoLayer::EditHydroGraphHandler.

virtual void proland::EditGraphOrthoLayer::EditGraphHandler::redisplay ( double  t,
double  dt 
) [virtual]

See EventHandler::redisplay.

virtual bool proland::EditGraphOrthoLayer::EditGraphHandler::specialKey ( key  k,
modifier  m,
int  x,
int  y 
) [virtual]

See EventHandler::specialKey.

bool proland::EditGraphOrthoLayer::EditGraphHandler::undo (  ) 

Cancels the last point move.

void proland::EditGraphOrthoLayer::EditGraphHandler::update (  ) 

Updates the state of many values depending of the current selection and what has been changed.

Calls graph->notifyListeners if anything changed.


Member Data Documentation

GLSL Program used to draw editor::displayedPoints.

Determines if we need to call update() at redisplay() call (i.e.

if a modification occured).

EditGraphOrthoLayer associated to this TweakGraphLayer.

True if terrain has been initialized.

Previous frame mouse position in screen space.

Manager creating the scene.

Current edition mode.

Last click coordinates.

Previous point position, used in undo() method.

Terrain name in xml file.

Node containing the terrain.

Terrain on which this EditGraphOrthoLayer is applied.

Current window size.


Generated on Sat May 12 09:43:14 2012 for proland by  doxygen 1.6.1