Unit1.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ComCtrls.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include "GLS.Scene.hpp"
  12. #include "GLS.SceneViewer.hpp"
  13. #include "GLS.Cadencer.hpp"
  14. #include "Import.ODE.hpp"
  15. #include "Physics.ODEUtils.hpp"
  16. #include <GLS.Navigator.hpp>
  17. #include <GLS.ShadowPlane.hpp>
  18. #include <GLS.Extrusion.hpp>
  19. #include "GLS.Texture.hpp"
  20. #include "GLS.Objects.hpp"
  21. #include "GLS.BaseClasses.hpp"
  22. #include "GLS.Keyboard.hpp"
  23. #include "GLS.Coordinates.hpp"
  24. #include "GLS.VerletHairClasses.hpp"
  25. #include "GLS.VerletTypes.hpp"
  26. //---------------------------------------------------------------------------
  27. class TForm1 : public TForm
  28. {
  29. __published: // IDE-managed Components
  30. TGLSceneViewer *GLSceneViewer1;
  31. TPanel *Panel1;
  32. TLabel *Label1;
  33. TCheckBox *CheckBox_LockBall;
  34. TCheckBox *CheckBox_Inertia;
  35. TCheckBox *CheckBox_FurGravity;
  36. TCheckBox *CheckBox_WindResistence;
  37. TTrackBar *TrackBar_WindForce;
  38. TCheckBox *CheckBox_Bald;
  39. TCheckBox *CheckBox_Shadows;
  40. TGLCadencer *GLCadencer1;
  41. TGLScene *GLScene1;
  42. TGLDummyCube *DC_LightHolder;
  43. TGLLightSource *GLLightSource1;
  44. TGLSphere *Sphere1;
  45. TGLDummyCube *DCShadowCaster;
  46. TGLSphere *FurBall;
  47. TGLShadowPlane *GLShadowPlane_Floor;
  48. TGLShadowPlane *GLShadowPlane_Wall;
  49. TGLShadowPlane *GLShadowPlane_Floor2;
  50. TGLLines *GLLines1;
  51. TGLShadowPlane *GLShadowPlane_Wall2;
  52. TGLShadowPlane *GLShadowPlane_Wall3;
  53. TGLCamera *GLCamera1;
  54. TTimer *Timer1;
  55. TLabel *Label_FPS;
  56. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  57. TPoint &MousePos, bool &Handled);
  58. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  59. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  60. void __fastcall CheckBox_FurGravityClick(TObject *Sender);
  61. void __fastcall CheckBox_WindResistenceClick(TObject *Sender);
  62. void __fastcall CheckBox_BaldClick(TObject *Sender);
  63. void __fastcall Timer1Timer(TObject *Sender);
  64. void __fastcall CheckBox_ShadowsClick(TObject *Sender);
  65. void __fastcall TrackBar_WindForceChange(TObject *Sender);
  66. void __fastcall CheckBox_InertiaClick(TObject *Sender);
  67. void __fastcall DC_LightHolderProgress(TObject *Sender, const double deltaTime,
  68. const double newTime);
  69. void __fastcall GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shift, int X,
  70. int Y);
  71. void __fastcall FormCreate(TObject *Sender);
  72. private: // User declarations
  73. int mX, mY;
  74. public: // User declarations
  75. __fastcall TForm1(TComponent* Owner);
  76. PdxBody odeFurBallBody;
  77. PdxGeom odeFurBallGeom;
  78. PdxWorld world;
  79. PdxSpace space;
  80. TdJointGroupID contactgroup;
  81. TGLVerletWorld *VerletWorld;
  82. TList *HairList;
  83. TVCSphere *VCSphere;
  84. float PhysicsTime;
  85. TVFGravity *Gravity;
  86. TVFAirResistance *AirResistance;
  87. void __fastcall CreateBall();
  88. void __fastcall CreateFur();
  89. void __fastcall CreateRandomHair();
  90. };
  91. //---------------------------------------------------------------------------
  92. extern PACKAGE TForm1 *Form1;
  93. //---------------------------------------------------------------------------
  94. #endif