00001 /***************************************************************************\ 00002 * Copyright (C) by University Paris-Est - MISS team 00003 * Intersection.hpp created in 3 2009. 00004 * Mail : biri@univ-mlv.fr 00005 * 00006 * This file is part of the OpenKraken-geometry. 00007 * 00008 * The OpenKraken-geometry is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * The OpenKraken-geometry is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 \***************************************************************************/ 00022 00023 /* 00024 * Anti-doublon 00025 */ 00026 #ifndef __OPENKN_GEOMETRY__INTERSECTION_HPP__ 00027 #define __OPENKN_GEOMETRY__INTERSECTION_HPP__ 00028 00029 /* 00030 * External Includes 00031 */ 00032 #include <utility> 00033 #include <OpenKN/math/Vector3.hpp> 00034 00035 /* 00036 * Internal Includes 00037 */ 00038 00039 /* 00040 * Namespace 00041 */ 00042 namespace kn{ 00043 00054 std::pair<kn::Vector2d,double> intersectTriangle(const kn::Vector3d & pointA, const kn::Vector3d & pointB, const kn::Vector3d & pointC, 00055 const kn::Vector3d & rayDirection ,const kn::Vector3d & rayOrigin); 00066 std::pair<kn::Vector3d,double> intersectOBB(const kn::Vector3d & center, const kn::Vector3d a[3], const kn::Vector3d & h, 00067 const kn::Vector3d & rayDirection ,const kn::Vector3d & rayOrigin); 00068 00069 00079 std::pair<kn::Vector3d, double> intersectSphere(const kn::Vector3d & spherePosition, double sphereRadius, 00080 const kn::Vector3d & rayDirection ,const kn::Vector3d & rayOrigin); 00081 00082 } 00083 00084 /* 00085 * End of Anti-doublon 00086 */ 00087 #endif