| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#ifndef _fracplanet_main_h_ |
| 25 |
#define _fracplanet_main_h_ |
| 26 |
|
| 27 |
#include "common.h" |
| 28 |
#include "control_about.h" |
| 29 |
#include "control_render.h" |
| 30 |
#include "control_save.h" |
| 31 |
#include "control_terrain.h" |
| 32 |
#include "parameters_render.h" |
| 33 |
#include "parameters_save.h" |
| 34 |
#include "parameters_terrain.h" |
| 35 |
#include "random.h" |
| 36 |
|
| 37 |
#include "triangle_mesh_cloud.h" |
| 38 |
#include "triangle_mesh_terrain.h" |
| 39 |
#include "triangle_mesh_viewer.h" |
| 40 |
|
| 41 |
|
| 42 |
class FracplanetMain : public QWidget,public Progress |
| 43 |
{ |
| 44 |
private: |
| 45 |
|
| 46 |
Q_OBJECT |
| 47 |
|
| 48 |
public: |
| 49 |
|
| 50 |
FracplanetMain(QWidget* parent,QApplication* app,const boost::program_options::variables_map& opts,bool verbose); |
| 51 |
~FracplanetMain(); |
| 52 |
|
| 53 |
virtual void progress_start(uint target,const std::string&); |
| 54 |
virtual void progress_stall(const std::string& reason); |
| 55 |
virtual void progress_step(uint step); |
| 56 |
virtual void progress_complete(const std::string&); |
| 57 |
|
| 58 |
public slots: |
| 59 |
|
| 60 |
|
| 61 |
void regenerate(); |
| 62 |
|
| 63 |
|
| 64 |
void save_pov(); |
| 65 |
|
| 66 |
|
| 67 |
void save_blender(); |
| 68 |
|
| 69 |
|
| 70 |
void save_texture(); |
| 71 |
|
| 72 |
private: |
| 73 |
|
| 74 |
|
| 75 |
const bool _verbose; |
| 76 |
|
| 77 |
QApplication*const application; |
| 78 |
|
| 79 |
|
| 80 |
boost::scoped_ptr<const TriangleMeshTerrain> mesh_terrain; |
| 81 |
|
| 82 |
|
| 83 |
boost::scoped_ptr<const TriangleMeshCloud> mesh_cloud; |
| 84 |
|
| 85 |
|
| 86 |
std::vector<const TriangleMesh*> meshes; |
| 87 |
|
| 88 |
ParametersTerrain parameters_terrain; |
| 89 |
ParametersCloud parameters_cloud; |
| 90 |
ParametersRender parameters_render; |
| 91 |
ParametersSave parameters_save; |
| 92 |
|
| 93 |
ControlTerrain* control_terrain; |
| 94 |
ControlRender* control_render; |
| 95 |
ControlSave* control_save; |
| 96 |
ControlAbout* control_about; |
| 97 |
|
| 98 |
boost::scoped_ptr<TriangleMeshViewer> viewer; |
| 99 |
|
| 100 |
QTabWidget* tab; |
| 101 |
|
| 102 |
uint last_step; |
| 103 |
|
| 104 |
std::unique_ptr<QProgressDialog> progress_dialog; |
| 105 |
std::string progress_info; |
| 106 |
bool progress_was_stalled; |
| 107 |
}; |
| 108 |
|
| 109 |
#endif |