FDH14DistRot.h

Go to the documentation of this file.
00001 /* $Id: FDH14DistRot.h,v 1.4 2002/11/05 14:31:15 anonymous Exp $ */
00002 
00003 #ifndef __FDH14_DIST_ROT
00004 #define __FDH14_DIST_ROT
00005 
00006 #include <esg/geometry/includes.h>
00007 #include <esg/spacesorting/DistRot.h>
00008 
00009 /*
00010  * Distance between rotated FDH14 and another bounding volume.
00011  * When second volume is also FDH14 then very efficient algorithm is
00012  * used, otherwise a little bit slower but also very good algorithm 
00013  * is employed.
00014  *
00015  * See DistRot for more details.
00016  */
00017 
00018 namespace esg {
00019 
00020 class OGSCENE_EXPORT FDH14DistRot : public DistRot {
00021 protected:
00022     float          * _orig;     // original FDH values
00023     FDH14::RotInfo * _pRotInfo; // precomputed rotation info.    
00024     int              _set;      // which new values are really set
00025     float          * _transf;   // transformed FDH values
00026 
00027 protected:
00028     double _distance   (const FDH14&,    double, Vector3*);
00029     double _distance   (const Geometry&, double, Vector3*);
00030     bool   _separation (const FDH14&);
00031     bool   _separation (const Geometry&);
00032     
00033 public:
00034     FDH14DistRot (float* /* fdh values */, FDH14::RotInfo*, double sr = 1.0);
00035 
00036     virtual ~FDH14DistRot () { delete [] _transf; }
00037     
00038     virtual double distance (Geometry&, double, Vector3*);
00039     
00040     /*
00041      * Output separation diraction is valid only for objects that are
00042      * penetrated and represents the approximately shortest way to
00043      * get them separated.
00044      */
00045     virtual bool separation (Geometry&, Vector3*);
00046 };
00047 
00048 }; // namespace
00049 
00050 #endif // __FDH14_DIST_ROT

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6