Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8921 in orxonox.OLD for branches/mountain_lake


Ignore:
Timestamp:
Jun 29, 2006, 8:04:30 PM (18 years ago)
Author:
stefalie
Message:

mountain_lake: save params done, but it's not really nice

Location:
branches/mountain_lake/src/world_entities/environments
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/world_entities/environments/mapped_water.cc

    r8920 r8921  
    2727
    2828SHELL_COMMAND(gui, MappedWater, openGui);
     29SHELL_COMMAND(output, MappedWater, saveParams);
    2930
    3031/**
     
    306307  LoadParam(root, "waterpos", this, MappedWater, setWaterPos);
    307308  LoadParam(root, "watersize", this, MappedWater, setWaterSize);
    308   LoadParam(root, "lightpos", this, MappedWater, setLightPos);
    309309  LoadParam(root, "wateruv", this, MappedWater, setWaterUV);
    310310  LoadParam(root, "waterflow", this, MappedWater, setWaterFlow);
     311  LoadParam(root, "lightpos", this, MappedWater, setLightPos);
     312  LoadParam(root, "waterangle", this, MappedWater, setWaterAngle);
    311313  LoadParam(root, "normalmapscale", this, MappedWater, setNormalMapScale);
    312   LoadParam(root, "waterangle", this, MappedWater, setWaterAngle);
    313   LoadParam(root, "watercolor", this, MappedWater, setWaterColor);
    314314  LoadParam(root, "shinesize", this, MappedWater, setShineSize);
    315315  LoadParam(root, "shinestrength", this, MappedWater, setShineStrength);
    316316  LoadParam(root, "reflstrength", this, MappedWater, setReflStrength);
    317317  LoadParam(root, "refraction", this, MappedWater, setRefraction);
     318  LoadParam(root, "watercolor", this, MappedWater, setWaterColor);
     319}
     320
     321/**
     322 * @brief prints the xml code of the water params
     323 */
     324void MappedWater::saveParams()
     325{
     326  PRINTF(0)("MappedWater XML Code:\n<MappedWater>\n");
     327
     328  PRINTF(0)("  <waterpos>%f, %f, %f</waterpos>\n", this->waterVerts[0], this->waterHeight, this->waterVerts[1]);
     329  PRINTF(0)("  <watersize>%f, %f</watersize>\n", this->xWidth, this->zWidth);
     330  PRINTF(0)("  <wateruv>%f</wateruv>\n", this->waterUV);
     331  PRINTF(0)("  <waterflow>%f</waterflow>\n", this->waterFlow);
     332  PRINTF(0)("  <lightpos>%f, %f, %f</lightpos>\n", this->lightPos.x, this->lightPos.y, this->lightPos.z);
     333  PRINTF(0)("  <waterangle>%f</waterangle>\n", this->waterAngle);
     334  PRINTF(0)("  <normalmapscale>%f</normalmapscale>\n", this->kNormalMapScale);
     335  PRINTF(0)("  <shinesize>%f</waterpos>\n", this->shineSize);
     336  PRINTF(0)("  <shinestrength>%f</shinestrength>\n", this->shineStrength);
     337  PRINTF(0)("  <reflstrength>%f</reflstrength>\n", this->reflStrength);
     338  PRINTF(0)("  <refraction>%f</refraction>\n", this->refraction);
     339  PRINTF(0)("  <watercolor>%f, %f, %f</watercolor>\n", this->waterColor.x, this->waterColor.y, this->waterColor.z);
     340
     341  PRINTF(0)("</MappedWater>\n");
    318342}
    319343
  • branches/mountain_lake/src/world_entities/environments/mapped_water.h

    r8920 r8921  
    4141  // worldentity functions
    4242  void loadParams(const TiXmlElement* root);
     43  void saveParams();
    4344  void draw() const;
    4445  void tick(float dt);
Note: See TracChangeset for help on using the changeset viewer.