2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
#ifndef TERRAIN_H
|
|
|
|
|
#define TERRAIN_H
|
|
|
|
|
|
2019-01-18 15:55:06 +01:00
|
|
|
#include "model.hpp"
|
2014-01-31 08:23:00 +13:00
|
|
|
|
|
|
|
|
struct TerrainRep;
|
|
|
|
|
|
|
|
|
|
class Terrain : public Model{
|
|
|
|
|
public:
|
|
|
|
|
Terrain( int size_shift );
|
|
|
|
|
~Terrain();
|
|
|
|
|
|
|
|
|
|
Terrain *getTerrain(){ return this; }
|
|
|
|
|
|
|
|
|
|
void setDetail( int n,bool morph );
|
|
|
|
|
void setHeight( int x,int z,float h,bool realtime );
|
|
|
|
|
void setShading( bool shading );
|
|
|
|
|
|
|
|
|
|
int getSize()const;
|
|
|
|
|
float getHeight( int x,int z )const;
|
|
|
|
|
|
|
|
|
|
//model interface
|
|
|
|
|
bool render( const RenderContext &rc );
|
|
|
|
|
|
|
|
|
|
//object interface
|
|
|
|
|
bool collide( const Line &line,float radius,Collision *curr_coll,const Transform &tf );
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TerrainRep *rep;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|