Unit1.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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 "GLScene.hpp"
  12. #include "GLWin32Viewer.hpp"
  13. #include "GLCadencer.hpp"
  14. #include <GLNavigator.hpp>
  15. #include <GLShadowPlane.hpp>
  16. #include <GLExtrusion.hpp>
  17. #include "GLTexture.hpp"
  18. #include "GLObjects.hpp"
  19. #include "GLBaseClasses.hpp"
  20. #include "GLKeyboard.hpp"
  21. #include "GLCoordinates.hpp"
  22. #include "GLCrossPlatform.hpp"
  23. #include "GLVerletHairClasses.hpp"
  24. #include "GLVerletTypes.hpp"
  25. #include "GLVerletClasses.hpp"
  26. #include "ODEImport.hpp"
  27. #include "ODEUtils.hpp"
  28. #include "GLODECustomColliders.hpp"
  29. #include "GLODEManager.hpp"
  30. //---------------------------------------------------------------------------
  31. class TForm1 : public TForm
  32. {
  33. __published: // IDE-managed Components
  34. TGLSceneViewer *GLSceneViewer1;
  35. TPanel *Panel1;
  36. TLabel *Label1;
  37. TCheckBox *CheckBox_LockBall;
  38. TCheckBox *CheckBox_Inertia;
  39. TCheckBox *CheckBox_FurGravity;
  40. TCheckBox *CheckBox_WindResistence;
  41. TTrackBar *TrackBar_WindForce;
  42. TCheckBox *CheckBox_Bald;
  43. TCheckBox *CheckBox_Shadows;
  44. TGLCadencer *GLCadencer1;
  45. TGLScene *GLScene1;
  46. TGLDummyCube *DC_LightHolder;
  47. TGLLightSource *GLLightSource1;
  48. TGLSphere *Sphere1;
  49. TGLDummyCube *DCShadowCaster;
  50. TGLSphere *FurBall;
  51. TGLShadowPlane *GLShadowPlane_Floor;
  52. TGLShadowPlane *GLShadowPlane_Wall;
  53. TGLShadowPlane *GLShadowPlane_Floor2;
  54. TGLLines *GLLines1;
  55. TGLShadowPlane *GLShadowPlane_Wall2;
  56. TGLShadowPlane *GLShadowPlane_Wall3;
  57. TGLCamera *GLCamera1;
  58. TTimer *Timer1;
  59. TLabel *Label_FPS;
  60. void __fastcall FormMouseWheel(TObject *Sender, TShiftState Shift, int WheelDelta,
  61. TPoint &MousePos, bool &Handled);
  62. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  63. void __fastcall GLCadencer1Progress(TObject *Sender, const double deltaTime, const double newTime);
  64. void __fastcall CheckBox_FurGravityClick(TObject *Sender);
  65. void __fastcall CheckBox_WindResistenceClick(TObject *Sender);
  66. void __fastcall CheckBox_BaldClick(TObject *Sender);
  67. void __fastcall Timer1Timer(TObject *Sender);
  68. void __fastcall CheckBox_ShadowsClick(TObject *Sender);
  69. void __fastcall TrackBar_WindForceChange(TObject *Sender);
  70. void __fastcall CheckBox_InertiaClick(TObject *Sender);
  71. void __fastcall DC_LightHolderProgress(TObject *Sender, const double deltaTime,
  72. const double newTime);
  73. void __fastcall GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shift, int X,
  74. int Y);
  75. void __fastcall FormCreate(TObject *Sender);
  76. private: // User declarations
  77. int mX, mY;
  78. public: // User declarations
  79. __fastcall TForm1(TComponent* Owner);
  80. PdxBody odeFurBallBody;
  81. PdxGeom odeFurBallGeom;
  82. PdxWorld world;
  83. PdxSpace space;
  84. TdJointGroupID contactgroup;
  85. TVerletWorld *VerletWorld;
  86. TList *HairList;
  87. TVCSphere *VCSphere;
  88. float PhysicsTime;
  89. TVFGravity *Gravity;
  90. TVFAirResistance *AirResistance;
  91. void __fastcall CreateBall();
  92. void __fastcall CreateFur();
  93. void __fastcall CreateRandomHair();
  94. };
  95. //---------------------------------------------------------------------------
  96. extern PACKAGE TForm1 *Form1;
  97. //---------------------------------------------------------------------------
  98. #endif