step/stepcore
collisionsolver.cc
  
Go to the documentation of this file.
   32 STEPCORE_META_OBJECT(CollisionSolver, QT_TRANSLATE_NOOP("ObjectClass", "CollisionSolver"), "CollisionSolver", MetaObject::ABSTRACT, STEPCORE_SUPER_CLASS(Object),
   33     STEPCORE_PROPERTY_RW(double, toleranceAbs, QT_TRANSLATE_NOOP("PropertyName", "toleranceAbs"), STEPCORE_UNITS_1, QT_TR_NOOP("Allowed absolute tolerance"), toleranceAbs, setToleranceAbs)
   34     STEPCORE_PROPERTY_R_D(double, localError, QT_TRANSLATE_NOOP("PropertyName", "localError"), STEPCORE_UNITS_1, QT_TR_NOOP("Maximal local error during last step"), localError))
   36 STEPCORE_META_OBJECT(GJKCollisionSolver, QT_TRANSLATE_NOOP("ObjectClass", "GJKCollisionSolver"), "GJKCollisionSolver", 0,
  396         if(std::sqrt(smin) - disk1->radius() < _toleranceAbs*1e-2) { // XXX: separate tolerance for penetration ?
  812             if(contact->body1->metaObject()->inherits<BasePolygon>()) contact->type = Contact::PolygonPolygonType;
  813             else if(contact->body1->metaObject()->inherits<Particle>()) contact->type = Contact::PolygonParticleType;
  882                 info.jacobian.coeffRef(i, contact.body0->variablesOffset() + RigidBody::PositionOffset)   = -contact.normal[0];
  883                 info.jacobian.coeffRef(i, contact.body0->variablesOffset() + RigidBody::PositionOffset+1) = -contact.normal[1];
  884                 info.jacobian.coeffRef(i, contact.body1->variablesOffset() + RigidBody::PositionOffset)   = contact.normal[0];
  885                 info.jacobian.coeffRef(i, contact.body1->variablesOffset() + RigidBody::PositionOffset+1) = contact.normal[1];
  919                         info.jacobianDerivative.coeffRef(i, contact.body1->variablesOffset() + RigidBody::AngleOffset) = -rd;
DynSparseRowMatrix jacobianDerivative
Time-derivative of constraintsJacobian. 
Definition: world.h:226
RigidBody class. 
int solveCollisions(BodyList &bodies)
Solve the collisions between bodies. 
Definition: collisionsolver.cc:1173
Vector2d velocityWorld(const Vector2d &worldPoint) const 
Get velocity of given (world) point on the body. 
Definition: rigidbody.cc:189
Offset of body angle in variables array. 
Definition: rigidbody.h:151
Offset of body position in variables array. 
Definition: rigidbody.h:150
void resetCaches()
Reset internal caches of collision information. 
Definition: collisionsolver.cc:1285
void bodyAdded(BodyList &bodies, Body *body)
Definition: collisionsolver.cc:1225
int solvePolygonParticle(Contact *contact)
Definition: collisionsolver.cc:1083
int checkDiskParticle(Contact *contact)
Definition: collisionsolver.cc:769
const Vector2d & position() const 
Get position of the center of mass of the body. 
Definition: rigidbody.h:160
STEPCORE_SUPER_CLASS(CollisionSolver)
Bodies are contacted but moving apart. 
Definition: collisionsolver.h:50
CollisionSolver interface. 
void addContact(Body *body0, Body *body1)
Definition: collisionsolver.cc:1248
QT_TRANSLATE_NOOP("ObjectClass","GJKCollisionSolver")
int solvePolygonDisk(Contact *contact)
Definition: collisionsolver.cc:1035
Discrete collision solver using Gilbert-Johnson-Keerthi distance algorithm. 
Definition: collisionsolver.h:154
void checkCache(BodyList &bodies)
Definition: collisionsolver.cc:1209
void setAngularVelocity(double angularVelocity)
Set angular velocity of the body. 
Definition: rigidbody.h:181
void bodyRemoved(BodyList &bodies, Body *body)
Definition: collisionsolver.cc:1234
int solveDiskDisk(Contact *contact)
Definition: collisionsolver.cc:1131
Vector2d pointLocalToWorld(const Vector2d &p) const 
Translate local coordinates on body to world coordinates. 
Definition: rigidbody.cc:201
const Vector2d & velocity() const 
Get velocity of the center of mass of the body. 
Definition: rigidbody.h:170
QT_TR_NOOP("Errors class for CoulombForce")
int checkPolygonParticle(Contact *contact)
Definition: collisionsolver.cc:541
STEPCORE_PROPERTY_RW(double, depth, QT_TRANSLATE_NOOP("PropertyName","depth"), QT_TRANSLATE_NOOP("Units","J"), QT_TR_NOOP("Potential depth"), depth, setDepth) STEPCORE_PROPERTY_RW(double
int checkContact(Contact *contact)
Definition: collisionsolver.cc:828
Contact state was not (can not) be determined (if state == Unknown all other fields are not used) ...
Definition: collisionsolver.h:47
int checkPolygonDisk(Contact *contact)
Definition: collisionsolver.cc:347
bool _contactsIsValid
Definition: collisionsolver.h:208
int checkDiskDisk(Contact *contact)
Definition: collisionsolver.cc:732
int checkPolygonPolygon(Contact *contact)
Definition: collisionsolver.cc:39
Vector2d normalDerivative
Time derivative of contact normal (only if state == Contacted) 
Definition: collisionsolver.h:69
setRmin setRminVariance STEPCORE_PROPERTY_R_D(double, rectPressureVariance, QT_TRANSLATE_NOOP("PropertyName","rectPressureVariance"), QT_TRANSLATE_NOOP("Units","Pa"), QT_TR_NOOP("Variance of pressure of particles in the measureRect"), rectPressureVariance) STEPCORE_PROPERTY_R_D(double
Particle and ChargedParticle classes. 
STEPCORE_META_OBJECT(CollisionSolver, QT_TRANSLATE_NOOP("ObjectClass","CollisionSolver"),"CollisionSolver", MetaObject::ABSTRACT, STEPCORE_SUPER_CLASS(Object), STEPCORE_PROPERTY_RW(double, toleranceAbs, QT_TRANSLATE_NOOP("PropertyName","toleranceAbs"), STEPCORE_UNITS_1, QT_TR_NOOP("Allowed absolute tolerance"), toleranceAbs, setToleranceAbs) STEPCORE_PROPERTY_R_D(double, localError, QT_TRANSLATE_NOOP("PropertyName","localError"), STEPCORE_UNITS_1, QT_TR_NOOP("Maximal local error during last step"), localError)) STEPCORE_META_OBJECT(GJKCollisionSolver
std::vector< Vector2d, Eigen::aligned_allocator< Vector2d > > Vector2dList
Definition: types.h:117
int solvePolygonPolygon(Contact *contact)
Definition: collisionsolver.cc:974
int variablesOffset() const 
Offset of body's variables in global arrays (meaningless if the body is not a part of the world) ...
Definition: world.h:181
int checkContacts(BodyList &bodies, bool collisions=false, int *count=NULL)
Check (and update) state of the contact. 
Definition: collisionsolver.cc:839
Constraints information structure XXX: Move it to constraintsolver.h. 
Definition: world.h:216
void getContactsInfo(ConstraintsInfo &info, bool collisions=false)
Fill the constraint info structure with the contacts computed by checkContacts() 
Definition: collisionsolver.cc:862
int solveDiskParticle(Contact *contact)
Definition: collisionsolver.cc:1152
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
            Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
 KDE API Reference
    KDE API Reference