fcGLSViewer.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "fcGLSViewer.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma link "GLS.AsyncTimer"
  8. #pragma link "GLS.BaseClasses"
  9. #pragma link "GLS.Cadencer"
  10. #pragma link "GLS.Coordinates"
  11. #pragma link "GLS.Graph"
  12. #pragma link "GLS.Material"
  13. #pragma link "GLS.Objects"
  14. #pragma link "GLS.GeomObjects"
  15. #pragma link "GLS.MultiPolygon"
  16. #pragma link "GLS.Extrusion"
  17. #pragma link "GLS.Scene"
  18. #pragma link "GLS.SceneViewer"
  19. #pragma link "GLS.SimpleNavigation"
  20. #pragma link "GLS.VectorFileObjects"
  21. #pragma link "GLS.SkyDome"
  22. #pragma link "GLS.Navigator"
  23. #pragma resource "*.dfm"
  24. TFormViewer *FormViewer;
  25. TGLNaviCube *NaviCube;
  26. //---------------------------------------------------------------------------
  27. __fastcall TFormViewer::TFormViewer(TComponent* Owner)
  28. : TForm(Owner)
  29. {
  30. }
  31. //---------------------------------------------------------------------------
  32. void __fastcall TFormViewer::tvSceneClick(TObject *Sender)
  33. {
  34. //
  35. }
  36. //---------------------------------------------------------------------------
  37. void __fastcall TFormViewer::FormCreate(TObject *Sender)
  38. {
  39. AssetPath = GetCurrentAssetPath();
  40. TextureDir = AssetPath + '\\texture';
  41. SetCurrentDir(TextureDir);
  42. // NaviCube = TGLNaviCube->CreateAsChild(Scene->Objects);
  43. // NaviCube->SceneViewer = snViewer;
  44. // NaviCube->FPS = 30;
  45. // instantiate our specific hidden-lines shader
  46. // hlShader = THiddenLineShader.Create(Self);
  47. ffObject->IgnoreMissingTextures = True;
  48. tvScene->FullExpand();
  49. // tvScene->Select(tvScene->Items[9]); // goto to Cube
  50. tvSceneClick(this);
  51. }
  52. //---------------------------------------------------------------------------