2012-06-08 12:28:46 +00:00
|
|
|
#ifndef _PAYSAGES_QT_EXPLORERCHUNKTERRAIN_H_
|
|
|
|
#define _PAYSAGES_QT_EXPLORERCHUNKTERRAIN_H_
|
|
|
|
|
|
|
|
#include "baseexplorerchunk.h"
|
|
|
|
#include "../lib_paysages/renderer.h"
|
2013-01-19 22:42:50 +00:00
|
|
|
#include "../lib_paysages/tools/euclid.h"
|
2012-06-08 12:28:46 +00:00
|
|
|
|
|
|
|
class ExplorerChunkTerrain:public BaseExplorerChunk
|
|
|
|
{
|
|
|
|
public:
|
2013-02-05 21:25:30 +00:00
|
|
|
ExplorerChunkTerrain(Renderer* renderer, double x, double z, double size, int nbchunks, double water_height);
|
2012-06-08 12:28:46 +00:00
|
|
|
~ExplorerChunkTerrain();
|
2013-01-19 22:42:50 +00:00
|
|
|
|
2012-06-08 12:28:46 +00:00
|
|
|
void onCameraEvent(CameraDefinition* camera);
|
|
|
|
void onResetEvent();
|
|
|
|
bool onMaintainEvent();
|
|
|
|
void onRenderEvent(QGLWidget* widget);
|
2012-06-17 09:40:40 +00:00
|
|
|
double getDisplayedSizeHint(CameraDefinition* camera);
|
|
|
|
Color getTextureColor(double x, double y);
|
2013-01-19 22:42:50 +00:00
|
|
|
|
2012-06-08 12:28:46 +00:00
|
|
|
private:
|
|
|
|
Vector3 getCenter();
|
2013-01-19 22:42:50 +00:00
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
double _startx;
|
|
|
|
double _startz;
|
|
|
|
double _size;
|
|
|
|
double _overall_step;
|
2013-01-19 22:42:50 +00:00
|
|
|
|
2013-02-05 21:25:30 +00:00
|
|
|
double _distance_to_camera;
|
|
|
|
double _water_height;
|
|
|
|
bool _overwater;
|
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
double* _tessellation;
|
2012-06-08 12:28:46 +00:00
|
|
|
int _tessellation_max_size;
|
|
|
|
int _tessellation_current_size;
|
2012-06-17 09:40:40 +00:00
|
|
|
double _tessellation_step;
|
2013-01-19 22:42:50 +00:00
|
|
|
|
2012-06-08 12:28:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|