Wm4Query2TInteger.h

Go to the documentation of this file.
00001 // Wild Magic Source Code
00002 // David Eberly
00003 // http://www.geometrictools.com
00004 // Copyright (c) 1998-2007
00005 //
00006 // This library is free software; you can redistribute it and/or modify it
00007 // under the terms of the GNU Lesser General Public License as published by
00008 // the Free Software Foundation; either version 2.1 of the License, or (at
00009 // your option) any later version.  The license is available for reading at
00010 // either of the locations:
00011 //     http://www.gnu.org/copyleft/lgpl.html
00012 //     http://www.geometrictools.com/License/WildMagicLicense.pdf
00013 // The license applies to versions 0 through 4 of Wild Magic.
00014 //
00015 // Version: 4.0.0 (2006/06/28)
00016 
00017 #ifndef WM4QUERY2TINTEGER_H
00018 #define WM4QUERY2TINTEGER_H
00019 
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Query2.h"
00022 #include "Wm4TInteger.h"
00023 
00024 namespace Wm4
00025 {
00026 
00027 template <class Real>
00028 class Query2TInteger : public Query2<Real>
00029 {
00030 public:
00031     // The components of the input vertices are truncated to 32-bit integer
00032     // values, so you should guarantee that the vertices are sufficiently
00033     // large to give a good distribution of numbers.  The value N in
00034     // TInteger<N> is chosen large enough so that the exact arithmetic is
00035     // correct for the functions.
00036     Query2TInteger (int iVQuantity, const Vector2<Real>* akVertex);
00037 
00038     // run-time type information
00039     virtual Query::Type GetType () const;
00040 
00041     // Queries about the relation of a point to various geometric objects.
00042 
00043     virtual int ToLine (const Vector2<Real>& rkP, int iV0, int iV1) const;
00044 
00045     virtual int ToCircumcircle (const Vector2<Real>& rkP, int iV0, int iV1,
00046         int iV2) const;
00047 
00048 private:
00049     using Query2<Real>::m_akVertex;
00050 
00051     static TInteger<2> Dot (TInteger<2>& rkX0, TInteger<2>& rkY0,
00052         TInteger<2>& rkX1, TInteger<2>& rkY1);
00053 
00054     static TInteger<2> Det2 (TInteger<2>& rkX0, TInteger<2>& rkY0,
00055         TInteger<2>& rkX1, TInteger<2>& rkY1);
00056 
00057     static TInteger<4> Det3 (TInteger<4>& rkX0, TInteger<4>& rkY0,
00058         TInteger<4>& rkZ0, TInteger<4>& rkX1, TInteger<4>& rkY1,
00059         TInteger<4>& rkZ1, TInteger<4>& rkX2, TInteger<4>& rkY2,
00060         TInteger<4>& rkZ2);
00061 };
00062 
00063 }
00064 
00065 #include "Wm4Query2TInteger.inl"
00066 
00067 namespace Wm4
00068 {
00069 typedef Query2TInteger<float> Query2TIntegerf;
00070 typedef Query2TInteger<double> Query2TIntegerd;
00071 
00072 }
00073 
00074 #endif

Generated on Wed Nov 23 19:01:07 2011 for FreeCAD by  doxygen 1.6.1