Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3641 in orxonox.OLD


Ignore:
Timestamp:
Mar 23, 2005, 1:55:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: kamera-update: rockt

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

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

    r3639 r3641  
    3636  this->target = new CameraTarget();
    3737
    38   this->toRelCoor = new Vector;
    39 
    40   this->setFovy(60);
     38  this->setFovy(90);
    4139  this->setAspectRatio(1.2f);
    4240  this->setClipRegion(.1, 2000);
     41
    4342  this->setViewMode(VIEW_NORMAL);
    44 
    4543}
    4644
     
    106104    case VIEW_NORMAL:
    107105      this->toFovy = 60.0;
    108       *this->toRelCoor = Vector (-10, 5, 0);
     106      this->toRelCoor = Vector (-10, 5, 0);
    109107      break;
    110108    case VIEW_BEHIND:
    111109      this->toFovy = 90.0;
    112       *this->toRelCoor = Vector (-6, 2, 0);
     110      this->toRelCoor = Vector (-6, 2, 0);
    113111      break;
    114112    case VIEW_FRONT:
    115113      this->toFovy = 95.0;
    116       *this->toRelCoor = Vector (10, 5, 0);
     114      this->toRelCoor = Vector (10, 5, 0);
    117115      break;
    118116    case VIEW_LEFT:
    119117      this->toFovy = 90;
    120       *this->toRelCoor = Vector (0, 5, -10);
     118      this->toRelCoor = Vector (0, 2, -10);
    121119      break;
    122120    case VIEW_RIGHT:
    123121      this->toFovy = 90;
    124       *this->toRelCoor = Vector (0, 5, 10);
     122      this->toRelCoor = Vector (0, 2, 10);
    125123      break;
    126124    }
     
    136134  dt /= 1000;
    137135  this->fovy += (this->toFovy - this->fovy) * dt;
     136  Vector tmp = this->getRelCoor() + (this->toRelCoor - this->getRelCoor()) * dt;
     137  this->setRelCoor(&tmp);
     138  PRINTF(0)("%f %f %f\n", tmp.x, tmp.y, tmp.z);
    138139}
    139140
  • orxonox/trunk/src/camera.h

    r3639 r3641  
    88
    99#include "p_node.h"
     10#include "vector.h"
    1011
    1112class World;
     
    2829  float farClip;                   //!< The far clipping plane.
    2930
    30   Vector* toRelCoor;
     31  Vector toRelCoor;
    3132  float toFovy;
    3233 
  • orxonox/trunk/src/story_entities/world.cc

    r3640 r3641  
    307307            Vector* cameraOffset = new Vector (-2, 2, 0);
    308308            this->localCamera->setRelCoor (cameraOffset);
    309             this->localCamera->setFovy(100);
    310309           
    311310            /*monitor progress*/
Note: See TracChangeset for help on using the changeset viewer.