Unit1.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //---------------------------------------------------------------------------
  2. #ifndef Unit1H
  3. #define Unit1H
  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 "GLScene.hpp"
  13. #include "GLObjects.hpp"
  14. #include "GLGeomObjects.hpp"
  15. #include "GLTexture.hpp"
  16. #include "GLMultiPolygon.hpp"
  17. #include "GlvectorGeometry.hpp"
  18. #include "GLWin32Viewer.hpp"
  19. #include "GLCrossPlatform.hpp"
  20. #include "GLMaterial.hpp"
  21. #include "GLCoordinates.hpp"
  22. #include "GLBaseClasses.hpp"
  23. //---------------------------------------------------------------------------
  24. struct TVektor
  25. {
  26. double x;
  27. double y;
  28. double z;
  29. };
  30. class TForm1 : public TForm
  31. {
  32. __published: // IDE-managed Components
  33. TGLSceneViewer *GLSceneViewer1;
  34. TGLScene *GLScene1;
  35. TGLLightSource *GLLightSource1;
  36. TGLLightSource *GLLightSource2;
  37. TGLDummyCube *Container;
  38. TGLDummyCube *CameraTarget;
  39. TGLCamera *Camera;
  40. TGLMaterialLibrary *GLMaterialLibrary1;
  41. void __fastcall FormShow(TObject *Sender);
  42. private: // User declarations
  43. int mx,my;
  44. double FDY;
  45. double FDX;
  46. double FDZ;
  47. TGLMultiPolygon __fastcall GetPlane(int Side);
  48. void __fastcall SetDX(const double Value);
  49. void __fastcall SetDY(const double Value);
  50. void __fastcall SetDZ(const double Value);
  51. void __fastcall CreatePanel();
  52. void __fastcall AddMaterial(TGLSceneObject *Obj);
  53. void __fastcall ReDraw();
  54. TVektor __fastcall TransformToPlane(int Side, double x, double y, double z); //overload;
  55. TVektor __fastcall TransformToPlane(int Side, TVektor v); // overload;
  56. public: // User declarations
  57. __fastcall TForm1(TComponent* Owner);
  58. void __fastcall MakeHole(int Side, double X, double Y, double Z,
  59. double D, double T, double Phi, double Rho);
  60. /// property Plane[Side:Integer]:TGLMultiPolygon read GetPlane;
  61. __property double DX = {read=FDX, write=SetDX};
  62. __property double DY = {read=FDY, write=SetDY};
  63. __property double DZ = {read=FDZ, write=SetDZ};
  64. };
  65. //---------------------------------------------------------------------------
  66. extern PACKAGE TForm1 *Form1;
  67. //---------------------------------------------------------------------------
  68. #endif