dbspfilt.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. //
  13. // DESCRIPTION: Source file for the AcDbSpatialFilter class.
  14. //
  15. #ifndef AD_DBSPFILT_H
  16. #define AD_DBSPFILT_H
  17. #include "dbfilter.h"
  18. #include "gepnt2d.h"
  19. #include "gevec2d.h"
  20. #include "gept2dar.h"
  21. #pragma pack (push, 8)
  22. // Applies to both front and back clip
  23. //
  24. #define ACDB_INFINITE_XCLIP_DEPTH (1.0e+300)
  25. class AcDbExtents;
  26. class AcDbSpatialFilter: public AcDbFilter
  27. {
  28. public:
  29. ACDB_DECLARE_MEMBERS(AcDbSpatialFilter);
  30. AcDbSpatialFilter();
  31. virtual ~AcDbSpatialFilter();
  32. virtual AcRxClass* indexClass() const;
  33. // To Be Obsoleted...
  34. virtual void queryBounds(AcDbExtents& ext,
  35. const AcDbBlockReference * pRefBlkRef) const;
  36. AcDbSpatialFilter(const AcGePoint2dArray& pts,
  37. const AcGeVector3d& normal,
  38. double elevation,
  39. double frontClip,
  40. double backClip,
  41. Adesk::Boolean enabled);
  42. void queryBounds(AcDbExtents& ext) const;
  43. Acad::ErrorStatus getVolume(AcGePoint3d& fromPt,
  44. AcGePoint3d& toPt,
  45. AcGeVector3d& upDir,
  46. AcGeVector2d& viewField) const;
  47. Acad::ErrorStatus setDefinition(const AcGePoint2dArray& pts,
  48. const AcGeVector3d& normal,
  49. double elevation,
  50. double frontClip,
  51. double backClip,
  52. Adesk::Boolean enabled);
  53. Acad::ErrorStatus getDefinition(AcGePoint2dArray& pts,
  54. AcGeVector3d& normal,
  55. double& elevation,
  56. double& frontClip,
  57. double& backClip,
  58. Adesk::Boolean& enabled) const;
  59. AcGeMatrix3d& getClipSpaceToWCSMatrix(AcGeMatrix3d& mat) const;
  60. AcGeMatrix3d& getOriginalInverseBlockXform(AcGeMatrix3d& mat) const;
  61. // New functions to support large dwg project.
  62. //
  63. Acad::ErrorStatus setPerspectiveCamera(const AcGePoint3d& fromPt);
  64. Adesk::Boolean clipVolumeIntersectsExtents(const AcDbExtents& ext) const;
  65. Adesk::Boolean hasPerspectiveCamera() const;
  66. ACDB_PORT bool isInverted() const;
  67. ACDB_PORT Acad::ErrorStatus setInverted(bool bInverted);
  68. };
  69. #pragma pack (pop)
  70. #endif // AD_DBSPFILT_H