|
RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <qglgameeditorviewport.h>
Public Types | |
| enum | AxisTypes { NOAXIS, X, Y, Z } |
| enum | ManipulatorTypes { NOMANIPULATOR, TRANSLATION, ROTATION, SCALE, UNIFORMSCALE } |
| enum | DrawMode { TEXTURED, SOLIDCOLORS } |
Public Types inherited from QGLBaseViewport | |
| enum | QGLViewportDrawMode { WIRED, SOLID, TEXTURED } |
Signals | |
| void | newGameObjectSelected (uint) |
| void | selectedGameObjectTransformChanged (QGLGameEditorViewport::ManipulatorTypes) |
Signals inherited from QGLGameViewport | |
| void | afterInitializeGL (QGLGameViewport *game_viewport) |
Protected Member Functions | |
| float | getMotionThroughAxis (btVector3 &, Vector2) |
| Determines how parallel is the mouse movement to a manipulator axis. More... | |
| btVector3 | calcTranslationVec (btVector3 &, Vector2, btMatrix3x3 &, float, Transform::TransformMode, AxisTypes) |
| Calculates the differential translation vector based upon the object's position, rotation, and the motion vector. More... | |
| btVector3 | calcScaleVec (AxisTypes, float, bool) |
| Calculates the differential scale vector based upon the given axis direction and differential size. More... | |
| void | mousePressEvent (QMouseEvent *event) |
| void | mouseMoveEvent (QMouseEvent *event) |
| void | wheelEvent (QWheelEvent *event) |
| void | mouseReleaseEvent (QMouseEvent *event) |
| void | drawSolidCone (GLdouble, GLdouble, GLint, GLint) |
| void | drawManipulatorsForGameObject (uint uid) |
| Draws the Translation, Rotation or Scale manipulators for the given game object's unique id. More... | |
| void | drawCommonManipulatorsForNode (CLNode *node, ManipulatorTypes manipulator_type, Transform::TransformMode transform_mode, btVector3 &scale) |
| void | drawRotationManipulatorsForNode (CLNode *node, Transform::TransformMode transform_mode, btVector3 &scale) |
| void | manipulatorMoved (ManipulatorTypes manipulator_type, int dx, int dy) |
| AxisTypes | selectAxis (int x, int y) |
| Returns the picked axis by the user. More... | |
| uint | selectObject (int x, int y) |
| Returns the selected game object (if any) at the given coordinates. More... | |
| virtual void | paintGL () |
| virtual void | step () |
| virtual void | preDraw () |
| virtual void | customDraw () |
| virtual void | postDraw () |
| virtual void | drawGameObject (CGameObject *game_object) |
| virtual void | drawSkybox () |
| virtual void | drawCrosshair () |
Protected Member Functions inherited from QGLGameViewport | |
| virtual void | initializeGL () |
| virtual void | drawWorldAxis () |
| void | bindTextures () |
Protected Member Functions inherited from QGLBaseViewport | |
| void | recalculateAspectRatio () |
| virtual void | resizeGL (int, int) |
| void | mousePressEvent (QMouseEvent *event) |
| virtual void | focusInEvent (QFocusEvent *) |
| virtual void | focusOutEvent (QFocusEvent *) |
Protected Attributes | |
| uint | m_selectedObjectUID |
| QPoint | m_lastPos |
| AxisTypes | m_selectedAxis |
| DrawMode | m_drawMode |
| QColorProvider | m_colorProvider |
| CGameObject * | m_selectedGameObject |
| Transform | m_oldTransform |
| std::string | m_previousActiveCameraId |
| QMap< uint, QColor > | m_nodesColor |
Protected Attributes inherited from QGLGameViewport | |
| CLScene * | m_colladaScene |
Protected Attributes inherited from QGLBaseViewport | |
| GLdouble | m_projectionRatio |
| QPoint | m_lastPos |
| QColor | m_clearColor |
| Matrix4 | m_modelViewMatrix |
| QGLShaderProgram * | m_selectedProgram |
| QGLShaderProgram * | m_texturedProgram |
| QGLShaderProgram * | m_solidColorsProgram |
Definition at line 39 of file qglgameeditorviewport.h.
| Enumerator | |
|---|---|
| NOAXIS | |
| X | |
| Y | |
| Z | |
Definition at line 42 of file qglgameeditorviewport.h.
| Enumerator | |
|---|---|
| TEXTURED | |
| SOLIDCOLORS | |
Definition at line 44 of file qglgameeditorviewport.h.
| Enumerator | |
|---|---|
| NOMANIPULATOR | |
| TRANSLATION | |
| ROTATION | |
| SCALE | |
| UNIFORMSCALE | |
Definition at line 43 of file qglgameeditorviewport.h.
| QGLGameEditorViewport::QGLGameEditorViewport | ( | CLScene * | collada_scene, |
| CGameScene * | game_scene | ||
| ) |
Definition at line 52 of file qglgameeditorviewport.cpp.
| QGLGameEditorViewport::~QGLGameEditorViewport | ( | ) |
Definition at line 798 of file qglgameeditorviewport.cpp.
| bool QGLGameEditorViewport::autoRecalcAABBOnResize | ( | ) | const |
Definition at line 96 of file qglgameeditorviewport.cpp.
|
protected |
Calculates the differential scale vector based upon the given axis direction and differential size.
Definition at line 430 of file qglgameeditorviewport.cpp.
|
protected |
Calculates the differential translation vector based upon the object's position, rotation, and the motion vector.
Definition at line 453 of file qglgameeditorviewport.cpp.
| int QGLGameEditorViewport::cameraSpeed | ( | ) | const |
Definition at line 81 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 207 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 295 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Draws the crosshair during gameplay TODO The crosshair must be drawn using a SpriteRenderer/GUIManager or something more appropiate, this is just a workaround.
Reimplemented from QGLGameViewport.
Definition at line 699 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 229 of file qglgameeditorviewport.cpp.
|
protected |
Draws the Translation, Rotation or Scale manipulators for the given game object's unique id.
Definition at line 250 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 367 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 678 of file qglgameeditorviewport.cpp.
|
protected |
|
protected |
Determines how parallel is the mouse movement to a manipulator axis.
Definition at line 417 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 498 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 724 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 705 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 759 of file qglgameeditorviewport.cpp.
|
signal |
| int QGLGameEditorViewport::nextCameraSpeed | ( | ) |
Definition at line 87 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLBaseViewport.
Definition at line 132 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 217 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 143 of file qglgameeditorviewport.cpp.
|
protected |
Returns the picked axis by the user.
Definition at line 633 of file qglgameeditorviewport.cpp.
|
signal |
| uint QGLGameEditorViewport::selectedGameObjectUID | ( | ) | const |
Definition at line 75 of file qglgameeditorviewport.cpp.
| QGLGameEditorViewport::ManipulatorTypes QGLGameEditorViewport::selectedManipulatorType | ( | ) | const |
Definition at line 120 of file qglgameeditorviewport.cpp.
| Transform::TransformMode QGLGameEditorViewport::selectedTransformMode | ( | ) | const |
Definition at line 108 of file qglgameeditorviewport.cpp.
|
protected |
Returns the selected game object (if any) at the given coordinates.
Definition at line 654 of file qglgameeditorviewport.cpp.
| void QGLGameEditorViewport::setAutoRecalcAABBOnResize | ( | bool | v | ) |
Definition at line 102 of file qglgameeditorviewport.cpp.
| void QGLGameEditorViewport::setSelectedGameObjectUID | ( | uint | gameobj_uid | ) |
Definition at line 69 of file qglgameeditorviewport.cpp.
| void QGLGameEditorViewport::setSelectedManipulatorType | ( | const ManipulatorTypes & | value | ) |
Definition at line 126 of file qglgameeditorviewport.cpp.
| void QGLGameEditorViewport::setSelectedTransformMode | ( | const Transform::TransformMode & | value | ) |
Definition at line 114 of file qglgameeditorviewport.cpp.
|
protectedvirtual |
Reimplemented from QGLGameViewport.
Definition at line 688 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 792 of file qglgameeditorviewport.cpp.
|
protected |
Definition at line 136 of file qglgameeditorviewport.h.
|
protected |
Definition at line 135 of file qglgameeditorviewport.h.
|
protected |
Definition at line 133 of file qglgameeditorviewport.h.
|
protected |
Definition at line 140 of file qglgameeditorviewport.h.
|
protected |
Definition at line 138 of file qglgameeditorviewport.h.
|
protected |
Definition at line 139 of file qglgameeditorviewport.h.
|
protected |
Definition at line 134 of file qglgameeditorviewport.h.
|
protected |
Definition at line 137 of file qglgameeditorviewport.h.
|
protected |
Definition at line 132 of file qglgameeditorviewport.h.