Unit1.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  4. //---------------------------------------------------------------------------
  5. #include <vcl.h>
  6. #include <tchar.h>
  7. //---------------------------------------------------------------------------
  8. #include <System.Classes.hpp>
  9. #include <System.hpp>
  10. #include <Vcl.Controls.hpp>
  11. #include <Vcl.StdCtrls.hpp>
  12. #include <Vcl.Forms.hpp>
  13. #include <Vcl.ComCtrls.hpp>
  14. #include <Vcl.ExtCtrls.hpp>
  15. #include "GLS.Scene.hpp"
  16. #include "GLS.VectorFileObjects.hpp"
  17. #include "GLS.SceneViewer.hpp"
  18. #include "GLS.Objects.hpp"
  19. #include "GLS.BaseClasses.hpp"
  20. #include "GLS.BitmapFont.hpp"
  21. #include "GLS.Coordinates.hpp"
  22. #include "GLS.HUDObjects.hpp"
  23. #include "GLS.Material.hpp"
  24. #include "GLS.WindowsFont.hpp"
  25. #include "GLS.RenderContextInfo.hpp"
  26. #include "GLS.Graphics.hpp"
  27. #include "GLS.State.hpp"
  28. #include "GLS.TextureFormat.hpp"
  29. #include "GLSL.UserShader.hpp"
  30. //---------------------------------------------------------------------------
  31. typedef
  32. // Structures used in our binary file
  33. // The structure is quite simplified here, original data came from a FEM
  34. // package and was in (huge) text files, and parsing text files is not the
  35. // purpose of this demo, so data was simplified ;)
  36. struct TDataNode
  37. {
  38. float X;
  39. float Y;
  40. float Z;
  41. float Intensity;
  42. } * DataNodes;
  43. struct TDataPrimitive {
  44. Word Node1;
  45. Word Node2;
  46. Word Node3;
  47. Word Node4; // if Node4 is OxFFFF, codes a triangle
  48. } * DataPrimitives;
  49. //---------------------------------------------------------------------------
  50. class TForm1 : public TForm
  51. {
  52. __published: // IDE-managed Components
  53. TGLSceneViewer *GLSceneViewer1;
  54. TPanel *Panel1;
  55. TLabel *Label1;
  56. TCheckBox *CBWireFrame;
  57. TCheckBox *CBSmooth;
  58. TTrackBar *TBScale;
  59. TGLScene *GLScene1;
  60. TGLFreeForm *GLFreeForm;
  61. TGLDummyCube *DCTarget;
  62. TGLCamera *GLCamera;
  63. TGLHUDSprite *HSPalette;
  64. TGLHUDText *HTPaletteLeft;
  65. TGLHUDText *HTPaletteRight;
  66. TGLMaterialLibrary *GLMaterialLibrary1;
  67. TGLUserShader *GLUserShader;
  68. TGLWindowsBitmapFont *GLWindowsBitmapFont;
  69. void __fastcall FormCreate(TObject *Sender);
  70. void __fastcall TBScaleChange(TObject *Sender);
  71. void __fastcall GLSceneViewer1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  72. int X, int Y);
  73. void __fastcall GLSceneViewer1MouseMove(TObject *Sender, TShiftState Shift, int X,
  74. int Y);
  75. private: // User declarations
  76. int mx, my;
  77. public: // User declarations
  78. __fastcall TForm1(TComponent* Owner);
  79. };
  80. //---------------------------------------------------------------------------
  81. extern PACKAGE TForm1 *Form1;
  82. //---------------------------------------------------------------------------
  83. #endif