NuTo
Numerics Tool
|
Base class for all collidables. More...
#include <CollidableBase.h>
Public Types | |
typedef std::vector< CollidableParticleSphere * > | ParticleContainer |
Public Member Functions | |
CollidableBase (int rIndex) | |
constructor, initialized with an index More... | |
virtual | ~CollidableBase () |
destructor More... | |
int | GetIndex () const |
getter for collidable index More... | |
virtual void | PerformCollision (CollidableBase &rCollidable)=0 |
collision handling, resolve double dispatch More... | |
virtual void | PerformCollision (CollidableParticleSphere &rSphere)=0 |
collision handling, resolve double dispatch More... | |
virtual void | PerformCollision (CollidableWallBase &rWall)=0 |
collision handling, resolve double dispatch More... | |
virtual double | PredictCollision (CollidableBase &rCollidable, int &rType)=0 |
collision prediction between (this) and collision partner More... | |
virtual double | PredictCollision (CollidableParticleSphere &rSphere, int &rType)=0 |
collision prediction between (this) and collision partner More... | |
virtual double | PredictCollision (CollidableWallBase &rWall, int &rType)=0 |
collision prediction between (this) and collision partner More... | |
void | AddBox (SubBox &rBox) |
adds a SubBox to this collidable More... | |
void | RemoveBox (SubBox &rBox) |
removes a SubBox from this collidable More... | |
virtual void | MoveAndGrow (double rTime)=0 |
updates this collidable in time More... | |
virtual void | GetLocalEventsToDelete (LocalEvents &rEventsToDelete) const =0 |
returns all old events, that need to be deleted More... | |
void | PrintLocalEvents () const |
prints the local event list More... | |
const std::vector< SubBox * > & | GetSubBoxes () const |
returns all the SubBoxes of this collidable More... | |
virtual void | Print (std::ostream &rReturnStream) const =0 |
prints information based on derived class type. More... | |
Protected Attributes | |
int | mIndex |
index, just a name for each collidable, multiple collidables with the same index possible More... | |
std::vector< SubBox * > | mBoxes |
list of SubBoxes in which this collidable is inside if the collidable is passing a virutal sub box wall, multiple mBoxes are possible More... | |
LocalEvents | mLocalEvents |
local event list adding single event: through EventBase::AddLocalEvents() remove single event: through EventBase::~EventBase() clear everything: on collision More... | |
Friends | |
class | Event |
friend class for easy local event list access More... | |
std::ostream & | operator<< (std::ostream &rOutStream, const CollidableBase *rCollidable) |
standard output for all collidables, calls Print(...) for polymorph behaviour More... | |
Base class for all collidables.
typedef std::vector<CollidableParticleSphere*> NuTo::CollidableBase::ParticleContainer |
NuTo::CollidableBase::CollidableBase | ( | int | rIndex | ) |
constructor, initialized with an index
rIndex | index, multiple collidables with same index are allowed |
|
virtual |
destructor
void NuTo::CollidableBase::AddBox | ( | SubBox & | rBox | ) |
int NuTo::CollidableBase::GetIndex | ( | ) | const |
getter for collidable index
|
pure virtual |
returns all old events, that need to be deleted
rEventsToDelete | return argument |
Implemented in NuTo::CollidableParticleSphere, and NuTo::CollidableWallBase.
const std::vector< NuTo::SubBox * > & NuTo::CollidableBase::GetSubBoxes | ( | ) | const |
returns all the SubBoxes of this collidable
|
pure virtual |
updates this collidable in time
rTime | new global time |
Implemented in NuTo::CollidableWallBase, and NuTo::CollidableParticleSphere.
|
pure virtual |
collision handling, resolve double dispatch
rCollidable | collision partner |
Implemented in NuTo::CollidableParticleSphere, and NuTo::CollidableWallBase.
|
pure virtual |
collision handling, resolve double dispatch
rSphere | collision partner |
Implemented in NuTo::CollidableParticleSphere, NuTo::CollidableWallBase, NuTo::CollidableWallVirtual, NuTo::CollidableWallCylinder, and NuTo::CollidableWallPhysical.
|
pure virtual |
collision handling, resolve double dispatch
rWall | collision partner |
Implemented in NuTo::CollidableParticleSphere, and NuTo::CollidableWallBase.
|
pure virtual |
collision prediction between (this) and collision partner
rCollidable | collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implemented in NuTo::CollidableParticleSphere, and NuTo::CollidableWallBase.
|
pure virtual |
collision prediction between (this) and collision partner
rSphere | collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implemented in NuTo::CollidableParticleSphere, NuTo::CollidableWallBase, NuTo::CollidableWallVirtual, NuTo::CollidableWallCylinder, and NuTo::CollidableWallPhysical.
|
pure virtual |
collision prediction between (this) and collision partner
rWall | collision partner |
rType | return argument, element of enum CollidableBase::EventType |
Implemented in NuTo::CollidableParticleSphere, and NuTo::CollidableWallBase.
|
pure virtual |
prints information based on derived class type.
rReturnStream | output stream, that gets modified |
Implemented in NuTo::CollidableWallBase, and NuTo::CollidableWallCylinder.
void NuTo::CollidableBase::PrintLocalEvents | ( | ) | const |
prints the local event list
void NuTo::CollidableBase::RemoveBox | ( | SubBox & | rBox | ) |
|
friend |
friend class for easy local event list access
|
friend |
standard output for all collidables, calls Print(...) for polymorph behaviour
rOutStream | operator RHS: output stream |
rCollidable | operator LHS: object added to the output stream |
|
protected |
list of SubBoxes in which this collidable is inside if the collidable is passing a virutal sub box wall, multiple mBoxes are possible
|
protected |
index, just a name for each collidable, multiple collidables with the same index possible
|
protected |
local event list adding single event: through EventBase::AddLocalEvents() remove single event: through EventBase::~EventBase() clear everything: on collision