X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObjects%2Fmaterial.cxx;h=737e8471b9e3f4e361c29260d52bea9a19060b05;hb=9a3b25e4fa4b9acb7b444e6e33bcba1c8310b888;hp=0a300253aac15c0fa9791f4de7d1d07709b467c0;hpb=c90db01dc8d5462a3da22771ffa7c96f5ea31217;p=flightgear.git diff --git a/src/Objects/material.cxx b/src/Objects/material.cxx index 0a300253a..737e8471b 100644 --- a/src/Objects/material.cxx +++ b/src/Objects/material.cxx @@ -25,7 +25,7 @@ # include #endif -#include +#include #ifdef FG_MATH_EXCEPTION_CLASH # include @@ -36,13 +36,13 @@ #endif #include -#include +#include #include STL_STRING -#include -#include -#include +#include +#include +#include #include "material.hxx" #include "texload.h" @@ -60,7 +60,7 @@ FGMaterial::FGMaterial ( void ) ambient[0] = ambient[1] = ambient[2] = ambient[3] = 0.0; diffuse[0] = diffuse[1] = diffuse[2] = diffuse[3] = 0.0; specular[0] = specular[1] = specular[2] = specular[3] = 0.0; - emissive[0] = emissive[1] = emissive[2] = emissive[3] = 0.0; + emission[0] = emission[1] = emission[2] = emission[3] = 0.0; } @@ -86,9 +86,9 @@ operator >> ( istream& in, FGMaterial& m ) } else if ( token == "specular" ) { in >> token >> m.specular[0] >> m.specular[1] >> m.specular[2] >> m.specular[3]; - } else if ( token == "emissive" ) { - in >> token >> m.emissive[0] >> m.emissive[1] - >> m.emissive[2] >> m.emissive[3]; + } else if ( token == "emission" ) { + in >> token >> m.emission[0] >> m.emission[1] + >> m.emission[2] >> m.emission[3]; } else if ( token == "alpha" ) { in >> token >> token; if ( token == "yes" ) { @@ -106,6 +106,7 @@ operator >> ( istream& in, FGMaterial& m ) return in; } + void FGMaterial::load_texture( const string& root ) { @@ -245,6 +246,25 @@ FGMaterial::load_texture( const string& root ) } +// Destructor +void FGMaterial::dump_info () { + FG_LOG( FG_TERRAIN, FG_INFO, "{" << endl << " texture = " + << texture_name ); + FG_LOG( FG_TERRAIN, FG_INFO, " xsize = " << xsize ); + FG_LOG( FG_TERRAIN, FG_INFO, " ysize = " << ysize ); + FG_LOG( FG_TERRAIN, FG_INFO, " ambient = " << ambient[0] << " " + << ambient[1] <<" "<< ambient[2] <<" "<< ambient[3] ); + FG_LOG( FG_TERRAIN, FG_INFO, " diffuse = " << diffuse[0] << " " + << diffuse[1] << " " << diffuse[2] << " " << diffuse[3] ); + FG_LOG( FG_TERRAIN, FG_INFO, " specular = " << specular[0] << " " + << specular[1] << " " << specular[2] << " " << specular[3]); + FG_LOG( FG_TERRAIN, FG_INFO, " emission = " << emission[0] << " " + << emission[1] << " " << emission[2] << " " << emission[3]); + FG_LOG( FG_TERRAIN, FG_INFO, " alpha = " << alpha << endl <<"}" ); + +} + + // Destructor FGMaterial::~FGMaterial ( void ) { }