Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4992 in orxonox.OLD for orxonox/trunk/src/world_entities/camera.cc


Ignore:
Timestamp:
Aug 13, 2005, 10:02:40 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: optimizations

File:
1 edited

Legend:

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

    r4989 r4992  
    9898
    9999/**
    100   \brief Sets a new clipping region
    101 * @param nearClip The near clip plane
    102 * @param farClip The far clip plane
     100 * Sets a new clipping region
     101 * @param nearClip The near clip plane
     102 * @param farClip The far clip plane
    103103*/
    104104void Camera::setClipRegion(float nearClip, float farClip)
     
    119119    case VIEW_NORMAL:
    120120      this->toFovy = 60.0;
    121       this->setRelCoorSoft(Vector(-10, 5, 0));
    122       this->target->setRelCoorSoft(Vector(0,0,0));
     121      this->softReparent("TrackNode");
     122      this->target->softReparent("TrackNode");
     123      this->setRelCoorSoft(-10, 5, 0);
     124      this->target->setRelCoorSoft(0,0,0);
    123125      break;
    124126    case VIEW_BEHIND:
     
    131133      else
    132134        this->target->softReparent("Player");
     135      this->getParent()->debug(0);
    133136
    134137//      this->setParent("main-Turret");
     
    138141      break;
    139142    case VIEW_FRONT:
    140       this->toFovy = 95.0;
    141       this->setRelCoorSoft(Vector(10, 2, 0));
    142       this->target->setRelCoorSoft(Vector(0,0,0));
     143      this->toFovy = 120.0;
     144      //this->softReparent("Player");
     145      this->target->softReparent("Player");
     146      this->setRelCoorSoft(4, 0, 0);
     147      this->target->setRelCoorSoft(10,0,0);
    143148      break;
    144149    case VIEW_LEFT:
    145150      this->toFovy = 90;
    146       this->setRelCoorSoft(Vector(0, 1, -10));
    147       this->target->setRelCoorSoft(Vector(0,0,0));
     151      this->softReparent("TrackNode");
     152      this->target->softReparent("TrackNode");
     153      this->setRelCoorSoft(0, 1, -10, .5);
     154      this->target->setRelCoorSoft(0,0,0);
    148155      break;
    149156    case VIEW_RIGHT:
    150157      this->toFovy = 90;
     158      this->softReparent("TrackNode");
     159      this->target->softReparent("TrackNode");
    151160      this->setRelCoorSoft(Vector(0, 1, 10));
    152       this->target->setRelCoorSoft(Vector(0,0,0));
     161      this->target->setRelCoorSoft(0,0,0);
    153162      break;
    154163    case VIEW_TOP:
    155164      this->toFovy= 120;
     165      this->softReparent("TrackNode");
     166      this->target->softReparent("TrackNode");
    156167      this->setRelCoorSoft(Vector(0, 10, 0));
    157       this->target->setRelCoorSoft(Vector(0,0,0));
     168      this->target->setRelCoorSoft(0,0,0);
    158169    }
    159170}
     
    169180  if (tmpFovy > .001)
    170181    this->fovy += (this->toFovy - this->fovy) * dt;
     182
     183  this->getParent()->debug(2);
     184  //this->debug(1);
     185  //this->target->debug(1);
    171186}
    172187
Note: See TracChangeset for help on using the changeset viewer.