Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 14, 2005, 8:57:25 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: debug information in importer set like they should be

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/importer/material.cc

    r3536 r3548  
    1818
    1919#include "texture.h"
     20#include "debug.h"
    2021#include <stdlib.h>
    2122#include <string.h>
     
    5152Material::~Material()
    5253{
    53   PRINTF(2)("delete Material %s.\n", this->name);
     54  PRINTF(4)("delete Material %s.\n", this->name);
    5455  if (this->name)
    5556    delete []this->name;
     
    8384void Material::init(void)
    8485{
    85   PRINTF(2)("initializing new Material.\n");
     86  PRINTF(4)("initializing new Material.\n");
    8687  this->nextMat = NULL;
    8788  this->name ="";
     
    112113Material* Material::search(char* mtlName)
    113114{
    114   PRINTF(2)("Searching for material %s", mtlName);
     115  PRINTF(5)("Searching for material %s", mtlName);
    115116  Material* searcher = this;
    116117  while (searcher != NULL)
    117118    {
    118       PRINT(2)(".");
     119      PRINT(5)(".");
    119120      if (!strcmp (searcher->getName(), mtlName))
    120121        {
    121           PRINT(2)("found.\n");
     122          PRINT(5)("found.\n");
    122123          return searcher;
    123124        }
    124125      searcher = searcher->nextMat;
    125126    }
    126   PRINT(2)("not found\n");
     127  PRINT(2)("material %s not found\n", mtlName);
    127128  return NULL;
    128129}
     
    171172void Material::setName (char* mtlName)
    172173{
    173   PRINTF(3)("setting Material Name to %s.\n", this->name);
     174  PRINTF(4)("setting Material Name to %s.\n", this->name);
    174175  this->name = new char [strlen(mtlName)+1];
    175176  strcpy(this->name, mtlName);
     
    190191void Material::setIllum (int illum)
    191192{
    192   PRINTF(3)("setting illumModel of Material %s to %i\n", this->name, illum);
     193  PRINTF(4)("setting illumModel of Material %s to %i\n", this->name, illum);
    193194  this->illumModel = illum;
    194   //  PRINTF(3)("setting illumModel to: %i\n", illumModel);
    195195}
    196196/**
     
    210210void Material::setDiffuse (float r, float g, float b)
    211211{
    212   PRINTF(3)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     212  PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    213213  this->diffuse[0] = r;
    214214  this->diffuse[1] = g;
     
    236236void Material::setAmbient (float r, float g, float b)
    237237{
    238   PRINTF(3)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     238  PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    239239  this->ambient[0] = r;
    240240  this->ambient[1] = g;
     
    261261void Material::setSpecular (float r, float g, float b)
    262262{
    263   PRINTF(3)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
     263  PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->name, r, g, b);
    264264  this->specular[0] = r;
    265265  this->specular[1] = g;
     
    301301void Material::setTransparency (float trans)
    302302{
    303   PRINTF(3)("setting Transparency of Material %s to %f.\n", this->name, trans);
     303  PRINTF(4)("setting Transparency of Material %s to %f.\n", this->name, trans);
    304304  this->transparency = trans;
    305305}
     
    330330void Material::setDiffuseMap(char* dMap)
    331331{
    332   PRINTF(3)("setting Diffuse Map %s\n", dMap);
     332  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    333333  diffuseTexture = new Texture();
    334334  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
Note: See TracChangeset for help on using the changeset viewer.