#include <VisitorSmart.h>
Public Member Functions | |
virtual void | apply (Body &body) |
Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs. | |
virtual void | apply (Joint &joint) |
Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs. | |
virtual void | reset () |
Method to reuse visitor for another traversal. | |
Protected Member Functions | |
virtual void | applyOnce (Body &body) |
virtual void | applyOnce (Joint &joint) |
bool | isVisited (Body &body) |
void | visited (Body &body) |
bool | isVisited (Joint &joint) |
void | visited (Joint &joint) |
Protected Attributes | |
std::set< Body * > | visitedBodies |
std::set< Joint * > | visitedJoints |
Definition at line 38 of file VisitorSmart.h.
virtual void Physics::VisitorSmart::apply | ( | Joint & | joint | ) | [inline, virtual] |
Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.
Reimplemented from Physics::Visitor.
Definition at line 48 of file VisitorSmart.h.
References applyOnce(), isVisited(), and visited().
virtual void Physics::VisitorSmart::apply | ( | Body & | body | ) | [inline, virtual] |
Default behaviour is to call applyOnce() when needed, but this can be overloaded for your needs.
Reimplemented from Physics::Visitor.
Definition at line 41 of file VisitorSmart.h.
References applyOnce(), isVisited(), and visited().
virtual void Physics::VisitorSmart::applyOnce | ( | Joint & | joint | ) | [inline, protected, virtual] |
Definition at line 63 of file VisitorSmart.h.
virtual void Physics::VisitorSmart::applyOnce | ( | Body & | body | ) | [inline, protected, virtual] |
bool Physics::VisitorSmart::isVisited | ( | Joint & | joint | ) | [inline, protected] |
bool Physics::VisitorSmart::isVisited | ( | Body & | body | ) | [inline, protected] |
virtual void Physics::VisitorSmart::reset | ( | ) | [inline, virtual] |
Method to reuse visitor for another traversal.
Definition at line 56 of file VisitorSmart.h.
References visitedBodies, and visitedJoints.
void Physics::VisitorSmart::visited | ( | Joint & | joint | ) | [inline, protected] |
void Physics::VisitorSmart::visited | ( | Body & | body | ) | [inline, protected] |
Definition at line 66 of file VisitorSmart.h.
References ASSERT, isVisited(), and visitedBodies.
Referenced by apply().
std::set<Body *> Physics::VisitorSmart::visitedBodies [protected] |
std::set<Joint *> Physics::VisitorSmart::visitedJoints [protected] |