FineKernelToolKit
2.8.10
|
00001 /**************************************************************************** 00002 * 00003 * Copyright (c) 1999-2011, 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-2011, 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_MODIFY_HEADER__ 00073 #define __FK_MODIFY_HEADER__ 00074 00075 #include <FK/Operation.h> 00076 00078 00107 class fk_Modify : public fk_Operation { 00108 00109 private: 00110 bool CheckLoop4Cont(fk_Half *); 00111 00112 public: 00114 fk_Modify(fk_DataBase * = (fk_DataBase *)NULL); 00115 00117 virtual ~fk_Modify(); 00118 00120 //@( 00121 00123 00145 fk_Loop * removeVertexInLoop(fk_Vertex *V); 00146 00148 00178 bool contractEdge(fk_Edge *E, bool R = true); 00179 00181 00195 bool contractEdge(fk_Edge *E, fk_Vector P, bool R = true); 00196 00198 00205 bool checkContract(fk_Edge *E); 00206 //@) 00207 00209 //@( 00211 00231 fk_Loop * makePolygon(std::vector<fk_Vector> *array, 00232 bool openFlg, bool initFlg = true); 00233 00235 00255 fk_Loop * makePolygon(int num, fk_Vector *array, 00256 bool openFlg, bool initFlg = true); 00257 00259 00277 fk_Loop * pushPolygon(std::vector<fk_Vector> *array, 00278 bool openFlg = false); 00279 00281 00299 fk_Loop * pushPolygon(int num, fk_Vector *array, 00300 bool openFlg = false); 00301 00303 00316 void pushPolygonVertex(fk_Vector pos, bool openFlg); 00317 //@) 00318 00320 //@( 00322 00328 void makePoint(std::vector<fk_Vector> *array); 00329 00331 00338 void makePoint(int num, fk_Vector *array); 00339 00341 00348 fk_Vertex * pushPointVertex(fk_Vector pos); 00349 //@) 00350 00352 //@( 00354 00362 void makeLines(std::vector<fk_Vector> *array); 00363 00365 00376 void makeLines(int num, fk_Vector *array); 00377 00379 00387 fk_Edge * pushLines(fk_Vector pos1, fk_Vector pos2); 00388 00390 00402 bool setLinePos(int ID, fk_Vector pos); 00403 00405 00420 bool setLinePos(int edgeID, int vertexID, fk_Vector pos); 00421 00423 00437 bool changeLine(int edgeID, fk_Vector pos1, fk_Vector pos2); 00438 //@) 00439 00441 //@( 00443 00466 void makeBlock(double x, double y, double z); 00467 00469 00481 void setBlockSize(double x, double y, double z); 00482 00484 00498 void setBlockSize(double length, fk_Axis axis); 00499 00501 00511 void setBlockScale(double scale); 00512 00514 00528 void setBlockScale(double scale, fk_Axis axis); 00529 00531 00543 void setBlockScale(double x, double y, double z); 00544 //@) 00545 00547 //@( 00549 00568 void makeCircle(int div, double rad); 00569 00571 00581 void setCircleRadius(double rad); 00582 00584 00594 void setCircleDivide(int div); 00595 00597 00607 void setCircleScale(double scale); 00608 //@) 00609 00611 //@( 00613 00630 void makeSphere(int div, double rad); 00631 00633 00643 void setSphereRadius(double rad); 00644 00646 00656 void setSphereDivide(int div); 00657 00659 00669 void setSphereScale(double scale); 00670 //@) 00671 00673 //@( 00675 00695 void makePrism(int div, double top, 00696 double bottom, double height); 00697 00699 00709 void setPrismDivide(int div); 00710 00712 00722 void setPrismTopRadius(double top); 00723 00725 00735 void setPrismBottomRadius(double bottom); 00736 00738 00748 void setPrismHeight(double height); 00749 //@) 00750 00752 //@( 00754 00773 void makeCone(int div, double rad, double height); 00774 00776 00786 void setConeDivide(int div); 00787 00789 00799 void setConeRadius(double rad); 00800 00802 00812 void setConeHeight(double height); 00813 //@) 00814 00816 //@( 00818 00827 bool moveVPosition(int vertexID, fk_Vector pos, int order = 0); 00828 00830 00841 bool moveVPosition(int vertexID, double x, double y, double z, 00842 int order = 0); 00843 00845 00855 bool moveVPosition(int vertexID, double *array, int order = 0); 00856 //@) 00857 }; 00858 00859 #endif // !__FK_MODIFY_HEADER__