File mechanics/src/collision/native/SpaceFilter.hpp¶
Go to the source code of this file
Spatial filtering of interactions for 2D/3D objects.
Functions
-
DEFINE_SPTR(space_hash)¶
Basic broad phase contact detection between 2D/3D mechanical systems.
algorithm description: Optimized Spatial Hashing for Collision Detection of Deformable Objects M. Teschner, B. Heidelberger, M. Mueller, D. Pomeranets, M. Gross Proceedings of VMV’03 Munich, Germany pp. 47-54 November 19-21, 2003
-
DEFINE_SPTR(DiskDiskRDeclaredPool)¶
-
DEFINE_SPTR(DiskPlanRDeclaredPool)¶
-
DEFINE_SPTR(CircleCircleRDeclaredPool)¶
-
class SpaceFilter : public InteractionManager, public std::enable_shared_from_this<SpaceFilter>
Subclassed by OccSpaceFilter
Public Functions
-
SpaceFilter(unsigned int bboxfactor, unsigned int cellsize, SP::SiconosMatrix plans, SP::FMatrix moving_plans)¶
-
SpaceFilter()¶
-
void insert(SP::Disk, int, int, int)
2D/3D objects insertion
-
void insert(SP::Hashed)
general hashed object
-
inline unsigned int bboxfactor()
get parameters
-
inline unsigned int cellsize()¶
-
inline void setBBoxfactor(unsigned int value)¶
-
inline void setCellsize(unsigned int value)¶
-
bool haveNeighbours(SP::Hashed h)
get the neighbours
Just test the presence of neighbours.
- Parameters
h – hashed component of a body.
-
double minDistance(SP::Hashed h)
Give the minimal distance.
- Parameters
h – hashed component of a body.
-
void updateInteractions(SP::Simulation simulation) override
Broadphase contact detection: add interactions in indexSet 0.
- Parameters
simulation – the current simulation setup
-
void insertLine(double a, double b, double c)¶
-
inline virtual ~SpaceFilter()
Destructor.
-
ACCEPT_STD_VISITORS()¶
Protected Functions
-
ACCEPT_SERIALIZATION(SpaceFilter)¶
-
void _PlanCircularFilter(SP::Simulation, double A, double B, double C, double xCenter, double yCenter, double width, SP::CircularDS ds)¶
Protected Attributes
-
unsigned int _bboxfactor¶
the bounding box factor is multiplicated by the largest object dimension
-
unsigned int _cellsize¶
the cell size
Friends
- friend struct SpaceFilter::_CircularFilter
- friend struct SpaceFilter::_SphereLDSFilter
- friend struct SpaceFilter::_SphereNEDSFilter
- friend struct SpaceFilter::_BodyHash
- friend struct SpaceFilter::_FindInteractions
- friend struct SpaceFilter::_IsSameDiskPlanR
- friend struct SpaceFilter::_IsSameDiskMovingPlanR
- friend struct SpaceFilter::_IsSameSpherePlanR
- friend struct SpaceFilter::_DiskDistance
-
SpaceFilter(unsigned int bboxfactor, unsigned int cellsize, SP::SiconosMatrix plans, SP::FMatrix moving_plans)¶