2015-07-26 21:39:49 +00:00
|
|
|
#ifndef CWORLDEDITOR_H
|
|
|
|
#define CWORLDEDITOR_H
|
|
|
|
|
2015-09-01 17:05:48 +00:00
|
|
|
#include "INodeEditor.h"
|
|
|
|
|
2015-08-28 22:57:24 +00:00
|
|
|
#include <QComboBox>
|
2015-09-01 17:05:48 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QUndoStack>
|
2015-07-26 21:39:49 +00:00
|
|
|
|
2015-08-16 04:29:37 +00:00
|
|
|
#include "CGizmo.h"
|
2015-07-26 21:39:49 +00:00
|
|
|
#include <Common/CRay.h>
|
|
|
|
#include <Common/CTimer.h>
|
|
|
|
#include <Common/EKeyInputs.h>
|
|
|
|
#include <Common/SRayIntersection.h>
|
2015-08-20 01:01:58 +00:00
|
|
|
#include <Common/ETransformSpace.h>
|
2015-07-26 21:39:49 +00:00
|
|
|
#include <Core/CRenderer.h>
|
|
|
|
#include <Core/CSceneManager.h>
|
2015-12-13 20:52:17 +00:00
|
|
|
#include <Core/TResPtr.h>
|
2015-07-26 21:39:49 +00:00
|
|
|
#include <Resource/CGameArea.h>
|
|
|
|
#include <Resource/CWorld.h>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class CWorldEditor;
|
|
|
|
}
|
|
|
|
|
2015-09-01 17:05:48 +00:00
|
|
|
class CWorldEditor : public INodeEditor
|
2015-07-26 21:39:49 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2015-09-01 17:05:48 +00:00
|
|
|
Ui::CWorldEditor *ui;
|
|
|
|
|
2015-12-13 20:52:17 +00:00
|
|
|
TResPtr<CWorld> mpWorld;
|
|
|
|
TResPtr<CGameArea> mpArea;
|
2015-09-01 17:05:48 +00:00
|
|
|
QTimer mRefreshTimer;
|
2015-07-26 21:39:49 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit CWorldEditor(QWidget *parent = 0);
|
|
|
|
~CWorldEditor();
|
|
|
|
bool eventFilter(QObject *pObj, QEvent *pEvent);
|
|
|
|
void SetArea(CWorld *pWorld, CGameArea *pArea);
|
|
|
|
CGameArea* ActiveArea();
|
|
|
|
|
2015-09-01 17:05:48 +00:00
|
|
|
// Update UI
|
2015-12-07 05:44:56 +00:00
|
|
|
void UpdateStatusBar();
|
|
|
|
|
|
|
|
public slots:
|
2015-09-01 17:05:48 +00:00
|
|
|
void UpdateGizmoUI();
|
|
|
|
void UpdateSelectionUI();
|
2015-07-26 21:39:49 +00:00
|
|
|
|
2015-09-01 17:05:48 +00:00
|
|
|
protected:
|
|
|
|
void GizmoModeChanged(CGizmo::EGizmoMode mode);
|
2015-07-26 21:39:49 +00:00
|
|
|
void UpdateCursor();
|
|
|
|
|
|
|
|
private slots:
|
2015-09-01 17:05:48 +00:00
|
|
|
void RefreshViewport();
|
2015-11-27 12:26:32 +00:00
|
|
|
void UpdateCameraOrbit();
|
2015-07-29 13:51:59 +00:00
|
|
|
void OnCameraSpeedChange(double speed);
|
2015-08-25 01:17:15 +00:00
|
|
|
void OnTransformSpinBoxModified(CVector3f value);
|
|
|
|
void OnTransformSpinBoxEdited(CVector3f value);
|
2015-07-26 21:39:49 +00:00
|
|
|
void on_ActionDrawWorld_triggered();
|
|
|
|
void on_ActionDrawCollision_triggered();
|
|
|
|
void on_ActionDrawObjects_triggered();
|
|
|
|
void on_ActionDrawLights_triggered();
|
|
|
|
void on_ActionDrawSky_triggered();
|
|
|
|
void on_ActionNoLighting_triggered();
|
|
|
|
void on_ActionBasicLighting_triggered();
|
|
|
|
void on_ActionWorldLighting_triggered();
|
|
|
|
void on_ActionNoBloom_triggered();
|
|
|
|
void on_ActionBloomMaps_triggered();
|
2015-07-28 16:22:08 +00:00
|
|
|
void on_ActionFakeBloom_triggered();
|
2015-07-26 21:39:49 +00:00
|
|
|
void on_ActionBloom_triggered();
|
|
|
|
void on_ActionDisableBackfaceCull_triggered();
|
|
|
|
void on_ActionDisableAlpha_triggered();
|
|
|
|
void on_ActionEditLayers_triggered();
|
2015-08-16 04:29:37 +00:00
|
|
|
void on_ActionIncrementGizmo_triggered();
|
|
|
|
void on_ActionDecrementGizmo_triggered();
|
2015-09-26 22:55:14 +00:00
|
|
|
void on_ActionDrawObjectCollision_triggered();
|
2015-11-26 09:05:26 +00:00
|
|
|
void on_ActionGameMode_triggered();
|
2015-07-26 21:39:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CWORLDEDITOR_H
|