fObjmoveC.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //---------------------------------------------------------------------------
  2. #ifndef fObjmoveCH
  3. #define fObjmoveCH
  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. #include <Vcl.ComCtrls.hpp>
  30. #include "GLS.Navigator.hpp"
  31. #include "GLS.SmoothNavigator.hpp"
  32. //---------------------------------------------------------------------------
  33. class TForm1 : public TForm
  34. {
  35. __published: // IDE-managed Components
  36. TGLSceneViewer *Scn;
  37. TPanel *Panel1;
  38. TLabel *Label2;
  39. TLabel *Label3;
  40. TLabel *Label4;
  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. TStatusBar *StatusBar;
  61. TGLSmoothNavigator *GLSmoothNavigator1;
  62. void __fastcall FormCreate(TObject *Sender);
  63. void __fastcall ScnMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  64. int X, int Y);
  65. void __fastcall ScnMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
  66. void __fastcall ShowAxesClick(TObject *Sender);
  67. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  68. TPoint &MousePos, bool &Handled);
  69. void __fastcall FormKeyPress(TObject *Sender, System::WideChar &Key);
  70. void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
  71. private: // User declarations
  72. TGLVector lastMouseWorldPos;
  73. bool movingOnZ;
  74. TGLCustomSceneObject *CurrentPick;
  75. int ScnMouseMoveCnt;
  76. TGLVector __fastcall MouseWorldPos(int X, int Y);
  77. void __fastcall UpdateHudText();
  78. void __fastcall ProcessPick(TGLBaseSceneObject* pick);
  79. public: // User declarations
  80. __fastcall TForm1(TComponent* Owner);
  81. };
  82. //---------------------------------------------------------------------------
  83. extern PACKAGE TForm1 *Form1;
  84. //---------------------------------------------------------------------------
  85. #endif