2
0

Unit1.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <Vcl.Controls.hpp>
  7. #include <Vcl.StdCtrls.hpp>
  8. #include <Vcl.Forms.hpp>
  9. #include "GLBaseClasses.hpp"
  10. #include "GLCadencer.hpp"
  11. #include "GLCameraController.hpp"
  12. #include "GLCoordinates.hpp"
  13. #include "GLCrossPlatform.hpp"
  14. #include "GLGeomObjects.hpp"
  15. #include "GLGraph.hpp"
  16. #include "GLMaterial.hpp"
  17. #include "GLNavigator.hpp"
  18. #include "GLObjects.hpp"
  19. #include "GLScene.hpp"
  20. #include "GLSmoothNavigator.hpp"
  21. #include "GLWin32Viewer.hpp"
  22. #include <Vcl.ExtCtrls.hpp>
  23. #include <Vcl.Graphics.hpp>
  24. //---------------------------------------------------------------------------
  25. class TForm1 : public TForm
  26. {
  27. __published: // IDE-managed Components
  28. TPanel *Panel1;
  29. TPanel *Panel2;
  30. TLabel *Label1;
  31. TLabel *Label2;
  32. TLabel *Label3;
  33. TLabel *Label5;
  34. TEdit *eDestX;
  35. TEdit *eDestY;
  36. TEdit *eDestZ;
  37. TPanel *Panel3;
  38. TLabel *Label6;
  39. TLabel *Label9;
  40. TEdit *eDistance;
  41. TPanel *Panel4;
  42. TLabel *Label7;
  43. TLabel *Label8;
  44. TLabel *Label10;
  45. TLabel *Label11;
  46. TLabel *Label12;
  47. TEdit *eSafeDistance;
  48. TEdit *eTimeToSafePlacement;
  49. TEdit *eTimeToOrbit;
  50. TEdit *eTimeToZoomBackIn;
  51. TPanel *Panel5;
  52. TLabel *Label13;
  53. TLabel *Label14;
  54. TEdit *eTime;
  55. TButton *btnMoveToPos;
  56. TButton *btnZoomToDistance;
  57. TButton *btnOrbitToPos;
  58. TButton *btnSafeOrbitAndZoomToPos;
  59. TButton *btnOrbitToPosAdv;
  60. TPanel *Panel8;
  61. TLabel *Label20;
  62. TPanel *Panel7;
  63. TLabel *Label16;
  64. TLabel *Label17;
  65. TLabel *Label18;
  66. TLabel *Label19;
  67. TEdit *camDirY;
  68. TEdit *camDirZ;
  69. TPanel *Panel9;
  70. TLabel *Label21;
  71. TLabel *Label22;
  72. TLabel *Label23;
  73. TLabel *Label24;
  74. TEdit *camUpX;
  75. TEdit *camUpY;
  76. TEdit *camUpZ;
  77. TCheckBox *UpAxis;
  78. TCheckBox *cbMoveParent;
  79. TButton *btSmoothOrbit;
  80. TButton *btSmoothOrbitToPosAdv;
  81. TButton *btSmoothOrbitAndZoom;
  82. TGLSceneViewer *GLSceneViewer1;
  83. TPanel *pImg;
  84. TImage *Image1;
  85. TLabel *Label4;
  86. TPanel *Panel6;
  87. TLabel *Label15;
  88. TGLScene *GLScene1;
  89. TGLDummyCube *dcMovingParent;
  90. TGLCamera *GLCamera;
  91. TGLLightSource *GLLightSource1;
  92. TGLDummyCube *dcSphere;
  93. TGLSphere *GLSphere1;
  94. TGLCylinder *GLCylinder1;
  95. TGLSphere *GLSphere2;
  96. TGLSphere *GLSphere3;
  97. TGLDummyCube *dcDebugGUI;
  98. TGLArrowLine *ArrowLine;
  99. TGLXYZGrid *XYZGrid;
  100. TGLPlane *GLPlane1;
  101. TGLMaterialLibrary *GLMaterialLibrary1;
  102. TGLCadencer *GLCadencer1;
  103. TTimer *Timer1;
  104. TGLCameraController *GLCameraController1;
  105. TGLSmoothNavigator *GLSmoothNavigator;
  106. TEdit *camDirX;
  107. void __fastcall btnMoveToPosClick(TObject *Sender);
  108. void __fastcall btnZoomToDistanceClick(TObject *Sender);
  109. void __fastcall btnOrbitToPosClick(TObject *Sender);
  110. void __fastcall btnSafeOrbitAndZoomToPosClick(TObject *Sender);
  111. void __fastcall btSmoothOrbitClick(TObject *Sender);
  112. void __fastcall btSmoothOrbitAndZoomClick(TObject *Sender);
  113. void __fastcall btSmoothOrbitToPosAdvClick(TObject *Sender);
  114. void __fastcall btnOrbitToPosAdvClick(TObject *Sender);
  115. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  116. TPoint &MousePos, bool &Handled);
  117. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  118. void __fastcall GLSceneViewer1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  119. int X, int Y);
  120. void __fastcall GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shift, int X,
  121. int Y);
  122. void __fastcall GLSceneViewer1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift,
  123. int X, int Y);
  124. void __fastcall Timer1Timer(TObject *Sender);
  125. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  126. void __fastcall FormCreate(TObject *Sender);
  127. private: // User declarations
  128. int mx, my;
  129. double DextX, DextY, DextZ, Time, ZoomDistance;
  130. TGLCameraController *FGLCameraController;
  131. TGLNavigatorSmoothChangeVector *FCameraSmoothAnimator_AbsPos;
  132. TGLNavigatorSmoothChangeVector *FCameraSmoothAnimator_RelPos;
  133. void __fastcall GetInput(TButton *Sender);
  134. Glvectortypes::TVector4f __fastcall (__closure *TGLNavigatorSmoothChangeVectorGetEvent)
  135. (TGLNavigatorSmoothChangeVector* const ASender);
  136. Glvectorgeometry::TVector __fastcall OnGetCameraPosition(
  137. TGLNavigatorSmoothChangeVector* const ASender);
  138. void __fastcall OnSetCameraPosition(TGLNavigatorSmoothChangeVector* const ASender,
  139. const Glvectortypes::TVector4f &AValue);
  140. public: // User declarations
  141. __fastcall TForm1(TComponent* Owner);
  142. };
  143. //---------------------------------------------------------------------------
  144. extern PACKAGE TForm1 *Form1;
  145. //---------------------------------------------------------------------------
  146. #endif