SPH
Public Member Functions | List of all members
IOverlapHandler Class Referenceabstract

Handles overlaps of particles. More...

#include <Collision.h>

Inheritance diagram for IOverlapHandler:
Polymorphic AggregateOverlapHandler InternalBounceHandler MergeBoundHandler MergeOverlapHandler NullOverlapHandler RepelHandler< TFollowupHandler >

Public Member Functions

virtual void initialize (Storage &storage)=0
 
virtual bool overlaps (const Size i, const Size j) const =0
 Returns true if two particles overlaps. More...
 
virtual void handle (const Size i, const Size j, FlatSet< Size > &toRemove)=0
 Handles the overlap of two particles. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Handles overlaps of particles.

Interface similar to ICollisionHandler, but unlike collision result, overlaps has no result - particles either overlap or not. Note that overlaps are processed before collisions and if two particles do not overlap (overlaps returns false), the check for collisions is skipped.

Definition at line 54 of file Collision.h.

Member Function Documentation

◆ handle()

virtual void IOverlapHandler::handle ( const Size  i,
const Size  j,
FlatSet< Size > &  toRemove 
)
pure virtual

Handles the overlap of two particles.

When called, the particles must actually overlap (overlaps must return true). This is checked by assert.

Implemented in MergeBoundHandler, InternalBounceHandler, RepelHandler< TFollowupHandler >, MergeOverlapHandler, and AggregateOverlapHandler.

◆ initialize()

virtual void IOverlapHandler::initialize ( Storage storage)
pure virtual

◆ overlaps()

virtual bool IOverlapHandler::overlaps ( const Size  i,
const Size  j 
) const
pure virtual

Returns true if two particles overlaps.

If so, the overlap is then resolved using handle.

Parameters
i,jIndices of particles in the storage.

Implemented in MergeBoundHandler, InternalBounceHandler, and AggregateOverlapHandler.


The documentation for this class was generated from the following file: