runtime: Formatting
This commit is contained in:
+25
-18
@@ -1,41 +1,48 @@
|
||||
|
||||
#include "std.hpp"
|
||||
#include "terrain.hpp"
|
||||
#include "std.hpp"
|
||||
#include "terrainrep.hpp"
|
||||
|
||||
Terrain::Terrain( int size_shift ):
|
||||
rep( new TerrainRep( size_shift ) ){
|
||||
}
|
||||
Terrain::Terrain(int size_shift) : rep(new TerrainRep(size_shift)) {}
|
||||
|
||||
Terrain::~Terrain(){
|
||||
Terrain::~Terrain()
|
||||
{
|
||||
delete rep;
|
||||
}
|
||||
|
||||
void Terrain::setDetail( int n,bool m ){
|
||||
rep->setDetail( n,m );
|
||||
void Terrain::setDetail(int n, bool m)
|
||||
{
|
||||
rep->setDetail(n, m);
|
||||
}
|
||||
|
||||
void Terrain::setShading( bool t ){
|
||||
rep->setShading( t );
|
||||
void Terrain::setShading(bool t)
|
||||
{
|
||||
rep->setShading(t);
|
||||
}
|
||||
|
||||
void Terrain::setHeight( int x,int z,float h,bool realtime ){
|
||||
if( x>=0 && z>=0 && x<=rep->getSize() && z<=rep->getSize() ) rep->setHeight( x,z,h,realtime );
|
||||
void Terrain::setHeight(int x, int z, float h, bool realtime)
|
||||
{
|
||||
if (x >= 0 && z >= 0 && x <= rep->getSize() && z <= rep->getSize())
|
||||
rep->setHeight(x, z, h, realtime);
|
||||
}
|
||||
|
||||
int Terrain::getSize()const{
|
||||
int Terrain::getSize() const
|
||||
{
|
||||
return rep->getSize();
|
||||
}
|
||||
|
||||
float Terrain::getHeight( int x,int z )const{
|
||||
return (x>=0 && z>=0 && x<=rep->getSize() && z<=rep->getSize() ) ? rep->getHeight( x,z ) : 0;
|
||||
float Terrain::getHeight(int x, int z) const
|
||||
{
|
||||
return (x >= 0 && z >= 0 && x <= rep->getSize() && z <= rep->getSize()) ? rep->getHeight(x, z) : 0;
|
||||
}
|
||||
|
||||
bool Terrain::render( const RenderContext &rc ){
|
||||
rep->render( this,rc );
|
||||
bool Terrain::render(const RenderContext& rc)
|
||||
{
|
||||
rep->render(this, rc);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Terrain::collide( const Line &line,float radius,Collision *curr_coll,const Transform &tf ){
|
||||
return rep->collide( line,radius,curr_coll,tf );
|
||||
bool Terrain::collide(const Line& line, float radius, Collision* curr_coll, const Transform& tf)
|
||||
{
|
||||
return rep->collide(line, radius, curr_coll, tf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user