24#ifndef _SpatialIndex_h_Included_
25#define _SpatialIndex_h_Included_
29#ifdef SPATIALINDEX_DLL_EXPORTS
30 #define ODSI_API OD_TOOLKIT_EXPORT
31 #define ODSI_API_STATIC OD_STATIC_EXPORT
33 #define ODSI_API OD_TOOLKIT_IMPORT
34 #define ODSI_API_STATIC OD_STATIC_IMPORT
132 kSiPlanar = (1 << 0),
133 kSiModifyMtAware = (1 << 1),
134 kSiAccessMtAware = (1 << 2),
136 kSiFullMtAware = (kSiModifyMtAware | kSiAccessMtAware)
267 m_shapes.reserve(shapes.
size());
269 m_shapes.push_back((*it)->clone());
282 if(!(*it)->contains(extents, planar,
tol))
292 if(!(*it)->intersects(extents, planar,
tol))
310 (*it)->transform(tf);
OdArray< OdSiShape *, OdMemoryAllocator< OdSiShape * > > OdSiShapePtrArray
OdSmartPtr< OdSiSpatialIndex > OdSiSpatialIndexPtr
OdArray< const OdSiShape *, OdMemoryAllocator< const OdSiShape * > > OdSiShapeConstPtrArray
void push_back(const T &value)
void reserve(size_type reserveLength)
const const OdSiShape * * const_iterator
static OdSiSpatialIndexPtr createObject(OdUInt32 flags, unsigned int initialNumEntity, unsigned int maxDepth=30, unsigned int maxCount=20, double eps=1e-10)
virtual void setTolerance(const OdGeTol &tol)=0
virtual void insert(OdSiEntity *entity)=0
virtual void setMaxNodeSize(unsigned char maxCount)=0
virtual unsigned maxNodeSize() const =0
ODRX_DECLARE_MEMBERS(OdSiSpatialIndex)
virtual unsigned maxTreeDepth() const =0
virtual void query(const OdSiShape &shape, OdSiVisitor &visitor) const =0
virtual bool remove(OdSiEntity *entity)=0
virtual const OdGeTol & tolerance() const =0
virtual bool extents(OdGeExtents3d &extents) const =0
virtual void setMaxTreeDepth(unsigned char maxDepth)=0
bool ODSI_API properExtents(const OdGeExtents3d &ext)
static GE_STATIC_EXPORT OdGeTol gTol
virtual void update(const OdGeExtents3d &we) const =0
virtual bool extents(OdGeExtents3d &extents) const =0
virtual OdSiShape * clone() const
static ODSI_API_STATIC const OdSiShape & kOverallSpace
virtual bool contains(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol=OdGeContext::gTol) const =0
virtual bool intersects(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol=OdGeContext::gTol) const =0
virtual void transform(const OdGeMatrix3d &)
static bool isOverallSpace(const OdSiShape *ptr)
static ODSI_API_STATIC const OdSiShape & kNoSpace
static bool isNoSpace(const OdSiShape *ptr)
virtual OdSiShape * clone() const
void reset(const OdSiShapeConstPtrArray &shapes)
const OdSiShapePtrArray & shapes() const
virtual void transform(const OdGeMatrix3d &tf)
virtual bool intersects(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol=OdGeContext::gTol) const
virtual bool contains(const OdGeExtents3d &extents, bool planar, const OdGeTol &tol=OdGeContext::gTol) const
~OdSiShapesIntersection()
OdSiShapesIntersection(const OdSiShapeConstPtrArray &shapes)
virtual void visit(OdSiEntity *entity, bool completelyInside)=0