Ignore:
Timestamp:
03/12/07 18:30:52 (18 years ago)
Author:
mattausch
Message:

worked on optimization. warning: not tested yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/RayInfo.h

    r2234 r2237  
    33 
    44#include <vector> 
     5#include "VssRay.h" 
    56 
    67 
    78namespace GtpVisibilityPreprocessor { 
    89 
    9 class VssRay; 
     10//class VssRay; 
    1011class RayInfo; 
    1112class Plane3; 
     
    5859        /** Extracts the starting point of the ray segment. 
    5960        */ 
    60         Vector3 ExtrapOrigin() const; 
     61        inline Vector3 ExtrapOrigin() const; 
    6162         
    6263        /** Extracts the end point of the ray segment. 
    6364        */ 
    64         Vector3 ExtrapTermination() const; 
     65        inline Vector3 ExtrapTermination() const; 
    6566         
    66         float GetMinT () const; 
    67         float GetMaxT () const; 
     67        inline float GetMinT () const; 
     68        inline float GetMaxT () const; 
    6869         
    69         void SetMinT (const float t); 
     70        inline void SetMinT (const float t); 
    7071         
    71         void SetMaxT (const float t); 
     72        inline void SetMaxT (const float t); 
    7273 
    7374        float SegmentLength() const; 
     
    99100}; 
    100101 
     102                 
     103float RayInfo::ExtrapOrigin(const int axis) const  
     104{ 
     105        return mRay->GetOrigin(axis) + GetMinT() * mRay->GetDir(axis); 
     106} 
     107                 
     108float RayInfo::ExtrapTermination(const int axis) const  
     109{ 
     110        return mRay->GetOrigin(axis) + GetMaxT() * mRay->GetDir(axis); 
     111} 
     112 
     113Vector3 RayInfo::ExtrapOrigin() const  
     114{ 
     115        return mRay->GetOrigin() + GetMinT() * mRay->GetDir(); 
     116} 
     117                 
     118Vector3 RayInfo::ExtrapTermination() const  
     119{ 
     120        return mRay->GetOrigin() + GetMaxT() * mRay->GetDir(); 
     121} 
     122 
    101123} 
    102124#endif  
Note: See TracChangeset for help on using the changeset viewer.