The EventHandler associated to EditGraphOrthoLayer. More...
#include <EditGraphOrthoLayer.h>
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. | |
EditGraphOrthoLayer * | editor |
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. |
The EventHandler associated to EditGraphOrthoLayer.
Current edition mode.
proland::EditGraphOrthoLayer::EditGraphHandler::EditGraphHandler | ( | ) |
Creates a new EditGraphHandler.
proland::EditGraphOrthoLayer::EditGraphHandler::EditGraphHandler | ( | EditGraphOrthoLayer * | e, | |
ptr< ResourceManager > | r, | |||
string | t | |||
) |
Creates a new EditGraphHandler.
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.
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.
static_ptr<Program> proland::EditGraphOrthoLayer::EditGraphHandler::displayPointsProgram [static] |
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.
ResourceManager* proland::EditGraphOrthoLayer::EditGraphHandler::manager |
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.
static_ptr<Uniform2f> proland::EditGraphOrthoLayer::EditGraphHandler::windowSizeU [static] |
Current window size.