fExPolygonC.h 2.3 KB

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