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 "GLS.Scene.hpp"
  14. #include "GLS.Objects.hpp"
  15. #include "GLS.Graph.hpp"
  16. #include "GLS.Collision.hpp"
  17. #include "GLS.Texture.hpp"
  18. #include "GLS.VectorGeometry.hpp"
  19. #include "GLS.VectorFileObjects.hpp"
  20. #include "GLS.SceneViewer.hpp"
  21. #include "GLS.SpaceText.hpp"
  22. #include "GLS.GeomObjects.hpp"
  23. #include "GLS.Color.hpp"
  24. #include "GLS.Coordinates.hpp"
  25. #include "GLS.BaseClasses.hpp"
  26. #include "GLS.BitmapFont.hpp"
  27. #include "GLS.WindowsFont.hpp"
  28. #include "GLS.HUDObjects.hpp"
  29. //---------------------------------------------------------------------------
  30. class TForm1 : public TForm
  31. {
  32. __published: // IDE-managed Components
  33. TGLSceneViewer *Scn;
  34. TPanel *Panel1;
  35. TLabel *Label2;
  36. TLabel *Label1;
  37. TLabel *Label3;
  38. TLabel *Label4;
  39. TLabel *Label5;
  40. TButton *Button1;
  41. TGroupBox *GroupBox1;
  42. TCheckBox *ShowAxes;
  43. TGLScene *GLScene1;
  44. TGLCube *Floor;
  45. TGLLightSource *TopLight1;
  46. TGLCube *Cube1;
  47. TGLCube *Cube2;
  48. TGLDummyCube *DummyCube1;
  49. TGLArrowLine *XArrow;
  50. TGLArrowLine *YArrow;
  51. TGLArrowLine *ZArrow;
  52. TGLSpaceText *TxtX;
  53. TGLSpaceText *TxtY;
  54. TGLSpaceText *TxtZ;
  55. TGLCamera *GLCamera1;
  56. TGLHUDText *TopText;
  57. TGLHUDText *ObjText;
  58. TGLWindowsBitmapFont *GLWindowsBitmapFont1;
  59. void __fastcall FormCreate(TObject *Sender);
  60. void __fastcall ScnMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  61. int X, int Y);
  62. void __fastcall ScnMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
  63. void __fastcall ShowAxesClick(TObject *Sender);
  64. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  65. TPoint &MousePos, bool &Handled);
  66. void __fastcall FormKeyPress(TObject *Sender, System::WideChar &Key);
  67. void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
  68. private: // User declarations
  69. Gls::Vectorgeometry::TVector lastMouseWorldPos;
  70. bool movingOnZ;
  71. TGLCustomSceneObject *CurrentPick;
  72. int ScnMouseMoveCnt;
  73. Gls::Vectorgeometry::TVector __fastcall MouseWorldPos(int X, int Y);
  74. void __fastcall UpdateHudText();
  75. void __fastcall ProcessPick(TGLBaseSceneObject* pick);
  76. public: // User declarations
  77. __fastcall TForm1(TComponent* Owner);
  78. };
  79. //---------------------------------------------------------------------------
  80. extern PACKAGE TForm1 *Form1;
  81. //---------------------------------------------------------------------------
  82. #endif