Wm4Query2.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 WM4QUERY2_H
00018 #define WM4QUERY2_H
00019
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Query.h"
00022 #include "Wm4Vector2.h"
00023
00024 namespace Wm4
00025 {
00026
00027 template <class Real>
00028 class Query2 : public Query
00029 {
00030 public:
00031
00032 Query2 (int iVQuantity, const Vector2<Real>* akVertex);
00033 virtual ~Query2 ();
00034
00035
00036 virtual Query::Type GetType () const;
00037
00038
00039 int GetQuantity () const;
00040 const Vector2<Real>* GetVertices () const;
00041
00042
00043
00044
00045
00046
00047
00048 virtual int ToLine (int i, int iV0, int iV1) const;
00049 virtual int ToLine (const Vector2<Real>& rkP, int iV0, int iV1) const;
00050
00051
00052
00053
00054
00055 virtual int ToTriangle (int i, int iV0, int iV1, int iV2) const;
00056 virtual int ToTriangle (const Vector2<Real>& rkP, int iV0, int iV1,
00057 int iV2) const;
00058
00059
00060
00061
00062
00063 virtual int ToCircumcircle (int i, int iV0, int iV1, int iV2) const;
00064 virtual int ToCircumcircle (const Vector2<Real>& rkP, int iV0, int iV1,
00065 int iV2) const;
00066
00067 protected:
00068
00069 int m_iVQuantity;
00070 const Vector2<Real>* m_akVertex;
00071
00072 static Real Dot (Real fX0, Real fY0, Real fX1, Real fY1);
00073
00074 static Real Det2 (Real fX0, Real fY0, Real fX1, Real fY1);
00075
00076 static Real Det3 (Real iX0, Real iY0, Real iZ0, Real iX1, Real iY1,
00077 Real iZ1, Real iX2, Real iY2, Real iZ2);
00078 };
00079
00080 }
00081
00082 #include "Wm4Query2.inl"
00083
00084 namespace Wm4
00085 {
00086 typedef Query2<float> Query2f;
00087 typedef Query2<double> Query2d;
00088 }
00089
00090 #endif