Class for managing physical constraints in a simulation.
More...
#include <PhysicsConstraints.hpp>
|
| | PhysicsConstraints () |
| | Default constructor. More...
|
| |
| void | addPlane (MecaCell::Vec _n=MecaCell::Vec(0, 1, 0), MecaCell::Vec _p=MecaCell::Vec(0, 0, 0), bool _sticky=false) |
| | Adds a plane constraint. More...
|
| |
| void | addSymAxis (std::function< double(double, MecaCell::Vec, MecaCell::Vec)> _radiusFunction, MecaCell::Vec _axis=MecaCell::Vec(0., 1., 0.), MecaCell::Vec _origin=MecaCell::Vec(0., 0., 0.), double _length=100, double _maxEffectRadius=100, bool _fitShape=true, double _velocity_attraction=0.001) |
| | Adds a symmetrical axis constraint. More...
|
| |
| void | addVelocity (MecaCell::Vec _v=MecaCell::Vec(0, 1, 0)) |
| | Adds a velocity constraint. More...
|
| |
| template<typename cell_t > |
| MecaCell::Vec | getSymAxesConstraintsVelocity (cell_t *c) |
| | Computes the symmetrical axis constraints velocity for a cell. More...
|
| |
| template<typename cell_t > |
| MecaCell::Vec | getConstraintVelocity (cell_t *c) |
| | Computes the constraint velocity for a cell. More...
|
| |
| void | setCurvedBox (double radiusBoxPlane, double curvedDistToMaxSpeed, double maxSpeed) |
| | Sets the curved box parameters. More...
|
| |
| void | setPoissonAndYoungOfPlane (double poisson, double young) |
| | Sets the Poisson's ratio and Young's modulus for the plane. More...
|
| |
| template<typename cell_t > |
| void | applyPlaneConstraints (cell_t *c) |
| | Applies plane constraints to a cell. More...
|
| |
| template<typename cell_t > |
| void | snapCellsToPlane (cell_t *c) |
| | Snaps cells to the plane. More...
|
| |
Class for managing physical constraints in a simulation.
Definition at line 13 of file PhysicsConstraints.hpp.
◆ PhysicsConstraints()
| PhysicsConstraints::PhysicsConstraints |
( |
| ) |
|
|
inline |
◆ addPlane()
Adds a plane constraint.
- Parameters
-
| _n | Normal vector of the plane. |
| _p | Point on the plane. |
| _sticky | Indicates if the plane is sticky. |
Definition at line 104 of file PhysicsConstraints.hpp.
◆ addSymAxis()
| void PhysicsConstraints::addSymAxis |
( |
std::function< double(double, MecaCell::Vec, MecaCell::Vec)> |
_radiusFunction, |
|
|
MecaCell::Vec |
_axis = MecaCell::Vec(0., 1., 0.), |
|
|
MecaCell::Vec |
_origin = MecaCell::Vec(0., 0., 0.), |
|
|
double |
_length = 100, |
|
|
double |
_maxEffectRadius = 100, |
|
|
bool |
_fitShape = true, |
|
|
double |
_velocity_attraction = 0.001 |
|
) |
| |
|
inline |
Adds a symmetrical axis constraint.
- Parameters
-
| _radiusFunction | Radius function. |
| _axis | Axis vector. |
| _origin | Origin point. |
| _length | Length of the axis. |
| _maxEffectRadius | Maximum effect radius. |
| _fitShape | Indicates if the shape should fit. |
| _velocity_attraction | Attraction velocity. |
Definition at line 119 of file PhysicsConstraints.hpp.
◆ addVelocity()
◆ applyPlaneConstraints()
template<typename cell_t >
| void PhysicsConstraints::applyPlaneConstraints |
( |
cell_t * |
c | ) |
|
|
inline |
◆ getConstraintVelocity()
template<typename cell_t >
| MecaCell::Vec PhysicsConstraints::getConstraintVelocity |
( |
cell_t * |
c | ) |
|
|
inline |
Computes the constraint velocity for a cell.
- Template Parameters
-
- Parameters
-
- Returns
- Constraint velocity.
Definition at line 172 of file PhysicsConstraints.hpp.
◆ getSymAxesConstraintsVelocity()
template<typename cell_t >
| MecaCell::Vec PhysicsConstraints::getSymAxesConstraintsVelocity |
( |
cell_t * |
c | ) |
|
|
inline |
Computes the symmetrical axis constraints velocity for a cell.
- Template Parameters
-
- Parameters
-
- Returns
- Symmetrical axis constraints velocity.
Definition at line 140 of file PhysicsConstraints.hpp.
◆ setCurvedBox()
| void PhysicsConstraints::setCurvedBox |
( |
double |
radiusBoxPlane, |
|
|
double |
curvedDistToMaxSpeed, |
|
|
double |
maxSpeed |
|
) |
| |
|
inline |
Sets the curved box parameters.
- Parameters
-
| radiusBoxPlane | Radius of the box plane. |
| curvedDistToMaxSpeed | Curved distance to maximum speed. |
| maxSpeed | Maximum speed. |
Definition at line 193 of file PhysicsConstraints.hpp.
◆ setPoissonAndYoungOfPlane()
| void PhysicsConstraints::setPoissonAndYoungOfPlane |
( |
double |
poisson, |
|
|
double |
young |
|
) |
| |
|
inline |
Sets the Poisson's ratio and Young's modulus for the plane.
- Parameters
-
| poisson | Poisson's ratio. |
| young | Young's modulus. |
Definition at line 204 of file PhysicsConstraints.hpp.
◆ snapCellsToPlane()
template<typename cell_t >
| void PhysicsConstraints::snapCellsToPlane |
( |
cell_t * |
c | ) |
|
|
inline |
◆ overlapAdhesion
| double PhysicsConstraints::overlapAdhesion = 0.2 |
◆ planes
◆ radiusBox
| double PhysicsConstraints::radiusBox = -1 |
|
private |
◆ ratioPoisson2OnYoung
| double PhysicsConstraints::ratioPoisson2OnYoung = 0.0000000000001 |
|
private |
◆ symAxes
◆ velocities
◆ velocity_center_attraction
| double PhysicsConstraints::velocity_center_attraction = 0.00001 |
|
private |
The documentation for this class was generated from the following file: