2013-11-05 10:45:26 +00:00
|
|
|
#ifndef EXPLORERCHUNKTERRAIN_H
|
|
|
|
#define EXPLORERCHUNKTERRAIN_H
|
2012-06-08 12:28:46 +00:00
|
|
|
|
2013-11-05 10:45:26 +00:00
|
|
|
#include "BaseExplorerChunk.h"
|
2013-11-14 17:47:03 +00:00
|
|
|
|
|
|
|
#include "Vector3.h"
|
2012-06-08 12:28:46 +00:00
|
|
|
|
2013-11-05 10:45:26 +00:00
|
|
|
namespace paysages {
|
|
|
|
namespace opengl {
|
|
|
|
|
2013-11-14 17:47:03 +00:00
|
|
|
class OPENGLSHARED_EXPORT ExplorerChunkTerrain:public BaseExplorerChunk
|
2012-06-08 12:28:46 +00:00
|
|
|
{
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2013-11-05 10:45:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // EXPLORERCHUNKTERRAIN_H
|