NuTo
Numerics Tool
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NuTo::CollidableWallCylinder Class Reference

class for cylindric walls More...

#include <CollidableWallCylinder.h>

Inheritance diagram for NuTo::CollidableWallCylinder:
NuTo::CollidableWallBase NuTo::CollidableBase

Public Member Functions

 CollidableWallCylinder (Eigen::Vector3d rPosition, Eigen::Vector3d rDirection, double rRadius, double rHeigth, int rIndex)
 constructor. More...
 
void PerformCollision (CollidableParticleSphere &rSphere) override
 collision between this and CollidableSphere More...
 
double PredictCollision (CollidableParticleSphere &rSphere, int &rType) override
 collision prediction between (this) and a sphere More...
 
bool IsPhysical () const override
 ture for physical walls More...
 
void VisualizationStatic (Visualize::UnstructuredGrid &rVisualizer) const override
 visualize all non-moving collidables More...
 
bool IsInside (const CollidableParticleSphere &rSphere) const override
 returns true, if the sphere is in this cylinder More...
 
- Public Member Functions inherited from NuTo::CollidableWallBase
 CollidableWallBase (Eigen::VectorXd rPosition, Eigen::VectorXd rDirection, int rIndex)
 constructor, create CollidableWallBase using the point-and-normal-vector plane definition More...
 
virtual ~CollidableWallBase ()
 destructor, do nothing More...
 
void SetBoxes (SubBox &rInsideBox, SubBox &rOutsideBox)
 every wall should know its box and the neighbour box More...
 
void PerformCollision (CollidableBase &rCollidable) override
 collision between CollidableWall and CollidableBase, resolve double dispatch, forward *this More...
 
void PerformCollision (CollidableWallBase &rWall) override
 collision between CollidableWall and CollidableWall, does nothing More...
 
double PredictCollision (CollidableBase &rCollidable, int &rType) override
 collision check between CollidableWall and CollidableBase, resolve double dispatch, forward *this More...
 
double PredictCollision (CollidableWallBase &rWall, int &rType) override
 collision check between CollidableWall and CollidableWall, does nothing More...
 
void MoveAndGrow (double) override
 walls to neither grow nor move, do nothing More...
 
void GetLocalEventsToDelete (LocalEvents &) const override
 does nothing as all other wall events are still legal More...
 
const Eigen::Vector3d & GetDirection () const
 getter for the wall direction More...
 
const Eigen::Vector3d & GetPosition () const
 getter fot the wall position More...
 
- Public Member Functions inherited from NuTo::CollidableBase
 CollidableBase (int rIndex)
 constructor, initialized with an index More...
 
virtual ~CollidableBase ()
 destructor More...
 
int GetIndex () const
 getter for collidable index More...
 
void AddBox (SubBox &rBox)
 adds a SubBox to this collidable More...
 
void RemoveBox (SubBox &rBox)
 removes a SubBox from this collidable More...
 
void PrintLocalEvents () const
 prints the local event list More...
 
const std::vector< SubBox * > & GetSubBoxes () const
 returns all the SubBoxes of this collidable More...
 

Protected Member Functions

void Print (std::ostream &rReturnStream) const override
 prints cylinder informations More...
 

Protected Attributes

double mRadius
 cylinder radius More...
 
double mHeigth
 cylinder height More...
 
- Protected Attributes inherited from NuTo::CollidableWallBase
Eigen::Vector3d mPosition
 point of the point-and-normal-vector plane definition More...
 
Eigen::Vector3d mDirection
 normal vector of the point-and-normal-vector plane definition More...
 
SubBoxmInsideBox
 box on the inner side of the wall More...
 
SubBoxmOutsideBox
 box on the outer side of the wall More...
 
int mNonNullAxis
 index of the direction component that is != 0 More...
 
bool mIsAxisAligned
 true –> calculations without vector calculations More...
 
- Protected Attributes inherited from NuTo::CollidableBase
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...
 

Additional Inherited Members

- Public Types inherited from NuTo::CollidableBase
typedef std::vector< CollidableParticleSphere * > ParticleContainer
 

Detailed Description

class for cylindric walls

Constructor & Destructor Documentation

NuTo::CollidableWallCylinder::CollidableWallCylinder ( Eigen::Vector3d  rPosition,
Eigen::Vector3d  rDirection,
double  rRadius,
double  rHeigth,
int  rIndex 
)

constructor.

Parameters
rPositioncenter of the cylinder
rDirectionvector pointing to the top of the cylinder
rRadiusradius
rHeigthheight
rIndexname

Member Function Documentation

bool NuTo::CollidableWallCylinder::IsInside ( const CollidableParticleSphere rSphere) const
overridevirtual

returns true, if the sphere is in this cylinder

Parameters
rSpheresphere to check

Reimplemented from NuTo::CollidableWallBase.

bool NuTo::CollidableWallCylinder::IsPhysical ( ) const
inlineoverridevirtual

ture for physical walls

Implements NuTo::CollidableWallBase.

void NuTo::CollidableWallCylinder::PerformCollision ( CollidableParticleSphere rSphere)
overridevirtual

collision between this and CollidableSphere

Parameters
rSpherecollision partner

Implements NuTo::CollidableWallBase.

double NuTo::CollidableWallCylinder::PredictCollision ( CollidableParticleSphere rSphere,
int &  rType 
)
overridevirtual

collision prediction between (this) and a sphere

Parameters
rSpherecollision partner
Returns
predicted time of collision

Implements NuTo::CollidableWallBase.

void NuTo::CollidableWallCylinder::Print ( std::ostream &  rReturnStream) const
overrideprotectedvirtual

prints cylinder informations

Parameters
rReturnStreamoutput stream, that gets modified

Reimplemented from NuTo::CollidableWallBase.

void NuTo::CollidableWallCylinder::VisualizationStatic ( Visualize::UnstructuredGrid rVisualizer) const
overridevirtual

visualize all non-moving collidables

Parameters
rVisualizerNuTo object for ascii-export

Reimplemented from NuTo::CollidableWallBase.

Member Data Documentation

double NuTo::CollidableWallCylinder::mHeigth
protected

cylinder height

double NuTo::CollidableWallCylinder::mRadius
protected

cylinder radius


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