00001 #ifndef ManipulatorH 00002 #define ManipulatorH 00003 00004 /******************************************************************************* 00005 Copyright 1998,1999,2000,2001,2002 Petr Kulhanek 00006 00007 This file is part of Core plugin. 00008 00009 Core plugin is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 Core plugin is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with Core plugin; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 *******************************************************************************/ 00023 /******************************************************************************* 00024 ** PROJEKT: Projekt NEMESIS 00025 ** SOUBOR: manipulator.h 00026 ** ÚČEL: slouží pro manipulaci s molekulou a projektem 00027 ** VERZE: 3.0 00028 ** JAZYK: CBuilder C++ v1.0 00029 ** CÍLOVÝ POČÍTAČ: IBM PC 00030 ** PROGRAMÁTOR: Petr Kulhánek 00031 ** HISTORIE ÚPRAV: 00032 VERZE DATUM POZNÁMKA 00033 3.0 19.09.1998 do třídy byly zahrnuty všechny informace o poloze a natočení 00034 4.0 2000-04-15 upraveno pro novou verzi NEMESIS 00035 *******************************************************************************/ 00036 00040 /* HLAVIČKOVÉ SOUBORY ********************************************************/ 00041 00042 #include "CoreMainHeader.h" 00043 #include "Point.h" 00044 #include "Transformation.h" 00045 00046 /* KONEC HLAVIČKOVÝCH SOUBORů *************************************************/ 00047 00048 /* DEFINICE TŘÍD **************************************************************/ 00049 00050 //------------------------------------------------------------------------------ 00051 00053 00056 enum EDrawLevel{ 00057 DRAW_NORMAL_LEVEL=0, 00058 DRAW_MANIPULATOR_LEVEL, 00059 DRAW_PRINT_LEVEL, 00060 DRAW_NUM_OF_LEVELS, 00061 }; 00062 00063 //------------------------------------------------------------------------------ 00064 00065 /* TŘÍDA: CManipulateModificator 00066 ÚČEL: modifikuje standardní chování manipulátoru 00067 */ 00068 00069 class CManipulateModificator { 00070 public: 00071 00072 00073 }; 00074 00075 //------------------------------------------------------------------------------ 00076 00077 00079 00082 class NEMESIS_CORE_PACKAGE CManipulator{ 00083 public: 00084 // konstruktor objektu -------------------------------------------------------- 00085 __fastcall CManipulator(void); 00086 00087 // výkonné operace pro posun a natočení --------------------------------------- 00088 virtual void __fastcall Move(const CPoint& dmov, // provede natočení 00089 const CManipulateModificator& mod); 00090 virtual void __fastcall Rotate(const CPoint& drot, // provede pootočení 00091 const CManipulateModificator& mod); 00092 virtual void __fastcall SetLevel(EDrawLevel level); 00093 00094 virtual bool __fastcall StartManipulate(void); 00095 00096 // zjišťovací operace a nastavovací operace ----------------------------------- 00097 void __fastcall SetRotate(const CPoint& rot); 00098 void __fastcall SetPos(const CPoint& pos); 00099 void __fastcall SetTrans(const CTransformation& tran); 00100 const CPoint& __fastcall GetPos(void) const; 00101 const CPoint& __fastcall GetRotate(void) const; 00102 const CTransformation& __fastcall GetTrans(void) const; 00103 00104 void __fastcall SetCentrum(const CPoint& centrum); 00105 inline const CPoint& __fastcall GetCentrum(void); 00106 00107 // vykreslení objektu se kterým se manipuluje --------------------------------- 00108 virtual void __fastcall ManipDraw(void); 00109 00110 // sekce soukromých dat ------------------------------------------------------- 00111 private: 00112 CTransformation Trans; // natočení objektu 00113 CPoint Pos; // poloha objektu 00114 CPoint Centrum; // falesný stred scény 00115 virtual void __fastcall _Draw(void); // vykreslí objekt, v surovém stavu 00116 }; 00117 00118 //------------------------------------------------------------------------------ 00119 00120 inline const CPoint& __fastcall CManipulator::GetCentrum(void) 00121 { 00122 return(Centrum); 00123 } 00124 00125 /* KONEC DEFINICE TŘÍD ********************************************************/ 00126 00127 #endif 00128 00129