00001 /**************************************************************************** 00002 * 00003 * Copyright (c) 1999-2009, Fine Kernel Project, All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, 00006 * with or without modification, are permitted provided that the 00007 * following conditions are met: 00008 * 00009 * - Redistributions of source code must retain the above 00010 * copyright notice, this list of conditions and the 00011 * following disclaimer. 00012 * 00013 * - Redistributions in binary form must reproduce the above 00014 * copyright notice, this list of conditions and the 00015 * following disclaimer in the documentation and/or 00016 * other materials provided with the distribution. 00017 * 00018 * - Neither the name of the copyright holders nor the names 00019 * of its contributors may be used to endorse or promote 00020 * products derived from this software without specific 00021 * prior written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00026 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00027 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00028 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00029 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00031 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00032 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00033 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00034 * POSSIBILITY OF SUCH DAMAGE. 00035 * 00036 ****************************************************************************/ 00037 /**************************************************************************** 00038 * 00039 * Copyright (c) 1999-2009, Fine Kernel Project, All rights reserved. 00040 * 00041 * 本ソフトウェアおよびソースコードのライセンスは、基本的に 00042 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。 00043 * 00044 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、 00045 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。 00046 * 00047 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、 00048 * および下記免責条項を含めること。 00049 * 00050 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の 00051 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を 00052 * 含めること。 00053 * 00054 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の 00055 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または 00056 * コントリビューターの名前を使用してはならない。 00057 * 00058 * 本ソフトウェアは、著作権者およびコントリビューターによって「現 00059 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、 00060 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ 00061 * に限定されない、いかなる保証もないものとします。著作権者もコン 00062 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを 00063 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その 00064 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可 00065 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生 00066 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、 00067 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、 00068 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に 00069 * ついて、一切責任を負わないものとします。 00070 * 00071 ****************************************************************************/ 00072 #ifndef __FK_REFERENCE_HEADER__ 00073 #define __FK_REFERENCE_HEADER__ 00074 00075 #include <FK/Edge.h> 00076 00077 class fk_Vertex; 00078 class fk_Half; 00079 class fk_Loop; 00080 00081 #include <vector> 00082 00083 /* 00084 ここで定義する参照関数 --- 00085 00086 頂点に関連する関数 00087 - fk_Half * getOneHOnV(fk_Vertex *) 00088 - vector<fk_Half *> getAllHOnV(fk_Vertex *) 00089 - vector<fk_Edge *> getEOnVV(fk_Vertex *, fk_Vertex *) 00090 - fk_Edge * getOneEOnV(fk_Vertex *) 00091 - vector<fk_Edge *> getAllEOnV(fk_Vertex *) 00092 - int getENumOnV(fk_Vertex *) 00093 - fk_Loop * getOneLOnV(fk_Vertex *) 00094 - vector<fk_Loop *> getAllLOnV(fk_Vertex *) 00095 - vector<fk_Vertex *> getAllNeighborVOnV(fk_Vertex *) 00096 00097 半稜線に関連する関数 00098 - fk_Vertex * getVOnH(fk_Half *) 00099 - fk_Half * getMateHOnH(fk_Half *) 00100 - fk_Edge * getParentEOnH(fk_Half *) 00101 - fk_Loop * getParentLOnH(fk_Half *) 00102 00103 稜線に関連する関数 00104 - fk_Vertex * getRightVOnE(fk_Edge *) 00105 - fk_Vertex * getLeftVOnE(fk_Edge *) 00106 - fk_Half * getRightHOnE(fk_Edge *) 00107 - fk_Half * getLeftHOnE(fk_Edge *) 00108 - fk_Loop * getRightLOnE(fk_Edge *) 00109 - fk_Loop * getLeftLOnE(fk_Edge *) 00110 - fk_EdgeStatus getEdgeStatus(fk_Edge *) 00111 00112 ループに関連する関数 00113 - fk_Vertex * getOneVonL(fk_Loop *) 00114 - vector<fk_Vertex *> getAllVOnL(fk_Loop *) 00115 - int getVNumOnL(fk_Loop *) 00116 - fk_Half * getOneHOnL(fk_Loop *) 00117 - vector<fk_Half *> getAllHOnL(fk_Loop *) 00118 - fk_Edge * getOneEOnL(fk_Loop *) 00119 - vector<fk_Edge *> getAllEOnL(fk_Loop *) 00120 - fk_Loop * getOneNeighorLOnL(fk_Loop *) 00121 - vector<fk_Loop *> getAllNeighborLOnL(fk_Loop *) 00122 - fk_Loop * getNeighborLOnLH(fk_Loop *, fk_Half *) 00123 - fk_Loop * getNeighborLOnLE(fk_Loop *, fk_Edge *) 00124 00125 */ 00126 00128 00142 class fk_ReferenceL1 { 00143 public: 00144 00146 //@( 00147 00149 00157 fk_Half * getOneHOnV(fk_Vertex *V) const; 00158 00160 00168 fk_Edge * getOneEOnV(fk_Vertex *V) const; 00169 //@) 00170 00172 //@( 00173 00175 00182 fk_Vertex * getVOnH(fk_Half *H) const; 00183 00185 00192 fk_Half * getMateHOnH(fk_Half *H) const; 00193 00195 00202 fk_Edge * getParentEOnH(fk_Half *H) const; 00203 00205 00213 fk_Loop * getParentLOnH(fk_Half *H) const; 00214 //@) 00215 00217 //@( 00218 00220 00227 fk_Vertex * getRightVOnE(fk_Edge *E) const; 00228 00230 00237 fk_Vertex * getLeftVOnE(fk_Edge *E) const; 00238 00240 00247 fk_Half * getRightHOnE(fk_Edge *E) const; 00248 00250 00257 fk_Half * getLeftHOnE(fk_Edge *E) const; 00258 00260 00268 fk_Loop * getRightLOnE(fk_Edge *E) const; 00269 00271 00279 fk_Loop * getLeftLOnE(fk_Edge *E) const; 00280 00282 00295 fk_EdgeStatus getEdgeStatus(fk_Edge *E) const; 00296 00297 //@) 00298 00300 //@( 00301 00303 00310 fk_Vertex * getOneVOnL(fk_Loop *L) const; 00311 00313 00320 fk_Half * getOneHOnL(fk_Loop *L) const; 00321 00323 00330 fk_Edge * getOneEOnL(fk_Loop *L) const; 00331 //@) 00332 }; 00333 00335 00349 class fk_ReferenceL2 : public fk_ReferenceL1 { 00350 public: 00351 00353 //@( 00354 00356 00364 fk_Vertex * getOneNeighborVOnV(fk_Vertex *V) const; 00365 00367 00375 std::vector<fk_Half *> getAllHOnV(fk_Vertex *V) const; 00376 00378 00386 std::vector<fk_Edge *> getAllEOnV(fk_Vertex *V) const; 00387 00389 00397 std::vector<fk_Loop *> getAllLOnV(fk_Vertex *V) const; 00398 00400 00407 int getENumOnV(fk_Vertex *V) const; 00408 00409 //@) 00410 00412 //@( 00413 00415 00423 std::vector<fk_Vertex *> getAllVOnL(fk_Loop *L) const; 00424 00426 00434 std::vector<fk_Half *> getAllHOnL(fk_Loop *L) const; 00435 00437 00445 std::vector<fk_Edge *> getAllEOnL(fk_Loop *L) const; 00446 00448 00456 fk_Loop * getOneNeighborLOnL(fk_Loop *L) const; 00457 00459 00471 fk_Loop * getNeighborLOnLH(fk_Loop *L, 00472 fk_Half *H) const; 00474 00481 int getVNumOnL(fk_Loop *L) const; 00482 00483 //@) 00484 }; 00485 00486 00488 00502 class fk_ReferenceL3 : public fk_ReferenceL2 { 00503 public: 00504 00506 00514 std::vector<fk_Vertex *> getAllNeighborVOnV(fk_Vertex *V) const; 00515 00517 00526 std::vector<fk_Edge *> getEOnVV(fk_Vertex *V1, fk_Vertex *V2) const; 00527 00529 00537 fk_Loop * getOneLOnV(fk_Vertex *V) const; 00538 00540 00552 fk_Loop * getNeighborLOnLE(fk_Loop *L, fk_Edge *E) const; 00553 00555 00563 std::vector<fk_Loop *> getAllNeighborLOnL(fk_Loop *L) const; 00564 }; 00565 00566 #endif // !__FK_REFERENCE_HEADER__