Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4987 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Aug 12, 2005, 4:12:15 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: introducing smooth-PNode

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

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/camera.cc

    r4986 r4987  
    3636{
    3737  this->setClassID(CL_CAMERA, "Camera");
     38  this->setName("camera");
    3839  this->target = new CameraTarget();
    3940
     
    5051
    5152  this->setViewMode(VIEW_NORMAL);
     53
     54  this->setParentMode(PNODE_MOVEMENT);
    5255}
    5356
     
    116119    case VIEW_NORMAL:
    117120      this->toFovy = 60.0;
    118       this->toRelCoor = Vector(-10, 5, 0);
     121      this->setRelCoorSoft(Vector(-10, 5, 0));
     122      this->target->setRelCoorSoft(Vector(0,0,0));
    119123      break;
    120124    case VIEW_BEHIND:
    121       this->toFovy = 120.0;
    122       this->toRelCoor = Vector(3.5, 0, 0);
    123       this->target->setRelCoor(4,0,0);
    124 /*      this->setParent("main-Turret");
     125//      this->toFovy = 120.0;
     126      this->setRelCoorSoft(Vector(3.5, 0, 0));
     127      this->target->setRelCoorSoft(Vector(10,0,0));
     128
     129      /*this->target->softReparent("main-Turret");
     130      this->setParent("main-Turret");
    125131      this->setParentMode(PNODE_ALL);
    126132      this->target->setParent("Crosshair");*/
     
    128134    case VIEW_FRONT:
    129135      this->toFovy = 95.0;
    130       this->toRelCoor = Vector(12, 5, 0);
     136      this->setRelCoorSoft(Vector(10, 2, 0));
     137      this->target->setRelCoorSoft(Vector(0,0,0));
    131138      break;
    132139    case VIEW_LEFT:
    133140      this->toFovy = 90;
    134       this->toRelCoor = Vector(0, 2, -10);
     141      this->setRelCoorSoft(Vector(0, 1, -10));
     142      this->target->setRelCoorSoft(Vector(0,0,0));
    135143      break;
    136144    case VIEW_RIGHT:
    137145      this->toFovy = 90;
    138       this->toRelCoor = Vector(0, 2, 10);
     146      this->setRelCoorSoft(Vector(0, 1, 10));
     147      this->target->setRelCoorSoft(Vector(0,0,0));
    139148      break;
    140149    case VIEW_TOP:
    141150      this->toFovy= 120;
    142       this->toRelCoor = Vector(0, 4, 0);
     151      this->setRelCoorSoft(Vector(0, 10, 0));
     152      this->target->setRelCoorSoft(Vector(0,0,0));
    143153    }
    144154}
     
    154164  if (tmpFovy > .001)
    155165    this->fovy += (this->toFovy - this->fovy) * dt;
    156   Vector tmpPos = (this->toRelCoor - this->getRelCoor()) * dt;
    157   if (tmpPos.len() >= .001)
    158     {
    159       tmpPos = tmpPos + this->getRelCoor();
    160       this->setRelCoor(tmpPos);
    161     }
    162166}
    163167
  • orxonox/trunk/src/world_entities/camera.h

    r4986 r4987  
    5757  float             farClip;         //!< The far clipping plane.
    5858
    59   Vector            toRelCoor;       //!< The relativeCoordinate to move the camera to.
    6059  float             toFovy;          //!< The fovy-mode to iterate to.
    6160};
Note: See TracChangeset for help on using the changeset viewer.