fcGLSViewer.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. //---------------------------------------------------------------------------
  2. #ifndef fcGLSViewerH
  3. #define fcGLSViewerH
  4. //---------------------------------------------------------------------------
  5. #include <System.Classes.hpp>
  6. #include <System.Actions.hpp>
  7. #include <System.ImageList.hpp>
  8. #include <Vcl.ActnCtrls.hpp>
  9. #include <Vcl.ActnList.hpp>
  10. #include <Vcl.ActnMan.hpp>
  11. #include <Vcl.ActnMenus.hpp>
  12. #include <Vcl.BandActn.hpp>
  13. #include <Vcl.ComCtrls.hpp>
  14. #include <Vcl.Dialogs.hpp>
  15. #include <Vcl.ExtCtrls.hpp>
  16. #include <Vcl.ImgList.hpp>
  17. #include <Vcl.StdActns.hpp>
  18. #include <Vcl.StdStyleActnCtrls.hpp>
  19. #include <Vcl.ToolWin.hpp>
  20. #include <Vcl.Controls.hpp>
  21. #include <Vcl.StdCtrls.hpp>
  22. #include <Vcl.Forms.hpp>
  23. #include "GLS.AsyncTimer.hpp"
  24. #include "GLS.BaseClasses.hpp"
  25. #include "GLS.Cadencer.hpp"
  26. #include "GLS.Coordinates.hpp"
  27. #include "GLS.Graph.hpp"
  28. #include "GLS.Material.hpp"
  29. #include "GLS.Objects.hpp"
  30. #include "GLS.GeomObjects.hpp"
  31. #include "GLS.MultiPolygon.hpp"
  32. #include "GLS.Extrusion.hpp"
  33. #include "GLS.Scene.hpp"
  34. #include "GLS.SceneViewer.hpp"
  35. #include "GLS.SimpleNavigation.hpp"
  36. #include "GLS.VectorFileObjects.hpp"
  37. #include "GLS.SkyDome.hpp"
  38. #include "GLS.Navigator.hpp"
  39. //---------------------------------------------------------------------------
  40. class TFormViewer : public TForm
  41. {
  42. __published: // IDE-managed Components
  43. TStatusBar *StatusBar;
  44. TGLSceneViewer *snViewer;
  45. TControlBar *ControlBar;
  46. TActionToolBar *atbTools;
  47. TActionToolBar *atbView;
  48. TActionToolBar *atbFile;
  49. TActionMainMenuBar *amMenuBar;
  50. TPanel *PanelLeft;
  51. TTreeView *tvScene;
  52. TGLScene *Scene;
  53. TGLCamera *Camera;
  54. TGLLightSource *LightSource;
  55. TGLXYZGrid *XYZGrid;
  56. TGLCube *CubeLines;
  57. TGLDummyCube *dcObject;
  58. TGLFreeForm *ffObject;
  59. TGLDummyCube *dcAxis;
  60. TGLDummyCube *dcWorld;
  61. TGLPoints *GLPoints;
  62. TGLMaterialLibrary *MaterialLib;
  63. TGLCadencer *Cadencer;
  64. TTimer *Timer;
  65. TActionManager *ActionManager;
  66. TAction *acOptimizeMesh;
  67. TAction *acProcessInvertNormals;
  68. TAction *acReverseRendering;
  69. TAction *acConvertToTriangles;
  70. TAction *acProcessStripify;
  71. TAction *acToolsOptions;
  72. TAction *acToolsFaceCulling;
  73. TAction *acToolsTexturing;
  74. TAction *acToolsLighting;
  75. TAction *acToolsNaviCube;
  76. TCustomizeActionBars *acToolsCustomize;
  77. TAction *acToolsShowFPS;
  78. TAction *acViewSmoothShading;
  79. TAction *acViewFlatShading;
  80. TAction *acViewFlatLines;
  81. TAction *acViewHiddenLines;
  82. TAction *acViewWireFrame;
  83. TAction *acViewZoomIn;
  84. TAction *acViewZoomOut;
  85. TAction *acViewReset;
  86. TAction *acFileOpen;
  87. TAction *acFilePick;
  88. TAction *acFileOpenTexLib;
  89. TAction *acFileSaveAs;
  90. TAction *acFileSaveTextures;
  91. TAction *acSaveTreeView;
  92. TAction *acLoadTreeView;
  93. TAction *acFileExit;
  94. THelpContents *acHelpContents;
  95. THelpTopicSearch *acHelpTopicSearch;
  96. TAction *acHelpGLSHomePage;
  97. TAction *acHelpAbout;
  98. TAction *acAADefault;
  99. TAction *acAA2X;
  100. TAction *acAA4X;
  101. TEditUndo *acEditUndo;
  102. TEditCut *acEditCut;
  103. TEditCopy *acEditCopy;
  104. TEditPaste *acEditPaste;
  105. TEditSelectAll *acEditSelectAll;
  106. TEditDelete *acEditDelete;
  107. TAction *acAA8X;
  108. TAction *acAA16X;
  109. TAction *acCSA8X;
  110. TAction *acCSA16X;
  111. TAction *acPoints;
  112. TAction *acToolsInfo;
  113. TAction *acSpheres;
  114. TImageList *ImageListMenu;
  115. TGLAsyncTimer *AsyncTimer;
  116. TGLSimpleNavigation *GLSimpleNavigation;
  117. TImageList *ImageListObjects;
  118. TOpenDialog *OpenDialog;
  119. TSaveDialog *SaveDialog;
  120. void __fastcall tvSceneClick(TObject *Sender);
  121. void __fastcall FormCreate(TObject *Sender);
  122. private: // User declarations
  123. TFileName AssetPath;
  124. TFileName TextureDir;
  125. // Base objects
  126. TGLLines *Lines;
  127. TGLPlane *Plane;
  128. TGLPolygon *Polygon;
  129. TGLCube *Cube;
  130. TGLFrustrum *Frustrum;
  131. TGLSphere *Sphere;
  132. TGLDisk *Disk;
  133. TGLCone *Cone;
  134. TGLCylinder *Cylinder;
  135. TGLCapsule *Capsule;
  136. TGLDodecahedron *Dodecahedron;
  137. TGLIcosahedron *Icosahedron;
  138. TGLHexahedron *Hexahedron;
  139. TGLOctahedron *Octahedron;
  140. TGLTetrahedron *Tetrahedron;
  141. // TGLSuperEllipsoid *SuperEllipsoid;
  142. // Advanced objects
  143. TGLAnnulus *Annulus;
  144. TGLArrowLine *ArrowLine;
  145. TGLArrowArc *ArrowArc;
  146. TGLMultiPolygon *MultiPolygon;
  147. TGLRevolutionSolid *RevolutionSolid;
  148. TGLExtrusionSolid *ExtrusionSolid;
  149. // Mesh objects
  150. TGLActor *Actor;
  151. TGLFreeForm *FreeForm;
  152. TGLMeshObject *MeshObject;
  153. // Environment objects
  154. TGLSkyBox *SkyBox;
  155. TGLSkyDome *SkyDome;
  156. TGLEarthSkyDome *EarthSkyDome;
  157. /*
  158. void DoResetCamera;
  159. void SetupFreeFormShading;
  160. void ApplyShadeModeToMaterial(aMaterial: TGLMaterial);
  161. void ApplyShadeMode;
  162. void ApplyFSAA;
  163. void ApplyFaceCull;
  164. void ApplyTexturing;
  165. void ApplyFPS;
  166. void DoOpen(const FileName: String);
  167. */
  168. public: // User declarations
  169. __fastcall TFormViewer(TComponent* Owner);
  170. bool md, nthShow;
  171. int mx, my;
  172. TGLShader *hlShader;
  173. /// StringlastFileName;
  174. bool lastLoadWithTextures;
  175. /*
  176. void ApplyBgColor;
  177. void ReadIniFile; override;
  178. void WriteIniFile;
  179. */
  180. };
  181. //---------------------------------------------------------------------------
  182. extern PACKAGE TFormViewer *FormViewer;
  183. //---------------------------------------------------------------------------
  184. #endif