Show
Ignore:
Timestamp:
12/04/07 15:43:14 (7 years ago)
Author:
robert
Message:

Added testPolytope entry

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgunittests/osgunittests.cpp

    r7471 r7597  
    2222#include <osg/Vec3> 
    2323#include <osg/Matrix> 
     24#include <osg/Polytope> 
    2425#include <osg/Timer> 
    2526#include <osg/io_utils> 
     
    404405} 
    405406 
     407void testPolytope() 
     408{ 
     409    osg::Polytope pt; 
     410    pt.setToBoundingBox(osg::BoundingBox(-1000, -1000, -1000, 1000, 1000, 1000)); 
     411    bool bContains = pt.contains(osg::Vec3(0, 0, 0)); 
     412    if (bContains) 
     413    { 
     414        std::cout<<"Polytope pt.contains(osg::Vec3(0, 0, 0)) has succeeded."<<std::endl; 
     415    } 
     416    else 
     417    { 
     418        std::cout<<"Polytope pt.contains(osg::Vec3(0, 0, 0)) has failed."<<std::endl; 
     419    } 
     420 
     421} 
     422 
    406423 
    407424int main( int argc, char** argv ) 
     
    438455    bool printQuatTest = false;  
    439456    while (arguments.read("quat")) printQuatTest = true; 
     457 
     458    bool printPolytopeTest = false;  
     459    while (arguments.read("polytope")) printPolytopeTest = true; 
    440460     
    441461    bool doTestThreadInitAndExit = false; 
     
    470490        testQuat(quat_scale); 
    471491    } 
    472  
    473492 
    474493    if (printMatrixTest) 
     
    517536    } 
    518537 
     538    if (printPolytopeTest) 
     539    { 
     540        testPolytope(); 
     541    } 
     542 
    519543 
    520544    if (printQualifiedTest)