• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

step/stepcore

StepCore::GJKCollisionSolver

StepCore::GJKCollisionSolver Class Reference
[Collision and constraint solvers]

#include <collisionsolver.h>

Inheritance diagram for StepCore::GJKCollisionSolver:

Inheritance graph
[legend]

List of all members.


Detailed Description

Discrete collision solver using Gilbert-Johnson-Keerthi distance algorithm.

Objects are treated as colliding if distance between them are greater then zero but smaller then certain small value. If distance is less then zero objects are always treated as interpenetrating - this signals World::doEvolve to invalidate current time step and try with smaller stepSize until objects are colliding but not interpenetrating.

Definition at line 144 of file collisionsolver.h.


Public Member Functions

void bodyAdded (BodyList &bodies, Body *body)
void bodyRemoved (BodyList &bodies, Body *body)
int checkContacts (BodyList &bodies, ConstraintsInfo *info, bool collisions=false)
 GJKCollisionSolver (const GJKCollisionSolver &solver)
 GJKCollisionSolver ()
GJKCollisionSolver & operator= (const GJKCollisionSolver &)
void resetCaches ()
int solveCollisions (BodyList &bodies)

Protected Member Functions

void addContact (Body *body0, Body *body1)
void checkCache (BodyList &bodies)
int checkContact (Contact *contact)
int checkDiskDisk (Contact *contact)
int checkDiskParticle (Contact *contact)
int checkPolygonDisk (Contact *contact)
int checkPolygonParticle (Contact *contact)
int checkPolygonPolygon (Contact *contact)
int solveDiskDisk (Contact *contact)
int solveDiskParticle (Contact *contact)
int solvePolygonDisk (Contact *contact)
int solvePolygonParticle (Contact *contact)
int solvePolygonPolygon (Contact *contact)

Protected Attributes

ContactValueList _contacts
bool _contactsIsValid

Constructor & Destructor Documentation

StepCore::GJKCollisionSolver::GJKCollisionSolver (  )  [inline]

Definition at line 149 of file collisionsolver.h.

StepCore::GJKCollisionSolver::GJKCollisionSolver ( const GJKCollisionSolver &  solver  )  [inline]

Definition at line 152 of file collisionsolver.h.


Member Function Documentation

void StepCore::GJKCollisionSolver::addContact ( Body *  body0,
Body *  body1 
) [protected]

Definition at line 1246 of file collisionsolver.cc.

void StepCore::GJKCollisionSolver::bodyAdded ( BodyList &  bodies,
Body *  body 
) [virtual]

Reimplemented from StepCore::CollisionSolver.

Definition at line 1223 of file collisionsolver.cc.

void StepCore::GJKCollisionSolver::bodyRemoved ( BodyList &  bodies,
Body *  body 
) [virtual]

Reimplemented from StepCore::CollisionSolver.

Definition at line 1232 of file collisionsolver.cc.

void StepCore::GJKCollisionSolver::checkCache ( BodyList &  bodies  )  [protected]

Definition at line 1207 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkContact ( Contact *  contact  )  [inline, protected]

Definition at line 824 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkContacts ( BodyList &  bodies,
ConstraintsInfo *  info,
bool  collisions = false 
) [virtual]

Check (and update) state of the contact.

Parameters:
contact contact to check (only body0 and body1 fields must be set)
Returns:
state of the contact (equals to contact->state) Check contacts between several bodies
Parameters:
bodies list of bodies to check
info ConstraintsInfo structure to fill
Returns:
maximum contact state (i.e. maximum value of Contact::state)

Implements StepCore::CollisionSolver.

Definition at line 835 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkDiskDisk ( Contact *  contact  )  [protected]

Definition at line 728 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkDiskParticle ( Contact *  contact  )  [protected]

Definition at line 765 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkPolygonDisk ( Contact *  contact  )  [protected]

Definition at line 343 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkPolygonParticle ( Contact *  contact  )  [protected]

Definition at line 537 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::checkPolygonPolygon ( Contact *  contact  )  [protected]

Definition at line 35 of file collisionsolver.cc.

GJKCollisionSolver& StepCore::GJKCollisionSolver::operator= ( const GJKCollisionSolver &   )  [inline]

Definition at line 154 of file collisionsolver.h.

void StepCore::GJKCollisionSolver::resetCaches (  )  [virtual]

Reset internal caches of collision information.

Todo:
do it automatically by checking the cache

Reimplemented from StepCore::CollisionSolver.

Definition at line 1283 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solveCollisions ( BodyList &  bodies  )  [virtual]

Solve the collisions between bodies.

Implements StepCore::CollisionSolver.

Definition at line 1171 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solveDiskDisk ( Contact *  contact  )  [protected]

Definition at line 1129 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solveDiskParticle ( Contact *  contact  )  [protected]

Definition at line 1150 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solvePolygonDisk ( Contact *  contact  )  [protected]

Definition at line 1033 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solvePolygonParticle ( Contact *  contact  )  [protected]

Definition at line 1081 of file collisionsolver.cc.

int StepCore::GJKCollisionSolver::solvePolygonPolygon ( Contact *  contact  )  [protected]

Definition at line 972 of file collisionsolver.cc.


Member Data Documentation

ContactValueList StepCore::GJKCollisionSolver::_contacts [protected]

Definition at line 197 of file collisionsolver.h.

bool StepCore::GJKCollisionSolver::_contactsIsValid [protected]

Definition at line 198 of file collisionsolver.h.


The documentation for this class was generated from the following files:
  • collisionsolver.h
  • collisionsolver.cc

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal