00001 /* 00002 * lib-corefinement : Opérations de corafinement. 00003 * Copyright (C) 2004, Moka Team, Université de Poitiers, Laboratoire SIC 00004 * http://www.sic.sp2mi.univ-poitiers.fr/ 00005 * Copyright (C) 2009, Guillaume Damiand, CNRS, LIRIS, 00006 * guillaume.damiand@liris.cnrs.fr, http://liris.cnrs.fr/ 00007 * 00008 * This file is part of lib-corefinement 00009 * 00010 * This program is free software: you can redistribute it and/or modify 00011 * it under the terms of the GNU Lesser General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public License 00021 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 */ 00023 00024 #ifndef EDGE_INTERSECTION_HH 00025 #define EDGE_INTERSECTION_HH 00026 00027 #include <iostream> 00028 00029 #include "inline-macro.hh" 00030 #include "g-map-vertex.hh" 00031 #include "corefinement-win32.hh" 00032 00033 namespace GMap3d 00034 { 00036 typedef enum {EP_OnFirstVertex, EP_OnSecondVertex, 00037 EP_OnEdge, EP_OutOfEdge} TPositionOnEdge; 00038 00049 DLL_COREFINEMENT std::ostream & operator << (std::ostream & AStream, TPositionOnEdge APos); 00050 00052 00057 class DLL_COREFINEMENT CEdgeIntersection 00058 { 00059 public: 00060 00065 00074 CEdgeIntersection(CDart * AIntersectedCell = NULL, 00075 TCoordinate AIntersectionParameter = 0.0, 00076 CVertex const & AIntersectionPoint = ORIGIN, 00077 int AIntersectedCellDimension = 0, 00078 TPositionOnEdge AIntersectionPosition = EP_OutOfEdge); 00079 00081 00086 00087 CDart * getCell() const; 00088 TCoordinate getParameter() const; 00089 CVertex const & getPoint() const; 00090 int getCellDimension() const; 00091 TPositionOnEdge getPosition() const; 00092 00093 void setCell(CDart * ADart); 00094 void setParameter(TCoordinate AParameter); 00095 void setPoint(CVertex const & APoint); 00096 void setCellDimension(int ADimension); 00097 void setPosition(TPositionOnEdge APosition); 00098 00100 00101 private: 00102 00107 00108 CDart * FIntersectedCell; 00109 00110 TCoordinate FIntersectionParameter; 00111 00112 CVertex FIntersectionPoint; 00113 00114 int FIntersectedCellDimension; 00115 00116 TPositionOnEdge FIntersectionPosition; 00117 00119 }; 00120 00121 DLL_COREFINEMENT std::ostream& operator<<(std::ostream & AStream, 00122 const CEdgeIntersection & AInter); 00123 00124 } // namespace GMap3d 00125 00126 #include INCLUDE_INLINE("edge-intersection.icc") 00127 00128 #endif