2022-09-19 13:30:03 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_MODEL_OFFSCREEN_RENDER_H_
|
|
|
|
#define DUST3D_APPLICATION_MODEL_OFFSCREEN_RENDER_H_
|
|
|
|
|
|
|
|
#include <QOffscreenSurface>
|
|
|
|
#include <QSurfaceFormat>
|
|
|
|
#include <QVector3D>
|
2022-09-23 15:54:49 +00:00
|
|
|
#include "model_mesh.h"
|
2022-09-19 13:30:03 +00:00
|
|
|
|
|
|
|
class ModelOffscreenRender: public QOffscreenSurface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ModelOffscreenRender(const QSurfaceFormat &format, QScreen *targetScreen=Q_NULLPTR);
|
|
|
|
~ModelOffscreenRender();
|
|
|
|
void setXRotation(int angle);
|
|
|
|
void setYRotation(int angle);
|
|
|
|
void setZRotation(int angle);
|
|
|
|
void setEyePosition(const QVector3D &eyePosition);
|
|
|
|
void setMoveToPosition(const QVector3D &moveToPosition);
|
|
|
|
void setRenderThread(QThread *thread);
|
2022-09-23 15:54:49 +00:00
|
|
|
void updateMesh(ModelMesh *mesh);
|
2022-09-19 13:30:03 +00:00
|
|
|
QImage toImage(const QSize &size);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|