dbNavSettings.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. // Name: dbNavSettings.h
  12. //
  13. // Description: 3D Navigation Tools DB Settings API, along with AcDbHomeView
  14. //
  15. ///////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. #pragma pack(push, 8)
  18. class AcDbImpHomeView;
  19. ///////////////////////////////////////////////////////////////////////////////
  20. //
  21. // class AcDbHomeView - navigation home view settings class
  22. //
  23. class AcDbHomeView
  24. {
  25. public:
  26. ACDB_PORT AcDbHomeView();
  27. ACDB_PORT AcDbHomeView(const AcDbHomeView& rhvw);
  28. ACDB_PORT virtual ~AcDbHomeView();
  29. // Member variable routines
  30. ACDB_PORT const AcGePoint3d& eye() const;
  31. ACDB_PORT const AcGePoint3d& center() const;
  32. ACDB_PORT const AcGeVector3d& up() const;
  33. ACDB_PORT const double width() const;
  34. ACDB_PORT const double height() const;
  35. ACDB_PORT const bool isPerspective() const;
  36. ACDB_PORT void setEye (const AcGePoint3d& ptEye);
  37. ACDB_PORT void setCenter (const AcGePoint3d& ptCenter);
  38. ACDB_PORT void setUp (const AcGeVector3d& vUp);
  39. ACDB_PORT void setWidth (double dWidth);
  40. ACDB_PORT void setHeight (double dHeight);
  41. ACDB_PORT void setPerspective (bool bPerspective);
  42. // DB access utility
  43. ACDB_PORT Acad::ErrorStatus setHomeView(AcDbDatabase * pDb) const;
  44. ACDB_PORT Acad::ErrorStatus getHomeView(AcDbDatabase * pDb,
  45. bool bCreateDefault = false);
  46. // Fill members with default values
  47. ACDB_PORT void toggleDefaultSettings();
  48. ACDB_PORT bool operator == (const AcDbHomeView& rhvw) const;
  49. ACDB_PORT bool operator != (const AcDbHomeView& rhvw) const;
  50. ACDB_PORT AcDbHomeView& operator = (const AcDbHomeView& rhvw);
  51. ACDB_PORT bool isDefaultHomeView() const;
  52. private:
  53. AcDbImpHomeView * mpImpObj;
  54. };
  55. // Navigation home view routine
  56. ACDB_PORT
  57. Acad::ErrorStatus acdbSetHomeView(AcDbDatabase * pDb,
  58. const AcDbHomeView& hmView);
  59. ACDB_PORT
  60. Acad::ErrorStatus acdbGetHomeView(AcDbDatabase * pDb,
  61. AcDbHomeView& hmView);
  62. // ViewCube compass show/hide
  63. ACDB_PORT Acad::ErrorStatus
  64. acdbSetShowCompass(AcDbDatabase * pDb,
  65. bool bShow);
  66. ACDB_PORT Acad::ErrorStatus
  67. acdbGetShowCompass(AcDbDatabase * pDb,
  68. bool & bShow);
  69. #pragma pack(pop)