Ignore:
Timestamp:
11/01/05 20:02:22 (19 years ago)
Author:
mattausch
Message:

some ideas abou saving bspleaves with the ray and t

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h

    r362 r366  
    5656  }; 
    5757   
     58  struct BspIntersection 
     59  { 
     60          float mT; 
     61          BspLeaf *leaf; 
     62          BspIntersection(float t, BspLeaf *l): mT(t), leaf(l) 
     63          {} 
     64 
     65          bool operator<(const BspIntersection &b) const  
     66          { 
     67                  return mT     < b.mT; 
     68          } 
     69  }; 
     70 
    5871  // I should have some abstract cell data type !!! here 
    5972  // corresponds to the spatial elementary cell 
     
    6275   
    6376  vector<Intersection> intersections; 
     77  vector<BspIntersection> bspIntersections; 
    6478  vector<KdLeaf *> kdLeaves; 
    6579  vector<MeshInstance *> meshes; 
    66   vector<BspLeaf *> bspLeaves; 
    6780   
    6881  // constructors 
     
    197210  int ClassifyPlane(const Plane3 &plane, const float minT, const float maxT) const; 
    198211 
     212  void Insert(const BspIntersection &bspi); 
     213 
    199214private: 
    200215  Vector3 loc, dir;             // Describes ray origin and vector 
Note: See TracChangeset for help on using the changeset viewer.