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

ConeIntersection.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 CONE_INTERSECTION_H_
00026 #define CONE_INTERSECTION_H_
00027 
00028 namespace Lamp{
00029 
00030 class Cone;
00031 class Line;
00032 class OrientedBox;
00033 class Plane;
00034 class Ray;
00035 class Segment;
00036 class Sphere;
00037 class Triangle;
00038 
00039 //------------------------------------------------------------------------------
00040 /**
00041  * コーン交差
00042  */
00043 class ConeIntersection{
00044 public:
00045     //--------------------------------------------------------------------------
00046     // 点
00047     //--------------------------------------------------------------------------
00048     /**
00049      * 点交差
00050      * @param cone コーン
00051      * @param point 点
00052      * @return 交差していればtrue
00053      */
00054     static bool intersect(const Cone& cone, const Vector3& point);
00055 
00056     //--------------------------------------------------------------------------
00057     // コーン
00058     //--------------------------------------------------------------------------
00059     /**
00060      * コーン交差
00061      * @param cone0 コーン
00062      * @param cone1 コーン
00063      * @return 交差していればtrue
00064      */
00065     static bool intersect(const Cone& cone0, const Cone& cone1);
00066 
00067     //--------------------------------------------------------------------------
00068     // ライン
00069     //--------------------------------------------------------------------------
00070     /**
00071      * ライン交差
00072      * @param cone コーン
00073      * @param line ライン
00074      * @return 交差していればtrue
00075      */
00076     static bool intersect(const Cone& cone, const Line& line);
00077 
00078     //--------------------------------------------------------------------------
00079     // 指向性ボックス
00080     //--------------------------------------------------------------------------
00081     /**
00082      * 指向性ボックス交差
00083      * @param cone コーン
00084      * @param ob 指向性ボックス
00085      * @return 交差していればtrue
00086      */
00087     static bool intersect(const Cone& cone, const OrientedBox& ob);
00088 
00089     //--------------------------------------------------------------------------
00090     // 平面
00091     //--------------------------------------------------------------------------
00092     /**
00093      * 平面交差
00094      * @param cone コーン
00095      * @param plane 平面
00096      * @return 交差していればtrue
00097      */
00098     static bool intersect(const Cone& cone, const Plane& plane);
00099 
00100     //--------------------------------------------------------------------------
00101     // レイ
00102     //--------------------------------------------------------------------------
00103     /**
00104      * レイ交差
00105      * @param cone コーン
00106      * @param ray レイ
00107      * @return 交差していればtrue
00108      */
00109     static bool intersect(const Cone& cone, const Ray& ray);
00110 
00111     //--------------------------------------------------------------------------
00112     // セグメント
00113     //--------------------------------------------------------------------------
00114     /**
00115      * セグメント交差
00116      * @param cone コーン
00117      * @param segment セグメント
00118      * @return 交差していればtrue
00119      */
00120     static bool intersect(const Cone& cone, const Segment& segment);
00121 
00122     //--------------------------------------------------------------------------
00123     // 球
00124     //--------------------------------------------------------------------------
00125     /**
00126      * 球交差
00127      * @param cone コーン
00128      * @param sphere 球
00129      * @return 交差していればtrue
00130      */
00131     static bool intersect(const Cone& cone, const Sphere& sphere);
00132 
00133     //--------------------------------------------------------------------------
00134     // 三角
00135     //--------------------------------------------------------------------------
00136     /**
00137      * 三角交差
00138      * @param cone コーン
00139      * @param triangle 三角
00140      * @return 交差していればtrue
00141      */
00142     static bool intersect(const Cone& cone, const Triangle& triangle);
00143 
00144 private:
00145     //--------------------------------------------------------------------------
00146     // コンストラクタの隠蔽
00147     ConeIntersection();
00148 
00149 };
00150 
00151 //------------------------------------------------------------------------------
00152 } // End of namespace Lamp
00153 #endif // End of CONE_INTERSECTION_H_
00154 //------------------------------------------------------------------------------

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