Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

OrientedBoxIntersection.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * 指向性ボックス交差ヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef ORIENTED_BOX_INTERSECTION_H_
00026 #define ORIENTED_BOX_INTERSECTION_H_
00027 
00028 namespace Lamp{
00029 
00030 class OrientedBox;
00031 class Plane;
00032 class Ray;
00033 class Segment;
00034 class Sphere;
00035 class Triangle;
00036 
00037 //------------------------------------------------------------------------------
00038 /**
00039  * 指向性ボックス交差
00040  */
00041 class OrientedBoxIntersection{
00042 public:
00043     //--------------------------------------------------------------------------
00044     // 点
00045     //--------------------------------------------------------------------------
00046     /**
00047      * 点交差
00048      * @param ob 指向性ボックス
00049      * @param point 点
00050      * @return 交差していればtrue
00051      */
00052     static bool intersect(const OrientedBox& ob, const Vector3& point);
00053 
00054     //--------------------------------------------------------------------------
00055     // 指向性ボックス
00056     //--------------------------------------------------------------------------
00057     /**
00058      * 指向性ボックス交差
00059      * @param ob0 指向性ボックス
00060      * @param ob1 指向性ボックス
00061      * @return 交差していればtrue
00062      */
00063     static bool intersect(const OrientedBox& ob0, const OrientedBox& ob1);
00064 
00065     //--------------------------------------------------------------------------
00066     // 平面
00067     //--------------------------------------------------------------------------
00068     /**
00069      * 平面交差
00070      * @param ob 指向性ボックス
00071      * @param plane 平面
00072      * @return 交差していればtrue
00073      */
00074     static bool intersect(const OrientedBox& ob, const Plane& plane);
00075 
00076     //--------------------------------------------------------------------------
00077     // レイ
00078     //--------------------------------------------------------------------------
00079     /**
00080      * レイ交差
00081      * @param ob 指向性ボックス
00082      * @param ray レイ
00083      * @return 交差していればtrue
00084      */
00085     static bool intersect(const OrientedBox& ob, const Ray& ray);
00086 
00087     //--------------------------------------------------------------------------
00088     // セグメント
00089     //--------------------------------------------------------------------------
00090     /**
00091      * セグメント交差
00092      * @param ob 指向性ボックス
00093      * @param segment セグメント
00094      * @return 交差していればtrue
00095      */
00096     static bool intersect(const OrientedBox& ob, const Segment& segment);
00097 
00098     //--------------------------------------------------------------------------
00099     // 球
00100     //--------------------------------------------------------------------------
00101     /**
00102      * 球交差
00103      * @param ob 指向性ボックス
00104      * @param sphere 球
00105      * @return 交差していればtrue
00106      */
00107     static bool intersect(const OrientedBox& ob, const Sphere& sphere);
00108 
00109     //--------------------------------------------------------------------------
00110     // 三角
00111     //--------------------------------------------------------------------------
00112     /**
00113      * 三角交差
00114      * @param ob 指向性ボックス
00115      * @param triangle 三角
00116      * @return 交差していればtrue
00117      */
00118     static bool intersect(const OrientedBox& ob, const Triangle& triangle);
00119 
00120 private:
00121     //--------------------------------------------------------------------------
00122     // コンストラクタの隠蔽
00123     OrientedBoxIntersection();
00124 
00125 };
00126 
00127 //------------------------------------------------------------------------------
00128 } // End of namespace Lamp
00129 #endif // End of ORIENTED_BOX_INTERSECTION_H_
00130 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:33 2005 for Lamp by doxygen 1.3.2