CellModules
MecaCell::SpringBody< Cell > Class Template Reference

#include <springbody.hpp>

Inheritance diagram for MecaCell::SpringBody< Cell >:
MecaCell::OrientedParticle MecaCell::Movable MecaCell::Orientable

Public Types

using embedded_plugin_t = GenericConnectionBodyPlugin< Cell, SpringConnection >
 

Public Member Functions

 SpringBody (Cell *c, Vector3D pos=Vector3D::zero())
 
void setRadius (double r)
 
double getRadius ()
 
double getBoundingBoxRadius () const
 
double getStiffness () const
 
void setStiffness (double k)
 
double getMomentOfInertia () const
 
template<typename Integrator = Euler>
void updatePositionsAndOrientations (double dt)
 
std::tuple< Cell *, double > getConnectedCellAndMembraneDistance (const Vec &d) const
 
CellgetConnectedCell (const Vec &d) const
 
double getPreciseMembraneDistance (const Vec &d) const
 
void moveTo (Vector3D newpos)
 
void updateInternals (double)
 
 EXPORTABLE (SpringBody, KV(radius), KV(position))
 
bool isMovementEnabled ()
 
void disableMovement ()
 
void enableMovement ()
 
Vec getPosition () const
 
Vec getPrevposition () const
 
Vec getVelocity () const
 
Vec getForce () const
 
double getMass () const
 
void setPosition (const Vec &p)
 
void setPrevposition (const Vec &p)
 
void setVelocity (const Vec &v)
 
void setForce (const Vec &f)
 
void setMass (const double m)
 
void receiveForce (const double &intensity, const Vec &direction, const bool &compressive)
 
void receiveForce (const Vec &f)
 
void resetVelocity ()
 
void resetForce ()
 
Vec getAngularVelocity () const
 
Vec getTorque () const
 
Basis< VecgetOrientation () const
 
Rotation< VecgetOrientationRotation () const
 
void setAngularVelocity (const Vec &v)
 
void setTorque (const Vec &t)
 
void setOrientationRotation (const Rotation< Vec > &r)
 
void receiveTorque (const Vec &t)
 
void updateCurrentOrientation ()
 
void resetTorque ()
 
void resetAngularVelocity ()
 

Public Attributes

double radius = Config::DEFAULT_CELL_RADIUS
 
double stiffness = Config::DEFAULT_CELL_STIFFNESS
 
std::vector< SpringConnection< Cell > * > cellConnections
 

Protected Attributes

Vec position = Vec::zero()
 
Vec prevposition = Vec::zero()
 
Vec velocity = Vec::zero()
 
Vec force = Vec::zero()
 
bool movementEnabled = true
 
double mass = Config::DEFAULT_CELL_MASS
 
double totalForce = 0
 
Vec angularVelocity = Vec::zero()
 
Vec torque = Vec::zero()
 
Basis< Vecorientation
 
Rotation< VecorientationRotation
 

Private Attributes

Cellcell = nullptr
 

Friends

struct GenericConnectionBodyPlugin< Cell, SpringConnection >
 

Detailed Description

template<typename Cell>
class MecaCell::SpringBody< Cell >

Definition at line 15 of file springbody.hpp.

Member Typedef Documentation

◆ embedded_plugin_t

Constructor & Destructor Documentation

◆ SpringBody()

template<typename Cell >
MecaCell::SpringBody< Cell >::SpringBody ( Cell c,
Vector3D  pos = Vector3D::zero() 
)
inline

Definition at line 26 of file springbody.hpp.

Member Function Documentation

◆ disableMovement()

void MecaCell::Movable::disableMovement ( )
inlineinherited

Definition at line 24 of file movable.h.

◆ enableMovement()

void MecaCell::Movable::enableMovement ( )
inlineinherited

Definition at line 25 of file movable.h.

◆ EXPORTABLE()

template<typename Cell >
MecaCell::SpringBody< Cell >::EXPORTABLE ( SpringBody< Cell ,
KV(radius ,
KV(position  
)

◆ getAngularVelocity()

Vec MecaCell::Orientable::getAngularVelocity ( ) const
inlineinherited

Definition at line 21 of file orientable.h.

◆ getBoundingBoxRadius()

template<typename Cell >
double MecaCell::SpringBody< Cell >::getBoundingBoxRadius ( ) const
inline

Definition at line 29 of file springbody.hpp.

◆ getConnectedCell()

template<typename Cell >
Cell * MecaCell::SpringBody< Cell >::getConnectedCell ( const Vec d) const
inline

Definition at line 58 of file springbody.hpp.

◆ getConnectedCellAndMembraneDistance()

template<typename Cell >
std::tuple< Cell *, double > MecaCell::SpringBody< Cell >::getConnectedCellAndMembraneDistance ( const Vec d) const
inline

Definition at line 38 of file springbody.hpp.

◆ getForce()

Vec MecaCell::Movable::getForce ( ) const
inlineinherited

Definition at line 29 of file movable.h.

◆ getMass()

double MecaCell::Movable::getMass ( ) const
inlineinherited

Definition at line 30 of file movable.h.

◆ getMomentOfInertia()

template<typename Cell >
double MecaCell::SpringBody< Cell >::getMomentOfInertia ( ) const
inline

Definition at line 32 of file springbody.hpp.

◆ getOrientation()

Basis< Vec > MecaCell::Orientable::getOrientation ( ) const
inlineinherited

Definition at line 23 of file orientable.h.

◆ getOrientationRotation()

Rotation< Vec > MecaCell::Orientable::getOrientationRotation ( ) const
inlineinherited

Definition at line 24 of file orientable.h.

◆ getPosition()

Vec MecaCell::Movable::getPosition ( ) const
inlineinherited

Definition at line 26 of file movable.h.

◆ getPreciseMembraneDistance()

template<typename Cell >
double MecaCell::SpringBody< Cell >::getPreciseMembraneDistance ( const Vec d) const
inline

Definition at line 63 of file springbody.hpp.

◆ getPrevposition()

Vec MecaCell::Movable::getPrevposition ( ) const
inlineinherited

Definition at line 27 of file movable.h.

◆ getRadius()

template<typename Cell >
double MecaCell::SpringBody< Cell >::getRadius ( )
inline

Definition at line 28 of file springbody.hpp.

◆ getStiffness()

template<typename Cell >
double MecaCell::SpringBody< Cell >::getStiffness ( ) const
inline

Definition at line 30 of file springbody.hpp.

◆ getTorque()

Vec MecaCell::Orientable::getTorque ( ) const
inlineinherited

Definition at line 22 of file orientable.h.

◆ getVelocity()

Vec MecaCell::Movable::getVelocity ( ) const
inlineinherited

Definition at line 28 of file movable.h.

◆ isMovementEnabled()

bool MecaCell::Movable::isMovementEnabled ( )
inlineinherited

Definition at line 23 of file movable.h.

◆ moveTo()

template<typename Cell >
void MecaCell::SpringBody< Cell >::moveTo ( Vector3D  newpos)
inline

Definition at line 67 of file springbody.hpp.

◆ receiveForce() [1/2]

void MecaCell::Movable::receiveForce ( const double &  intensity,
const Vec direction,
const bool &  compressive 
)
inlineinherited

Definition at line 39 of file movable.h.

◆ receiveForce() [2/2]

void MecaCell::Movable::receiveForce ( const Vec f)
inlineinherited

Definition at line 44 of file movable.h.

◆ receiveTorque()

void MecaCell::Orientable::receiveTorque ( const Vec t)
inlineinherited

Definition at line 32 of file orientable.h.

◆ resetAngularVelocity()

void MecaCell::Orientable::resetAngularVelocity ( )
inlineinherited

Definition at line 35 of file orientable.h.

◆ resetForce()

void MecaCell::Movable::resetForce ( )
inlineinherited

Definition at line 46 of file movable.h.

◆ resetTorque()

void MecaCell::Orientable::resetTorque ( )
inlineinherited

Definition at line 34 of file orientable.h.

◆ resetVelocity()

void MecaCell::Movable::resetVelocity ( )
inlineinherited

Definition at line 45 of file movable.h.

◆ setAngularVelocity()

void MecaCell::Orientable::setAngularVelocity ( const Vec v)
inlineinherited

Definition at line 25 of file orientable.h.

◆ setForce()

void MecaCell::Movable::setForce ( const Vec f)
inlineinherited

Definition at line 34 of file movable.h.

◆ setMass()

void MecaCell::Movable::setMass ( const double  m)
inlineinherited

Definition at line 35 of file movable.h.

◆ setOrientationRotation()

void MecaCell::Orientable::setOrientationRotation ( const Rotation< Vec > &  r)
inlineinherited

Definition at line 27 of file orientable.h.

◆ setPosition()

void MecaCell::Movable::setPosition ( const Vec p)
inlineinherited

Definition at line 31 of file movable.h.

◆ setPrevposition()

void MecaCell::Movable::setPrevposition ( const Vec p)
inlineinherited

Definition at line 32 of file movable.h.

◆ setRadius()

template<typename Cell >
void MecaCell::SpringBody< Cell >::setRadius ( double  r)
inline

Definition at line 27 of file springbody.hpp.

◆ setStiffness()

template<typename Cell >
void MecaCell::SpringBody< Cell >::setStiffness ( double  k)
inline

Definition at line 31 of file springbody.hpp.

◆ setTorque()

void MecaCell::Orientable::setTorque ( const Vec t)
inlineinherited

Definition at line 26 of file orientable.h.

◆ setVelocity()

void MecaCell::Movable::setVelocity ( const Vec v)
inlineinherited

Definition at line 33 of file movable.h.

◆ updateCurrentOrientation()

void MecaCell::Orientable::updateCurrentOrientation ( )
inlineinherited

Definition at line 33 of file orientable.h.

◆ updateInternals()

template<typename Cell >
void MecaCell::SpringBody< Cell >::updateInternals ( double  )
inline

Definition at line 68 of file springbody.hpp.

◆ updatePositionsAndOrientations()

template<typename Cell >
template<typename Integrator = Euler>
void MecaCell::SpringBody< Cell >::updatePositionsAndOrientations ( double  dt)
inline

Definition at line 33 of file springbody.hpp.

Friends And Related Function Documentation

◆ GenericConnectionBodyPlugin< Cell, SpringConnection >

template<typename Cell >
friend struct GenericConnectionBodyPlugin< Cell, SpringConnection >
friend

Definition at line 1 of file springbody.hpp.

Member Data Documentation

◆ angularVelocity

Vec MecaCell::Orientable::angularVelocity = Vec::zero()
protectedinherited

Definition at line 7 of file orientable.h.

◆ cell

template<typename Cell >
Cell* MecaCell::SpringBody< Cell >::cell = nullptr
private

Definition at line 18 of file springbody.hpp.

◆ cellConnections

template<typename Cell >
std::vector<SpringConnection<Cell> *> MecaCell::SpringBody< Cell >::cellConnections

Definition at line 24 of file springbody.hpp.

◆ force

Vec MecaCell::Movable::force = Vec::zero()
protectedinherited

Definition at line 11 of file movable.h.

◆ mass

double MecaCell::Movable::mass = Config::DEFAULT_CELL_MASS
protectedinherited

Definition at line 13 of file movable.h.

◆ movementEnabled

bool MecaCell::Movable::movementEnabled = true
protectedinherited

Definition at line 12 of file movable.h.

◆ orientation

Basis<Vec> MecaCell::Orientable::orientation
protectedinherited

Definition at line 9 of file orientable.h.

◆ orientationRotation

Rotation<Vec> MecaCell::Orientable::orientationRotation
protectedinherited

Definition at line 10 of file orientable.h.

◆ position

Vec MecaCell::Movable::position = Vec::zero()
protectedinherited

Definition at line 8 of file movable.h.

◆ prevposition

Vec MecaCell::Movable::prevposition = Vec::zero()
protectedinherited

Definition at line 9 of file movable.h.

◆ radius

template<typename Cell >
double MecaCell::SpringBody< Cell >::radius = Config::DEFAULT_CELL_RADIUS

Definition at line 21 of file springbody.hpp.

◆ stiffness

template<typename Cell >
double MecaCell::SpringBody< Cell >::stiffness = Config::DEFAULT_CELL_STIFFNESS

Definition at line 22 of file springbody.hpp.

◆ torque

Vec MecaCell::Orientable::torque = Vec::zero()
protectedinherited

Definition at line 8 of file orientable.h.

◆ totalForce

double MecaCell::Movable::totalForce = 0
protectedinherited

Definition at line 14 of file movable.h.

◆ velocity

Vec MecaCell::Movable::velocity = Vec::zero()
protectedinherited

Definition at line 10 of file movable.h.


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