/* Hyperbolic Tessellations Copyright (C) 2007 Dmitry Brant http://dmitrybrant.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ //--------------------------------------------------------------------------- #ifndef ChildFormH #define ChildFormH //--------------------------------------------------------------------------- #include #include #include #include #include #include #include "myvector.h" #include "mycomplex.h" #include "mymatrix.h" #include "MathFuncs.h" #include "Isometry.h" #include "hyperbolicutils.h" #include "schwarzpolygons.h" #include "mygraphics.h" #include "hyperbolicdraw.h" // Constants representing motion models const int TRACKBALL = 0; const int DRAG_GEODESIC = 1; const int DRAG_NONPRECESSING = 2; const int DRAG_PURETRANSLATE = 3; const int DRAG_PURETRANSLATE_CLAMPED = 4; const int PRIMAL = 0; const int DUAL = 8; const int RUNCINATED = 9; const int OMNITRUNCATED = 10; //--------------------------------------------------------------------------- class TfrmChild : public TForm { __published: // IDE-managed Components void __fastcall FormClose(TObject *Sender, TCloseAction &Action); void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y); void __fastcall FormPaint(TObject *Sender); void __fastcall FormActivate(TObject *Sender); void __fastcall FormResize(TObject *Sender); void __fastcall FormDestroy(TObject *Sender); private: // User declarations Isometry currentIsometry; PickableSchwarzPolygon currentPickableSchwarzPolygon; int motionModel; int prevX; int prevY; int dim; MyGraphics* mg; bool mouseDownLeft, mouseDownRight, mouseDownMiddle; int frames; DWORD ctime; void changeCurrentWythoffSoCanonicalVertIsAt(complex p); public: // User declarations int schlafli_p, schlafli_q; int lineThickness; int currentOperation; bool antiAlias; int driverSelection; TessellationSettings settings; Vector currentWythoff; void setAntiAlias(bool yep); void setDriver(int d); //0 = windows, 1 = opengl void setCurrentOperation(int op); void resetOrientation(); void makeSnubUniform(); void drawIt(); __fastcall TfrmChild(TComponent* Owner); }; //--------------------------------------------------------------------------- #endif