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)
DEFINE_SPTR(DiskDiskRDeclaredPool)
DEFINE_SPTR(DiskPlanRDeclaredPool)
DEFINE_SPTR(CircleCircleRDeclaredPool)
DEFINE_SPTR(Hashed)
class SpaceFilter : public InteractionManager, public std11::enable_shared_from_this<SpaceFilter>

Public Functions

SpaceFilter(unsigned int bboxfactor, unsigned int cellsize, SP::SiconosMatrix plans, SP::FMatrix moving_plans)
SpaceFilter(unsigned int bboxfactor, unsigned int cellsize, SP::SiconosMatrix plans)
SpaceFilter()
virtual ~SpaceFilter()

Destructor.

ACCEPT_STD_VISITORS()

visitor hook

unsigned int bboxfactor()

get parameters

unsigned int cellsize()
bool haveNeighbours(SP::Hashed h)

get the neighbours

Just test the presence of neighbours.

Parameters
  • h: hashed component of a body.

void insert(SP::Disk, int, int, int)

2D/3D objects insertion

void insert(SP::Circle, int, int, int)
void insert(SP::SphereLDS, int, int, int)
void insert(SP::SphereNEDS, int, int, int)
void insert(SP::Hashed)

general hashed object

double minDistance(SP::Hashed h)

Give the minimal distance.

Parameters
  • h: hashed component of a body.

virtual void updateInteractions(SP::Simulation simulation)

Broadphase contact detection: add interactions in indexSet 0.

Parameters
  • simulation: the current simulation setup

Protected Functions

void _MovingPlanCircularFilter(SP::Simulation, unsigned int i, SP::CircularDS ds, double time)
void _PlanCircularFilter(SP::Simulation, double A, double B, double C, double xCenter, double yCenter, double width, SP::CircularDS ds)
void _PlanSphereLDSFilter(SP::Simulation, double A, double B, double C, double D, SP::SphereLDS ds)
void _PlanSphereNEDSFilter(SP::Simulation, double A, double B, double C, double D, SP::SphereNEDS ds)
ACCEPT_SERIALIZATION(SpaceFilter)

serialization hooks

Protected Attributes

unsigned int _bboxfactor

the bounding box factor is multiplicated by the largest object dimension

unsigned int _cellsize

the cell size

SP::space_hash _hash_table
SP::FMatrix _moving_plans

moving plans

SP::SiconosMatrix _plans

plans

SP::CircleCircleRDeclaredPool circlecircle_relations
SP::DiskDiskRDeclaredPool diskdisk_relations
SP::DiskPlanRDeclaredPool diskplan_relations

Friends

friend SpaceFilter::_BodyHash
friend SpaceFilter::_CircularFilter
friend SpaceFilter::_DiskDistance
friend SpaceFilter::_FindInteractions
friend SpaceFilter::_IsSameDiskMovingPlanR
friend SpaceFilter::_IsSameDiskPlanR
friend SpaceFilter::_IsSameSpherePlanR
friend SpaceFilter::_SphereLDSFilter
friend SpaceFilter::_SphereNEDSFilter