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 #include "LampBasic.h" 00026 #include "Geometry/Distance/PlaneDistance.h" 00027 00028 namespace Lamp{ 00029 00030 //------------------------------------------------------------------------------ 00031 // 点 00032 //------------------------------------------------------------------------------ 00033 // 点距離 00034 float PlaneDistance::distance(const Plane& plane, const Vector3& point){ 00035 // 距離を測るには法線が正規化されている必要がある 00036 Assert(plane.isUnit()); 00037 return plane.dotProduct(point); 00038 } 00039 //------------------------------------------------------------------------------ 00040 // 平面 00041 //------------------------------------------------------------------------------ 00042 // 平面距離 00043 float PlaneDistance::distance(const Plane& plane0, const Plane& plane1){ 00044 Assert(false); 00045 return 0.f; 00046 } 00047 //------------------------------------------------------------------------------ 00048 // レイ 00049 //------------------------------------------------------------------------------ 00050 // レイ距離 00051 float PlaneDistance::distance(const Plane& plane, const Ray& ray){ 00052 Assert(false); 00053 return 0.f; 00054 } 00055 //------------------------------------------------------------------------------ 00056 // セグメント 00057 //------------------------------------------------------------------------------ 00058 // セグメント距離 00059 float PlaneDistance::distance(const Plane& plane, const Segment& segment){ 00060 Assert(false); 00061 return 0.f; 00062 } 00063 //------------------------------------------------------------------------------ 00064 // 球 00065 //------------------------------------------------------------------------------ 00066 // 球距離 00067 float PlaneDistance::distance(const Plane& plane, const Sphere& sphere){ 00068 Assert(false); 00069 return 0.f; 00070 } 00071 //------------------------------------------------------------------------------ 00072 // 三角 00073 //------------------------------------------------------------------------------ 00074 // 三角距離 00075 float PlaneDistance::distance( 00076 const Plane& plane, const Triangle& triangle){ 00077 Assert(false); 00078 return 0.f; 00079 } 00080 //------------------------------------------------------------------------------ 00081 } // End of namespace Lamp 00082 //------------------------------------------------------------------------------