runtime: Formatting

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-01-18 17:04:17 +01:00
parent cc1340190e
commit 2196cb8419
119 changed files with 10326 additions and 7798 deletions
+25 -18
View File
@@ -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);
}