Ignore:
Timestamp:
09/29/05 01:48:20 (19 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r300 r301  
    122122        for (it = mVertices.begin(); it != it_end; ++it) 
    123123                vtx.push_back(rot * (*it)); 
    124          
    125         Vector3 cur = vtx.back(); 
     124 
     125        //-- compute area 
     126        Vector3 last = vtx.back(); 
    126127 
    127128        float area = 0.0f; 
    128129        for (it = vtx.begin(); it != vtx.end(); ++it) 
    129130        { 
    130                 area += cur.y * (*it).x - cur.x * (*it).y; 
    131  
    132                 cur = *it; 
    133         } 
    134  
     131                area += last.y * (*it).x - last.x * (*it).y; 
     132 
     133                last = *it; 
     134        } 
     135        //Debug << "area: " << area * 0.5 << endl; 
    135136        return area * 0.5f; 
    136137} 
     
    219220        // check if area exceeds certain size 
    220221        if (AREA_LIMIT > GetArea()) 
     222        { 
     223                //Debug << "area too small: " << GetArea() << endl; 
    221224                return false; 
     225        } 
    222226#else 
    223227        Vector3 vtx = mVertices.back(); 
Note: See TracChangeset for help on using the changeset viewer.