Wm4IntrSegment3Box3.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 WM4INTRSEGMENT3BOX3_H
00018 #define WM4INTRSEGMENT3BOX3_H
00019 
00020 #include "Wm4FoundationLIB.h"
00021 #include "Wm4Intersector.h"
00022 #include "Wm4Segment3.h"
00023 #include "Wm4Box3.h"
00024 
00025 namespace Wm4
00026 {
00027 
00028 template <class Real>
00029 class WM4_FOUNDATION_ITEM IntrSegment3Box3
00030     : public Intersector<Real,Vector3<Real> >
00031 {
00032 public:
00033     IntrSegment3Box3 (const Segment3<Real>& rkSegment,
00034         const Box3<Real>& rkBox, bool bSolid);
00035 
00036     // object access
00037     const Segment3<Real>& GetSegment () const;
00038     const Box3<Real>& GetBox () const;
00039 
00040     // static intersection queries
00041     virtual bool Test ();
00042     virtual bool Find ();
00043 
00044     // the intersection set
00045     int GetQuantity () const;
00046     const Vector3<Real>& GetPoint (int i) const;
00047 
00048 private:
00049     using Intersector<Real,Vector3<Real> >::m_iIntersectionType;
00050 
00051     // the objects to intersect
00052     const Segment3<Real>& m_rkSegment;
00053     const Box3<Real>& m_rkBox;
00054     bool m_bSolid;
00055 
00056     // information about the intersection set
00057     int m_iQuantity;
00058     Vector3<Real> m_akPoint[2];
00059 };
00060 
00061 typedef IntrSegment3Box3<float> IntrSegment3Box3f;
00062 typedef IntrSegment3Box3<double> IntrSegment3Box3d;
00063 
00064 }
00065 
00066 #endif

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