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

PlaneDistance.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 PLANE_DISTANCE_H_
00026 #define PLANE_DISTANCE_H_
00027 
00028 namespace Lamp{
00029 
00030 class Plane;
00031 class Ray;
00032 class Segment;
00033 class Sphere;
00034 class Triangle;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * 平面距離
00039  */
00040 class PlaneDistance{
00041 public:
00042     //--------------------------------------------------------------------------
00043     // 点
00044     //--------------------------------------------------------------------------
00045     /**
00046      * 点距離
00047      * @param plane 平面
00048      * @param point 点
00049      * @return 距離
00050      */
00051     static float distance(const Plane& plane, const Vector3& point);
00052 
00053     //--------------------------------------------------------------------------
00054     // 平面
00055     //--------------------------------------------------------------------------
00056     /**
00057      * 平面距離
00058      * @param plane0 平面
00059      * @param plane1 平面
00060      * @return 距離
00061      */
00062     static float distance(const Plane& plane0, const Plane& plane1);
00063 
00064     //--------------------------------------------------------------------------
00065     // レイ
00066     //--------------------------------------------------------------------------
00067     /**
00068      * レイ距離
00069      * @param plane 平面
00070      * @param ray レイ
00071      * @return 距離
00072      */
00073     static float distance(const Plane& plane, const Ray& ray);
00074 
00075     //--------------------------------------------------------------------------
00076     // セグメント
00077     //--------------------------------------------------------------------------
00078     /**
00079      * セグメント距離
00080      * @param plane 平面
00081      * @param segment セグメント
00082      * @return 距離
00083      */
00084     static float distance(const Plane& plane, const Segment& segment);
00085 
00086     //--------------------------------------------------------------------------
00087     // 球
00088     //--------------------------------------------------------------------------
00089     /**
00090      * 球距離
00091      * @param plane 平面
00092      * @param sphere 球
00093      * @return 距離
00094      */
00095     static float distance(const Plane& plane, const Sphere& sphere);
00096 
00097     //--------------------------------------------------------------------------
00098     // 三角
00099     //--------------------------------------------------------------------------
00100     /**
00101      * 三角距離
00102      * @param plane 平面
00103      * @param triangle 三角
00104      * @return 距離
00105      */
00106     static float distance(const Plane& plane, const Triangle& triangle);
00107 
00108 private:
00109     //--------------------------------------------------------------------------
00110     // コンストラクタの隠蔽
00111     PlaneDistance();
00112 
00113 };
00114 
00115 //------------------------------------------------------------------------------
00116 } // End of namespace Lamp
00117 #endif // End of PLANE_DISTANCE_H_
00118 //------------------------------------------------------------------------------

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