Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9235 in orxonox.OLD for trunk/src/world_entities/environments


Ignore:
Timestamp:
Jul 5, 2006, 4:39:02 PM (18 years ago)
Author:
bensch
Message:

merged the presentation back

Location:
trunk/src/world_entities/environments
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environments/mapped_water.cc

    r9110 r9235  
    337337{
    338338  // it's not too nice, but it works fine
    339   PRINTF(0)("\nMappedWater XML Code:\n<MappedWater>\n  <waterpos>%f, %f, %f</waterpos>\n  <watersize>%f, %f</watersize>\n  <wateruv>%f</wateruv>\n  <waterflow>%f</waterflow>\n  <lightpos>%f, %f, %f</lightpos>\n  <waterangle>%f</waterangle>\n  <normalmapscale>%f</normalmapscale>\n  <shinesize>%f</waterpos>\n  <shinestrength>%f</shinestrength>\n  <reflstrength>%f</reflstrength>\n  <refraction>%f</refraction>\n  <watercolor>%f, %f, %f</watercolor>\n</MappedWater>\n", this->waterVerts[0], this->waterHeight, this->waterVerts[1], this->xWidth, this->zWidth, this->waterUV, this->waterFlow, this->lightPos.x, this->lightPos.y, this->lightPos.z, this->waterAngle, this->kNormalMapScale, this->shineSize, this->shineStrength, this->reflStrength, this->refraction, this->waterColor.x, this->waterColor.y, this->waterColor.z);
     339  PRINT(0)("\nMappedWater XML Code:\n<MappedWater>\n");
     340
     341  PRINT(0)("  <waterpos>%f, %f, %f</waterpos>\n", this->waterVerts[0], this->waterHeight, this->waterVerts[1]);
     342  PRINT(0)("  <watersize>%f, %f</watersize>\n", this->xWidth, this->zWidth);
     343  PRINT(0)("  <wateruv>%f</wateruv>\n", this->waterUV);
     344  PRINT(0)("  <waterflow>%f</waterflow>\n", this->waterFlow);
     345  PRINT(0)("  <lightpos>%f, %f, %f</lightpos>\n", this->lightPos.x, this->lightPos.y, this->lightPos.z);
     346  PRINT(0)("  <waterangle>%f</waterangle>\n", this->waterAngle);
     347  PRINT(0)("  <normalmapscale>%f</normalmapscale>\n", this->kNormalMapScale);
     348  PRINT(0)("  <shinesize>%f</shinesize>\n", this->shineSize);
     349  PRINT(0)("  <shinestrength>%f</shinestrength>\n", this->shineStrength);
     350  PRINT(0)("  <reflstrength>%f</reflstrength>\n", this->reflStrength);
     351  PRINT(0)("  <refraction>%f</refraction>\n", this->refraction);
     352  PRINT(0)("  <watercolor>%f, %f, %f</watercolor>\n", this->waterColor.x, this->waterColor.y, this->waterColor.z);
     353
     354  PRINT(0)("</MappedWater>\n");
    340355}
    341356
     
    475490
    476491        OrxGui::GLGuiSlider* lightPosX = new OrxGui::GLGuiSlider();
    477         lightPosX->setRange(-600, 600);
     492        lightPosX->setRange(-4000, 4000);
    478493        lightPosX->setValue(this->lightPos.x);
    479494        lightPosX->setStep(15);
     
    482497
    483498        OrxGui::GLGuiSlider* lightPosY = new OrxGui::GLGuiSlider();
    484         lightPosY->setRange(-600, 600);
     499        lightPosY->setRange(-4000, 4000);
    485500        lightPosY->setStep(15);
    486501        lightPosY->setValue(this->lightPos.y);
     
    489504
    490505        OrxGui::GLGuiSlider* lightPosZ = new OrxGui::GLGuiSlider();
    491         lightPosZ->setRange(-600, 600);
     506        lightPosZ->setRange(-4000, 4000);
    492507        lightPosZ->setStep(15);
    493508        lightPosZ->setValue(this->lightPos.z);
     
    504519
    505520        OrxGui::GLGuiSlider* waterHeight = new OrxGui::GLGuiSlider();
    506         waterHeight->setRange(-500, 500);
     521        waterHeight->setRange(100, 370);
    507522        waterHeight->setValue(this->waterHeight);
    508         waterHeight->setStep(10);
     523        waterHeight->setStep(4);
    509524        waterHeight->connect(SIGNAL(waterHeight, valueChanged), this, SLOT(MappedWater, setWaterHeight));
    510525        waterHeightBox->pack(waterHeight);
     
    547562  glDisable(GL_BLEND);
    548563
     564  // TODO change texture coords, so water doesnt look distorted when xWidth != zWidth
    549565  glBegin(GL_QUADS);
    550566  // The back left vertice for the water
  • trunk/src/world_entities/environments/model_entity.cc

    r7193 r9235  
    3232{
    3333  this->setClassID(CL_MODEL_ENTITY, "ModelEntity");
    34   this->toList(OM_ENVIRON_NOTICK);
     34  this->toList(OM_ENVIRON);
    3535
    3636  this->speed = NULL;
     
    7171void ModelEntity::setMomentum (float angle, float x, float y, float z)
    7272{
     73  Vector v(x,y,z);
     74  v.debug();
     75  v.normalize();
     76  v.debug();
     77
    7378  if (this->momentum == NULL)
    7479    this->momentum = new Quaternion;
    75   *this->momentum = Quaternion(angle, Vector(x, y, z));
     80  *this->momentum = Quaternion(angle, v);
     81
     82  this->momentum->debug();
    7683}
    7784
     
    8289
    8390  if (this->momentum != NULL)
    84     this->shiftDir(*this->momentum * dt);
     91  {
     92    this->shiftDir((*this->momentum * dt ).getNormalized());
     93    //this->getAbsDir().debug();
     94  }
    8595}
Note: See TracChangeset for help on using the changeset viewer.