Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2006, 8:26:57 PM (18 years ago)
Author:
ponder
Message:
  • The terrain now uses VBO's instead of VARS. Its possible to switch back, though.
  • The multitexturing works fine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/src/lib/graphics/importer/terrain/frustum.h

    r8328 r8569  
    2828       
    2929/**
    30  * Code borrowed from Lighthouse 3D 
     30 * Code borrowed from Lighthouse 3D. Its a very good tutorial on culling.
    3131 */
    3232class Frustum;
     
    6464                {
    6565                        int result = INSIDE;
    66                         for(int i=0; i < 6; i++) {
     66                        //for each plane do ...
     67                        for( int i = 0; i < 6; ++i ) {
    6768
     69                                // is the positive vertex outside?
    6870                                if ( planes[i].distance( _box.vertexP( planes[i].n ) ) < 0 )
    6971                                        return OUTSIDE;
    70                                 if ( planes[i].distance( _box.vertexN( planes[i].n) ) < 0 )
    71                                         result =  INTERSECT;
     72                                // is the negative vertex outside?     
     73                                else if ( planes[i].distance( _box.vertexN( planes[i].n ) ) < 0 )
     74                                        result = INTERSECT;
    7275                        }
    73                         return result;         
     76                        return result;
    7477                }
    7578               
     
    7881                        int result = INSIDE;
    7982                        for(int i=0; i < 6; i++) {
    80 
    8183                                if (planes[i].distance( _point ) < 0)
    8284                                        return OUTSIDE;
Note: See TracChangeset for help on using the changeset viewer.