- Timestamp:
- 12/04/07 15:43:14 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgunittests/osgunittests.cpp
r7471 r7597 22 22 #include <osg/Vec3> 23 23 #include <osg/Matrix> 24 #include <osg/Polytope> 24 25 #include <osg/Timer> 25 26 #include <osg/io_utils> … … 404 405 } 405 406 407 void 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 406 423 407 424 int main( int argc, char** argv ) … … 438 455 bool printQuatTest = false; 439 456 while (arguments.read("quat")) printQuatTest = true; 457 458 bool printPolytopeTest = false; 459 while (arguments.read("polytope")) printPolytopeTest = true; 440 460 441 461 bool doTestThreadInitAndExit = false; … … 470 490 testQuat(quat_scale); 471 491 } 472 473 492 474 493 if (printMatrixTest) … … 517 536 } 518 537 538 if (printPolytopeTest) 539 { 540 testPolytope(); 541 } 542 519 543 520 544 if (printQualifiedTest)
