Cutout Vis2012
TUWienVisualisierung2(SS2012)-AdaptiveCutaways
|
#include <Gizmo.h>
Public Member Functions | |
SubGizmo (Scene *scene) | |
Scene * | getScene () |
virtual void | render (Shader *shader)=0 |
virtual void | hover () |
virtual UserAction | press ()=0 |
void | stopEdit () |
void | setTarget (SceneNode *target) |
SceneNode * | getTarget () |
virtual void | update ()=0 |
bool | isIdle () |
bool | isHovering () |
bool | isEditing () |
void | setIdle () |
void | setEditing () |
Public Member Functions inherited from Identifiable | |
unsigned int | getID () |
Friends | |
class | Gizmo |
Additional Inherited Members | |
Static Public Member Functions inherited from Identifiable | |
static Identifiable * | byID (unsigned int id) |
Base class for gizmos that allow editing in a specific way.
SceneNode * SubGizmo::getTarget | ( | ) |
Returns the scene node that can be edited by this gizmo.
|
virtual |
Called by the application before the update()
method iff the mouse cursor is resting on the sub gizmo
Reimplemented from Identifiable.
bool SubGizmo::isEditing | ( | ) |
returns true iff editing operation is in process
bool SubGizmo::isHovering | ( | ) |
returns true iff no editing operation is in process and the mouse cursor is resting on the sub gizmo
bool SubGizmo::isIdle | ( | ) |
returns true iff no editing operation is in process and the mouse cursor is not resting on the sub gizmo
|
pure virtual |
Called by the application when the user clicks on the gizmo. Allows to grab the focus of the application
Reimplemented from Identifiable.
Implemented in TranslateGizmo, and ScaleGizmo.
|
pure virtual |
Renders a representation of the gizmo ontop of its target
Implemented in TranslateGizmo, and ScaleGizmo.
void SubGizmo::setEditing | ( | ) |
Should be called by the sub class to set the state to editing
void SubGizmo::setIdle | ( | ) |
Should be called by the sub class to set the state to idle
void SubGizmo::setTarget | ( | SceneNode * | target) |
Called be the surrounding Gizmo
to set the scene node that will be edited.
void SubGizmo::stopEdit | ( | ) |
Called be the surrounding Gizmo
to finish the editing process.
|
pure virtual |
Has to be implemented by a sub class to perform its logic during the editing process
Implemented in TranslateGizmo, and ScaleGizmo.