Gizmo tool for views.
More...
#include <tdme/tools/editor/misc/Gizmo.h>
|
enum | GizmoType {
GIZMOTYPE_NONE = 0
, GIZMOTYPE_TRANSLATE = 1
, GIZMOTYPE_ROTATE = 2
, GIZMOTYPE_SCALE = 4
,
GIZMOTYPE_ALL = 8
} |
|
enum | GizmoMode {
GIZMOMODE_NONE
, GIZMOMODE_TRANSLATE_X
, GIZMOMODE_TRANSLATE_Y
, GIZMOMODE_TRANSLATE_Z
,
GIZMOMODE_TRANSLATEPLANE_X
, GIZMOMODE_TRANSLATEPLANE_Y
, GIZMOMODE_TRANSLATEPLANE_Z
, GIZMOMODE_SCALE_X
,
GIZMOMODE_SCALE_Y
, GIZMOMODE_SCALE_Z
, GIZMOMODE_SCALEPLANE_X
, GIZMOMODE_SCALEPLANE_Y
,
GIZMOMODE_SCALEPLANE_Z
, GIZMOMODE_ROTATE_X
, GIZMOMODE_ROTATE_Y
, GIZMOMODE_ROTATE_Z
} |
|
|
| Gizmo (Engine *engine, const string &id, int32_t gizmoTypeMask=GIZMOTYPE_TRANSLATE|GIZMOTYPE_ROTATE|GIZMOTYPE_SCALE) |
| Public constructor. More...
|
|
virtual | ~Gizmo () |
| Destructor. More...
|
|
void | setEngine (Engine *engine) |
| Set engine. More...
|
|
int32_t | getGizmoTypeMask () const |
|
void | setGizmoTypeMask (int gizmoTypeMask) |
| Set GIZMO type mask. More...
|
|
GizmoType | getGizmoType () const |
|
void | setGizmoType (GizmoType gizmoType) |
| Set GIZMO type. More...
|
|
GizmoMode | getGizmoMode () const |
|
void | setGizmoMode (GizmoMode gizmoMode) |
| Set GIZMO mode. More...
|
|
void | updateGizmo (const Vector3 &gizmoCenter, const Transformations &transformations) |
| Update gizmo. More...
|
|
Object3D * | getGizmoObject3D () |
|
void | removeGizmo () |
| Remove gizmo. More...
|
|
bool | determineGizmoMovement (int mouseX, int mouseY, vector< Vector3 > vertices, Vector3 &deltaMovement) |
| Determine movement on a plane given by 4 vertices. More...
|
|
bool | determineGizmoDeltaTransformations (int mouseLastX, int mouseLastY, int mouseX, int mouseY, Vector3 &deltaTranslation, Vector3 &deltaRotation, Vector3 &deltaScale) |
| Determine GIZMO delta transformations. More...
|
|
bool | determineGizmoMode (Entity *selectedEntity, Node *selectedEntityNode) |
| Select GIZMO mode. More...
|
|
void | setGizmoRotation (const Transformations &transformations) |
| Set gizmo rotation. More...
|
|
Gizmo tool for views.
- Author
- Andreas Drewke
Definition at line 25 of file Gizmo.h.
◆ GizmoMode
Enumerator |
---|
GIZMOMODE_NONE | |
GIZMOMODE_TRANSLATE_X | |
GIZMOMODE_TRANSLATE_Y | |
GIZMOMODE_TRANSLATE_Z | |
GIZMOMODE_TRANSLATEPLANE_X | |
GIZMOMODE_TRANSLATEPLANE_Y | |
GIZMOMODE_TRANSLATEPLANE_Z | |
GIZMOMODE_SCALE_X | |
GIZMOMODE_SCALE_Y | |
GIZMOMODE_SCALE_Z | |
GIZMOMODE_SCALEPLANE_X | |
GIZMOMODE_SCALEPLANE_Y | |
GIZMOMODE_SCALEPLANE_Z | |
GIZMOMODE_ROTATE_X | |
GIZMOMODE_ROTATE_Y | |
GIZMOMODE_ROTATE_Z | |
Definition at line 35 of file Gizmo.h.
◆ GizmoType
Enumerator |
---|
GIZMOTYPE_NONE | |
GIZMOTYPE_TRANSLATE | |
GIZMOTYPE_ROTATE | |
GIZMOTYPE_SCALE | |
GIZMOTYPE_ALL | |
Definition at line 28 of file Gizmo.h.
◆ Gizmo()
Public constructor.
- Parameters
-
engine | engine |
id | id |
gizmoTypeMask | gizmo type mask |
Definition at line 38 of file Gizmo.cpp.
◆ ~Gizmo()
◆ determineGizmoDeltaTransformations()
bool determineGizmoDeltaTransformations |
( |
int |
mouseLastX, |
|
|
int |
mouseLastY, |
|
|
int |
mouseX, |
|
|
int |
mouseY, |
|
|
Vector3 & |
deltaTranslation, |
|
|
Vector3 & |
deltaRotation, |
|
|
Vector3 & |
deltaScale |
|
) |
| |
Determine GIZMO delta transformations.
- Parameters
-
mouseLastX | last mouse X position |
mouseLastY | last mouse Y position |
mouseX | mouse X position |
mouseY | mouse Y position |
deltaTranslation | determined delta translation |
deltaRotation | determined delta rotations |
deltaScale | determined delta scale |
Definition at line 254 of file Gizmo.cpp.
◆ determineGizmoMode()
bool determineGizmoMode |
( |
Entity * |
selectedEntity, |
|
|
Node * |
selectedEntityNode |
|
) |
| |
Select GIZMO mode.
- Parameters
-
selectedEntity | selected entity |
selectedEntityNode | selected entity node |
Definition at line 400 of file Gizmo.cpp.
◆ determineGizmoMovement()
bool determineGizmoMovement |
( |
int |
mouseX, |
|
|
int |
mouseY, |
|
|
vector< Vector3 > |
vertices, |
|
|
Vector3 & |
deltaMovement |
|
) |
| |
Determine movement on a plane given by 4 vertices.
- Parameters
-
mouseX | current mouse X position |
mouseY | current mouse Y position |
vertices | 4 vertices that span a plane |
deltaMovement | delta movement result |
- Returns
- success
Definition at line 219 of file Gizmo.cpp.
◆ getGizmoMode()
- Returns
- GIZMO mode
Definition at line 120 of file Gizmo.h.
◆ getGizmoObject3D()
- Returns
- GIZMO object
Definition at line 203 of file Gizmo.cpp.
◆ getGizmoType()
- Returns
- GIZMO type
Definition at line 104 of file Gizmo.h.
◆ getGizmoTypeMask()
int32_t getGizmoTypeMask |
( |
| ) |
const |
|
inline |
- Returns
- GIZMO type mask
Definition at line 88 of file Gizmo.h.
◆ removeGizmo()
◆ setEngine()
void setEngine |
( |
Engine * |
engine | ) |
|
|
inline |
Set engine.
- Parameters
-
Definition at line 81 of file Gizmo.h.
◆ setGizmoMode()
Set GIZMO mode.
- Parameters
-
Definition at line 128 of file Gizmo.h.
◆ setGizmoRotation()
Set gizmo rotation.
- Parameters
-
transformations | transformations containing rotations |
Definition at line 426 of file Gizmo.cpp.
◆ setGizmoType()
Set GIZMO type.
- Parameters
-
Definition at line 112 of file Gizmo.h.
◆ setGizmoTypeMask()
void setGizmoTypeMask |
( |
int |
gizmoTypeMask | ) |
|
|
inline |
Set GIZMO type mask.
- Parameters
-
gizmoTypeMask | GIZMO type mask |
Definition at line 96 of file Gizmo.h.
◆ updateGizmo()
Update gizmo.
- Parameters
-
gizmoCenter | GIZMO center |
transformations | transformations used for rotation |
Definition at line 51 of file Gizmo.cpp.
◆ engine
◆ gizmoLastResult
◆ gizmoLastResultAvailable
bool gizmoLastResultAvailable |
|
private |
◆ gizmoMode
◆ gizmoType
◆ gizmoTypeMask
◆ id
The documentation for this class was generated from the following files:
- /home/andreas/Development/drewke.net/tdme2/src/tdme/tools/editor/misc/Gizmo.h
- /home/andreas/Development/drewke.net/tdme2/src/tdme/tools/editor/misc/Gizmo.cpp