Wm4Query3TInteger.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 WM4QUERY3TINTEGER_H
00018 #define WM4QUERY3TINTEGER_H
00019 
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Query3.h"
00022 #include "Wm4TInteger.h"
00023 
00024 namespace Wm4
00025 {
00026 
00027 template <class Real>
00028 class Query3TInteger : public Query3<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     Query3TInteger (int iVQuantity, const Vector3<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 ToPlane (const Vector3<Real>& rkP, int iV0, int iV1, int iV2)
00044         const;
00045 
00046     virtual int ToCircumsphere (const Vector3<Real>& rkP, int iV0, int iV1,
00047         int iV2, int iV3) const;
00048 
00049 private:
00050     using Query3<Real>::m_akVertex;
00051 
00052     static TInteger<3> Dot (TInteger<3>& rkX0, TInteger<3>& rkY0,
00053         TInteger<3>& rkZ0, TInteger<3>& rkX1, TInteger<3>& rkY1,
00054         TInteger<3>& rkZ1);
00055 
00056     static TInteger<4> Det3 (TInteger<4>& rkX0, TInteger<4>& rkY0,
00057         TInteger<4>& rkZ0, TInteger<4>& rkX1, TInteger<4>& rkY1,
00058         TInteger<4>& rkZ1, TInteger<4>& rkX2, TInteger<4>& rkY2,
00059         TInteger<4>& rkZ2);
00060 
00061     static TInteger<6> Det4 (TInteger<6>& rkX0, TInteger<6>& rkY0,
00062         TInteger<6>& rkZ0, TInteger<6>& rkW0, TInteger<6>& rkX1,
00063         TInteger<6>& rkY1, TInteger<6>& rkZ1, TInteger<6>& rkW1,
00064         TInteger<6>& rkX2, TInteger<6>& rkY2, TInteger<6>& rkZ2,
00065         TInteger<6>& rkW2, TInteger<6>& rkX3, TInteger<6>& rkY3,
00066         TInteger<6>& rkZ3, TInteger<6>& rkW3);
00067 };
00068 
00069 }
00070 
00071 #include "Wm4Query3TInteger.inl"
00072 
00073 namespace Wm4
00074 {
00075 typedef Query3TInteger<float> Query3TIntegerf;
00076 typedef Query3TInteger<double> Query3TIntegerd;
00077 
00078 }
00079 
00080 #endif

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