OSDLBoundingBox.cc

Go to the documentation of this file.
00001 #include "OSDLBoundingBox.h"
00002 
00003 
00004 using namespace OSDL::Engine ;
00005 
00006 using std::string ;
00007 
00008 
00009 
00010 BoundingBoxException::BoundingBoxException( const string & reason ) throw() :
00011     EngineException( "BoundingBoxException : " + reason )
00012 {
00013 
00014 }
00015 
00016 
00017 BoundingBoxException::~BoundingBoxException() throw()
00018 {
00019 
00020 }
00021 
00022 
00023 
00024 
00025 BoundingBox::BoundingBox() throw()
00026 {
00027 
00028 }
00029 
00030 
00031 BoundingBox::~BoundingBox() throw()
00032 {
00033 
00034 }
00035 
00036 
00037 string BoundingBox::InterpretIntersectionResult( IntersectionResult result ) 
00038     throw( BoundingBoxException )
00039 {
00040 
00041     switch( result )
00042     {
00043     
00044         case isSeparate :
00045             return "The two bounding boxes have no intersection." ;
00046             break ;
00047                 
00048         case contains :
00049             return "The first bounding box contains strictly the second." ;
00050             break ;
00051                 
00052         case isContained :
00053             return "The first bounding box is "
00054                 "strictly contained by the second." ;
00055             break ;
00056                 
00057         case intersects :
00058             return "The two bounding boxes intersect." ;
00059             break ;
00060                 
00061         case isEqual :
00062             return "The two bounding boxes are equal." ;
00063             break ;
00064                 
00065         
00066         default:
00067             throw BoundingBoxException(
00068                 "BoundingBox::InterpretIntersectionResult : "
00069                 "unknown intersection outcome." ) ;
00070             break ;
00071                 
00072     }
00073     
00074     return "(abnormal interpretation of intersection result)" ;
00075     
00076 }
00077 

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1