basic/geometry/geo_rangesensor/MgcIntrLin3Box3.h

Go to the documentation of this file.
00001 // Magic Software, Inc.
00002 // http://www.magic-software.com
00003 // Copyright (c) 2000, All Rights Reserved
00004 //
00005 // Source code from Magic Software is supplied under the terms of a license
00006 // agreement and may not be copied or disclosed except in accordance with the
00007 // terms of that agreement.  The various license agreements may be found at
00008 // the Magic Software web site.  This file is subject to the license
00009 //
00010 // FREE SOURCE CODE
00011 // http://www.magic-software.com/License.html/free.pdf
00012 
00013 #ifndef MGCINTRLIN3BOX3_H
00014 #define MGCINTRLIN3BOX3_H
00015 
00016 #include "MgcBox3.h"
00017 #include "MgcLine3.h"
00018 #include "MgcRay3.h"
00019 #include "MgcSegment3.h"
00020 
00021 // return value is 'true' if and only if objects intersect
00022 
00023 bool MgcTestIntersection (const MgcSegment3& rkSegment, const MgcBox3& rkBox);
00024 bool MgcTestIntersection (const MgcRay3& rkRay, const MgcBox3& rkBox);
00025 bool MgcTestIntersection (const MgcLine3& rkLine, const MgcBox3& rkBox);
00026 
00027 // Clipping of a linear component 'origin'+t*'direction' against an
00028 // axis-aligned box [-e0,e0]x[-e1,e1]x[-e2,e2] where 'extent'=(e0,e1,e2).
00029 // The values of t0 and t1 must be set by the caller.  If the component is a
00030 // segment, set t0 = 0 and t1 = 1.  If the component is a ray, set t0 = 0 and
00031 // t1 = INFINITY.  If the component is a line, set t0 = -INFINITY and
00032 // t1 = INFINITY.  The values are (possibly) modified by the clipper.
00033 bool MgcFindIntersection (const MgcVector3& rkOrigin,
00034     const MgcVector3& rkDirection, const MgcReal afExtent[3], MgcReal& rfT0,
00035     MgcReal& rfT1);
00036 
00037 bool MgcFindIntersection (const MgcSegment3& rkSegment, const MgcBox3& rkBox,
00038     int& riQuantity, MgcVector3 akPoint[2]);
00039 bool MgcFindIntersection (const MgcRay3& rkRay, const MgcBox3& rkBox,
00040     double &t);
00041 bool MgcFindIntersection (const MgcLine3& rkLine, const MgcBox3& rkBox,
00042     int& riQuantity, MgcVector3 akPoint[2]);
00043 
00044 #endif

Generated on Sat Apr 1 21:30:31 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO