00001
00002
00003 #ifndef MDIFirstHitH
00004 #define MDIFirstHitH
00005
00006 #include "MDIEdit.h"
00007 #include <Classes.hpp>
00008 #include <Controls.hpp>
00009 #include <StdCtrls.hpp>
00010 #include <Forms.hpp>
00011 #include <ComCtrls.hpp>
00012 #include <Menus.hpp>
00013 #include <Dialogs.hpp>
00014 #include <Printers.hpp>
00015 #include <Clipbrd.hpp>
00016 #include <ExtCtrls.hpp>
00017 #include <ActnCtrls.hpp>
00018 #include <ActnMan.hpp>
00019 #include <CustomizeDlg.hpp>
00020 #include <ToolWin.hpp>
00021 #include <stdlib.h>
00022 #include <gl\gl.h>
00023 #include <gl\glu.h>
00024
00025 class TFirstHitForm : public TForm
00026 {
00027 __published:
00028 TPanel *Hauptpanel;
00029 TBevel *Bevel;
00030 TGroupBox *GroupBox;
00031 TPanel *tPanel;
00032 TTrackBar *TrackBar;
00033 TLabel *Label1;
00034 TLabel *threshhold;
00035 TCheckBox *trilinear;
00036 TCheckBox *trilinear2;
00037 TGroupBox *GroupBox1;
00038 TEdit *textx;
00039 TLabel *Label2;
00040 TEdit *texty;
00041 TGroupBox *GroupBox2;
00042 TLabel *Label4;
00043 TEdit *tyrot;
00044 TEdit *txrot;
00045 TEdit *tzrot;
00046 TLabel *Label5;
00047 TLabel *Label6;
00048 TGroupBox *GroupBox3;
00049 TButton *Button1;
00050 TCheckBox *arepaint;
00051 void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
00052 void __fastcall FormCreate(TObject *Sender);
00053 void __fastcall FormResize(TObject *Sender);
00054 void __fastcall FormPaint(TObject *Sender);
00055 void __fastcall FormActivate(TObject *Sender);
00056 void __fastcall TrackBarChange(TObject *Sender);
00057 void __fastcall Button1Click(TObject *Sender);
00058 void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,
00059 TShiftState Shift, int X, int Y);
00060 void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button,
00061 TShiftState Shift, int X, int Y);
00062 void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
00063 int X, int Y);
00064 private:
00065 HDC hdc;
00066 HGLRC hrc;
00067 int PixelFormat, xres,yres, thresh;
00068 float w, h, wh;
00069 vertex o, dx,dy,dz, ppos, pos;
00070 float xratio, yratio;
00071 int ox,oy, mrotx, mroty;
00072 bool mdown;
00073 void __fastcall PaintGL();
00074 void __fastcall PrepareGLWindow();
00075 void __fastcall RayCast();
00076 public:
00077 __fastcall TFirstHitForm(TComponent* Owner);
00078 void __fastcall SetPixelFormatDescriptor();
00079 };
00080
00081 extern PACKAGE TFirstHitForm *FirstHitForm;
00082
00083 #endif