Wm4Intersector1.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef WM4INTERSECTOR1_H
00018 #define WM4INTERSECTOR1_H
00019
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Math.h"
00022
00023 namespace Wm4
00024 {
00025
00026 template <class Real>
00027 class WM4_FOUNDATION_ITEM Intersector1
00028 {
00029 public:
00030
00031
00032
00033
00034 Intersector1 (Real fU0, Real fU1, Real fV0, Real fV1);
00035 Intersector1 (Real afU[2], Real afV[2]);
00036 virtual ~Intersector1 ();
00037
00038
00039 Real GetU (int i) const;
00040 Real GetV (int i) const;
00041
00042
00043 virtual bool Test ();
00044 virtual bool Find ();
00045
00046
00047
00048 virtual bool Test (Real fTMax, Real fSpeedU, Real fSpeedV);
00049 virtual bool Find (Real fTMax, Real fSpeedU, Real fSpeedV);
00050
00051
00052
00053 Real GetFirstTime () const;
00054 Real GetLastTime () const;
00055
00056
00057 int GetQuantity () const;
00058 Real GetOverlap (int i) const;
00059
00060 protected:
00061
00062 Real m_afU[2], m_afV[2];
00063
00064
00065 Real m_fFirstTime, m_fLastTime;
00066 int m_iQuantity;
00067 Real m_afOverlap[2];
00068 };
00069
00070 typedef Intersector1<float> Intersector1f;
00071 typedef Intersector1<double> Intersector1d;
00072
00073 }
00074
00075 #endif