dbspindx.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. // (Rights in Technical Data and Computer Software), as applicable.
  12. //
  13. // Concrete implementation for 3d spatial indexing.
  14. //
  15. #ifndef AD_DBSPINDX_H
  16. #define AD_DBSPINDX_H
  17. #include "dbindex.h"
  18. #pragma pack (push, 8)
  19. class AcDbSpatialIndex: public AcDbIndex
  20. {
  21. public:
  22. ACDB_DECLARE_MEMBERS(AcDbSpatialIndex);
  23. AcDbSpatialIndex();
  24. virtual ~AcDbSpatialIndex();
  25. virtual AcDbFilteredBlockIterator* newIterator(const AcDbFilter* pFilter)
  26. const;
  27. virtual Acad::ErrorStatus rebuildFull(AcDbIndexUpdateData* pIdxData);
  28. protected:
  29. virtual Acad::ErrorStatus rebuildModified(AcDbBlockChangeIterator* iter);
  30. };
  31. class AcDbImpSpatialIndexIterator;
  32. class AcDbSpatialFilter;
  33. class AcDbSpatialIndexIterator : public AcDbFilteredBlockIterator
  34. {
  35. public:
  36. AcDbSpatialIndexIterator(const AcDbSpatialIndex* pIndex,
  37. const AcDbSpatialFilter* pFilter);
  38. virtual ~AcDbSpatialIndexIterator();
  39. virtual Acad::ErrorStatus start();
  40. virtual AcDbObjectId next();
  41. virtual AcDbObjectId id() const;
  42. virtual Acad::ErrorStatus seek(AcDbObjectId id);
  43. virtual double estimatedHitFraction() const;
  44. virtual Acad::ErrorStatus accepts(AcDbObjectId id,
  45. Adesk::Boolean& stat) const;
  46. private:
  47. AcDbImpSpatialIndexIterator* mpImpIter;
  48. };
  49. #pragma pack (pop)
  50. #endif // AD_DBSPINDX_H