https://github.com/ialhashim/topo-blend
Revision 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC, committed by ennetws on 13 March 2015, 18:17:18 UTC
1 parent c702819
Raw File
Tip revision: 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC
Create README.md
Tip revision: 39b1361
ShapeRenderer.h
#pragma once
#include <QGLWidget>
#include <QVector3D>
#include "GLVertex.h"

class ShapeRenderer : public QGLWidget
{
    Q_OBJECT
public:
	explicit ShapeRenderer(QString filename, QColor color, bool isFlatShading = false, int resolution = 256);
	static QPixmap render(QString filename, bool isFlatShading = false, GLVertex cameraDelta = GLVertex(0,0,0));

protected:
    void initializeGL();
    void paintGL();
	void setupCamera();

    QColor color;
    std::vector< GLVertex > vertices;
    std::vector< GLuint > indices;
	QVector3D bmin,bmax;

	bool isFlatShading;
};
back to top