Michaël Lemaire
203dd0ab12
git-svn-id: https://subversion.assembla.com/svn/thunderk/paysages@350 b1fd45b6-86a6-48da-8261-f70d1f35bdcc
41 lines
832 B
C++
41 lines
832 B
C++
#ifndef _PAYSAGES_QT_PREVIEWMATERIAL_H_
|
|
#define _PAYSAGES_QT_PREVIEWMATERIAL_H_
|
|
|
|
#include "basepreview.h"
|
|
|
|
#include "../lib_paysages/lighting.h"
|
|
#include "../lib_paysages/renderer.h"
|
|
|
|
class SmallMaterialPreview:public QWidget
|
|
{
|
|
public:
|
|
SmallMaterialPreview(QWidget* parent, SurfaceMaterial* material);
|
|
~SmallMaterialPreview();
|
|
|
|
QColor getColor(double x, double y);
|
|
|
|
protected:
|
|
virtual void paintEvent(QPaintEvent* event);
|
|
|
|
private:
|
|
SurfaceMaterial* _material;
|
|
LightingDefinition _lighting;
|
|
Renderer _renderer;
|
|
};
|
|
|
|
class PreviewMaterial:public BasePreview
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
PreviewMaterial(QWidget* parent, SurfaceMaterial* material);
|
|
~PreviewMaterial();
|
|
|
|
protected:
|
|
virtual QColor getColor(double x, double y);
|
|
|
|
private:
|
|
SmallMaterialPreview* _small;
|
|
};
|
|
|
|
#endif
|