MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLWEM/WEMBase/WEMBoundingBox.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00011 #ifndef __WEMBoundingBox_H
00012 #define __WEMBoundingBox_H
00013 
00014 #include "MLWEMIncludes.h"
00015 
00016 ML_START_NAMESPACE
00017 
00019 
00021 class MLWEM_EXPORT WEMBoundingBox
00022 {
00023 
00024 public:
00025 
00027   WEMBoundingBox();
00029   ~WEMBoundingBox();
00030 
00032   inline Vector3 getMin()    const { return _min; }
00034   inline Vector3 getMax()    const{ return _max; }
00036   inline Vector3 getCenter() const { return _center; }
00038   inline double getRadius()  const { return _radius; }
00040   inline bool isCentered()   const { return (_center == NULL_VEC); }
00042   inline bool isScalable()   const { return (_radius > WEM_EPSILON); }
00044   void reset();
00046   void setExtents(Vector3 min, Vector3 max);
00048   void center();
00050   void scale();
00051 
00052 
00053 private:
00054 
00056   Vector3 _min;
00058   Vector3 _max;
00060   Vector3 _center;
00062   double _radius;
00063 };
00064 
00066 
00067 ML_END_NAMESPACE
00068 
00069 #endif // __WEMBoundingBox_H