Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Feb 3, 2006, 12:59:42 PM (19 years ago)
Author:
bensch
Message:

trunk: better interface to CameraDistance

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

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

    r7009 r7013  
    146146{
    147147  //update frustum plane
    148   this->viewVector = this->getAbsCoor() -  this->target->getAbsCoor();
    149   this->frustumPlane = Plane(this->viewVector, this->getAbsCoor() + Vector(-70.0,0.0,0.0));
     148  this->viewVector = (this->getAbsCoor() -  this->target->getAbsCoor()).getNormalized();
     149  this->frustumPlane = Plane(this->viewVector, this->getAbsCoor() + this->viewVector * 3.0);
    150150
    151151  this->upVector =  this->getAbsDirV();
  • trunk/src/world_entities/camera.h

    r7009 r7013  
    4848  inline const Plane& getViewFrustum() const { return this->frustumPlane; }
    4949
     50  inline float distance(const Vector& distance) const { return this->frustumPlane.distancePoint(distance); }
     51  inline float distance(const PNode* node) const { return distance(node->getAbsCoor()); }
    5052
    5153  void tick(float dt);
Note: See TracChangeset for help on using the changeset viewer.