Skip to content

REFAC: Interactions now SceneObjects

  • Interactions are now SceneObjects

    • Interactions previously took the form of functors/functions that permute the TaskGraph of the SceneObject which was non-invertable and could not be undone. These were applied in InteractionPair::apply. But later I found the more elegant way to sum construct the graph which implicitly handled connections across graphs being summed. With this the realization is that Interactions can more elegantly be expressed as a SceneObject which simplifies things a lot.
    • This allows removal of an Interaction completely when the graph is rebuilt.
    • Safer, as there are no non-recoverable operations being done on the graph.
    • API more generic.
    • Well suited to be refactored into entity-component where components sum their TaskGraph's into the SceneObject before being summed into the Scene.
  • CollisionGraph, CollisionPair, InteractionPair, ObjectInteractionPair, & ObjectInteractionPairFactory removed

  • CD and CH now don't contain TaskNode's. This makes them more concise. This also allows interactions to properly swap out their CD's.

  • Unused nodes must be removed before reduction is done. Reduction does not behave well with disconnected nodes.

API Changes

  • PbdObjectCuttingPair -> PbdObjectCutting
  • scene->getCollisionGraph()->addInteraction(...); is now just scene->addInteraction(...);

Related too: #312 (closed)

Edited by Andrew Wilson

Merge request reports