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/Intersection/OrientedBoxIntersection.h" 00027 00028 #include "Geometry/Primitive/OrientedBox.h" 00029 00030 namespace Lamp{ 00031 00032 //------------------------------------------------------------------------------ 00033 // 点 00034 //------------------------------------------------------------------------------ 00035 // 点交差 00036 bool OrientedBoxIntersection::intersect( 00037 const OrientedBox& ob, const Vector3& point){ 00038 Assert(false); 00039 return false; 00040 } 00041 //------------------------------------------------------------------------------ 00042 // 指向性ボックス 00043 //------------------------------------------------------------------------------ 00044 // 指向性ボックス交差 00045 bool OrientedBoxIntersection::intersect( 00046 const OrientedBox& ob0, const OrientedBox& ob1){ 00047 Assert(false); 00048 return false; 00049 } 00050 //------------------------------------------------------------------------------ 00051 // 平面 00052 //------------------------------------------------------------------------------ 00053 // 平面交差 00054 bool OrientedBoxIntersection::intersect( 00055 const OrientedBox& ob, const Plane& plane){ 00056 // 平面との距離が実効直径以下なら交差 00057 float effectiveDiameter = ob.getEffectiveDiameter(plane.getNormal()); 00058 return (Math::abs(plane.getDistance(ob.getCenter())) <= effectiveDiameter); 00059 } 00060 //------------------------------------------------------------------------------ 00061 // レイ 00062 //------------------------------------------------------------------------------ 00063 // レイ交差 00064 bool OrientedBoxIntersection::intersect(const OrientedBox& ob, const Ray& ray){ 00065 Assert(false); 00066 return false; 00067 } 00068 //------------------------------------------------------------------------------ 00069 // セグメント 00070 //------------------------------------------------------------------------------ 00071 // セグメント交差 00072 bool OrientedBoxIntersection::intersect( 00073 const OrientedBox& ob, const Segment& segment){ 00074 Assert(false); 00075 return false; 00076 } 00077 //------------------------------------------------------------------------------ 00078 // 球 00079 //------------------------------------------------------------------------------ 00080 // 球交差 00081 bool OrientedBoxIntersection::intersect( 00082 const OrientedBox& ob, const Sphere& sphere){ 00083 Assert(false); 00084 return false; 00085 } 00086 //------------------------------------------------------------------------------ 00087 // 三角 00088 //------------------------------------------------------------------------------ 00089 // 三角交差 00090 bool OrientedBoxIntersection::intersect( 00091 const OrientedBox& ob, const Triangle& triangle){ 00092 Assert(false); 00093 return false; 00094 } 00095 //------------------------------------------------------------------------------ 00096 } // End of namespace Lamp 00097 //------------------------------------------------------------------------------