Unit1.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <vcl.h>
  6. #include <tchar.h>
  7. //---------------------------------------------------------------------------
  8. #include <System.Classes.hpp>
  9. #include <Vcl.Controls.hpp>
  10. #include <Vcl.StdCtrls.hpp>
  11. #include <Vcl.Forms.hpp>
  12. #include <Vcl.ExtCtrls.hpp>
  13. #include "GLScene.hpp"
  14. #include "GLObjects.hpp"
  15. #include "GLGraph.hpp"
  16. #include "GLCollision.hpp"
  17. #include "GLTexture.hpp"
  18. #include "GLVectorGeometry.hpp"
  19. #include "GLVectorFileObjects.hpp"
  20. #include "GLWin32Viewer.hpp"
  21. #include "GLSpaceText.hpp"
  22. #include "GLGeomObjects.hpp"
  23. #include "GLColor.hpp"
  24. #include "GLCrossPlatform.hpp"
  25. #include "GLCoordinates.hpp"
  26. #include "GLBaseClasses.hpp"
  27. #include "GLBitmapFont.hpp"
  28. #include "GLWindowsFont.hpp"
  29. #include "GLHUDObjects.hpp"
  30. //---------------------------------------------------------------------------
  31. class TForm1 : public TForm
  32. {
  33. __published: // IDE-managed Components
  34. TGLSceneViewer *Scn;
  35. TPanel *Panel1;
  36. TLabel *Label2;
  37. TLabel *Label1;
  38. TLabel *Label3;
  39. TLabel *Label4;
  40. TLabel *Label5;
  41. TButton *Button1;
  42. TGroupBox *GroupBox1;
  43. TCheckBox *ShowAxes;
  44. TGLScene *GLScene1;
  45. TGLCube *Floor;
  46. TGLLightSource *TopLight1;
  47. TGLCube *Cube1;
  48. TGLCube *Cube2;
  49. TGLDummyCube *DummyCube1;
  50. TGLArrowLine *XArrow;
  51. TGLArrowLine *YArrow;
  52. TGLArrowLine *ZArrow;
  53. TGLSpaceText *TxtX;
  54. TGLSpaceText *TxtY;
  55. TGLSpaceText *TxtZ;
  56. TGLCamera *GLCamera1;
  57. TGLHUDText *TopText;
  58. TGLHUDText *ObjText;
  59. TGLWindowsBitmapFont *GLWindowsBitmapFont1;
  60. void __fastcall FormCreate(TObject *Sender);
  61. void __fastcall ScnMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  62. int X, int Y);
  63. void __fastcall ScnMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
  64. void __fastcall ShowAxesClick(TObject *Sender);
  65. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  66. TPoint &MousePos, bool &Handled);
  67. void __fastcall FormKeyPress(TObject *Sender, System::WideChar &Key);
  68. void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
  69. private: // User declarations
  70. Glvectorgeometry::TVector lastMouseWorldPos;
  71. bool movingOnZ;
  72. TGLCustomSceneObject *CurrentPick;
  73. int ScnMouseMoveCnt;
  74. Glvectorgeometry::TVector __fastcall MouseWorldPos(int X, int Y);
  75. void __fastcall UpdateHudText();
  76. void __fastcall ProcessPick(TGLBaseSceneObject* pick);
  77. public: // User declarations
  78. __fastcall TForm1(TComponent* Owner);
  79. };
  80. //---------------------------------------------------------------------------
  81. extern PACKAGE TForm1 *Form1;
  82. //---------------------------------------------------------------------------
  83. #endif