2015-09-01 17:05:48 +00:00
|
|
|
#ifndef CMODELEDITORVIEWPORT_H
|
|
|
|
#define CMODELEDITORVIEWPORT_H
|
|
|
|
|
|
|
|
#include "CBasicViewport.h"
|
2015-09-01 23:21:10 +00:00
|
|
|
#include <Scene/CModelNode.h>
|
2015-09-01 17:05:48 +00:00
|
|
|
|
|
|
|
class CModelEditorViewport : public CBasicViewport
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
enum EDrawMode {
|
|
|
|
eDrawMesh, eDrawSphere, eDrawSquare
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
EDrawMode mMode;
|
|
|
|
CModelNode *mpModelNode;
|
|
|
|
CMaterial *mpActiveMaterial;
|
|
|
|
CRenderer *mpRenderer;
|
|
|
|
|
|
|
|
public:
|
|
|
|
CModelEditorViewport(QWidget *pParent = 0);
|
|
|
|
~CModelEditorViewport();
|
|
|
|
void SetNode(CModelNode *pNode);
|
|
|
|
void SetActiveMaterial(CMaterial *pMat);
|
|
|
|
void SetDrawMode(EDrawMode mode);
|
|
|
|
void SetClearColor(CColor color);
|
|
|
|
void Paint();
|
|
|
|
void OnResize();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CMODELEDITORVIEWPORT_H
|