Ignore:
Timestamp:
10/13/05 17:58:37 (19 years ago)
Author:
mattausch
Message:

worked on the ray based subdivision. finished extracting polygons from rays

File:
1 edited

Legend:

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

    r191 r327  
    11#include "Ray.h" 
    2  
     2#include "Plane3.h" 
    33 
    44// ========================================================= 
     
    158158} 
    159159 
     160int Ray::ClassifyPlane(const Plane3 &plane, float minT, float maxT) 
     161{ 
     162        Vector3 entp = Extrap(minT); 
     163        Vector3 extp = Extrap(maxT); 
     164   
     165        int entSide = plane.Side(entp); 
     166        int extSide = plane.Side(extp); 
     167 
     168        if ((entSide == 0) && (extSide == 0))  
     169        { 
     170                return Plane3::COINCIDENT; 
     171        } 
     172        else if ((entSide <= 0) && (entSide <= 0)) 
     173        { 
     174                return Plane3::BACK_SIDE; 
     175        } 
     176        else if ((entSide >= 0) && (entSide >= 0)) 
     177        { 
     178                return Plane3::FRONT_SIDE; 
     179        } 
     180         
     181        return Plane3::SPLIT; 
     182} 
     183 
    160184ostream & 
    161185operator<<(ostream &s, const PassingRaySet &set) 
Note: See TracChangeset for help on using the changeset viewer.