diff -r 9af5c039b678 -r 96d65f841791 include/material.h --- a/include/material.h Mon May 05 15:31:14 2008 +0200 +++ b/include/material.h Tue May 06 09:39:58 2008 +0200 @@ -62,7 +62,7 @@ */ class LinearColourMap: public ColourMap { - Colour col,cdiff; + Colour col, cdiff; public: LinearColourMap(const Colour &clow, const Colour &chigh): col(clow), cdiff(chigh-clow) {}; @@ -193,7 +193,7 @@ void map(const Vector &point, Float &u, Float &v) { const Vector p = point - center; - u = ( M_PI + atan2(p.z, p.x) ) * invsize; + u = ( PI + atan2(p.z, p.x) ) * invsize; v = p.y * invsize; }; }; @@ -209,7 +209,7 @@ void map(const Vector &point, Float &u, Float &v) { const Vector p = point - center; - u = ( M_PI + atan2(p.z, p.x) ) * invsize; + u = ( PI + atan2(p.z, p.x) ) * invsize; v = acos(p.y / p.mag()) * invsize; }; }; @@ -269,11 +269,11 @@ */ class CloudTexture: public Texture { + ColourMap *colourmap; Float detail; - ColourMap *colourmap; public: CloudTexture(const Float &adetail, ColourMap *cmap): - detail(adetail), colourmap(cmap) {}; + colourmap(cmap), detail(adetail) {}; Colour evaluate(const Vector &point) { Float sum = 0.0; @@ -295,7 +295,7 @@ Float ambient, diffuse, specular, shininess; // Phong constants Float reflectivity; // how much reflective is the surface Float transmissivity, refract_index; // part of light which can be refracted; index of refraction - bool smooth; // triangle smoothing + int smooth; // triangle smoothing Material(const Colour &acolour): colour(acolour), texture(NULL), smooth(false) { @@ -313,7 +313,7 @@ void setReflectivity(const Float refl) { reflectivity = refl; }; void setTransmissivity(const Float trans, const Float rindex) { transmissivity = trans; refract_index = rindex; }; - void setSmooth(bool sm) { smooth = sm; }; + void setSmooth(int sm) { smooth = sm; }; void setTexture(Texture *tex) { texture = tex; }; };