![]() |
Testing class used to publicly expose PhysicsManager's protected member functions. More...
#include <SurgSim/Testing/MockPhysicsManager.h>
Public Member Functions | |
virtual bool | executeAdditions (const std::shared_ptr< SurgSim::Framework::Component > &component) override |
virtual bool | executeRemovals (const std::shared_ptr< SurgSim::Framework::Component > &component) override |
virtual bool | doInitialize () override |
virtual bool | doStartUp () override |
virtual bool | doUpdate (double dt) |
![]() | |
PhysicsManager () | |
Constructor. More... | |
virtual | ~PhysicsManager () |
virtual int | getType () const override |
Overrides ComponentManager::getType() More... | |
void | getFinalState (SurgSim::Physics::PhysicsManagerState *s) const |
Get the last PhysicsManagerState from the previous PhysicsManager update. More... | |
void | addExcludedCollisionPair (std::shared_ptr< SurgSim::Collision::Representation > representation1, std::shared_ptr< SurgSim::Collision::Representation > representation2) |
Add an excluded collision pair to the Physics Manager. More... | |
void | removeExcludedCollisionPair (std::shared_ptr< SurgSim::Collision::Representation > representation1, std::shared_ptr< SurgSim::Collision::Representation > representation2) |
Remove an excluded collision pair to the Physics Manager. More... | |
![]() | |
ComponentManager (const std::string &name="Unknown Component Manager") | |
virtual | ~ComponentManager () |
bool | enqueueAddComponent (const std::shared_ptr< Component > &component) |
Queues a component to be added later. More... | |
bool | enqueueRemoveComponent (const std::shared_ptr< Component > &component) |
Queues a component to be removed. More... | |
std::shared_ptr< Runtime > | getRuntime () const |
void | setRuntime (std::shared_ptr< Runtime > val) |
![]() | |
BasicThread (const std::string &name="Unknown Thread") | |
virtual | ~BasicThread () noexcept(false) |
C++11 introduced noexcept. More... | |
void | start (std::shared_ptr< Barrier > startupBarrier=nullptr, bool isSynchronous=false) |
C++11 introduced noexcept. More... | |
void | stop () |
Stopping the execution, blocks until the running thread has actually stopped,. More... | |
void | setIdle (bool isIdle) |
Set/Unset the thread in an idle state (doUpdate() called or not in the update() method) More... | |
bool | isIdle () |
Query if this thread is in idle state or not. More... | |
bool | isInitialized () |
Query if this object is initialized. More... | |
bool | isRunning () const |
Query if this object is running. More... | |
void | operator() () |
This is what boost::thread executes on thread creation. More... | |
boost::thread & | getThread () |
std::string | getName () const |
void | setRate (double val) |
Set the update rate of the thread. More... | |
bool | setSynchronous (bool val) |
Sets the thread to synchronized execution in concert with the startup barrier, the startup barrier has to exist for this call to succeed. More... | |
bool | isSynchronous () |
Query if this object is synchronized. More... | |
Additional Inherited Members | |
![]() | |
void | initializeComputations (bool copyState) |
![]() | |
template<class T > | |
std::shared_ptr< T > | tryAddComponent (std::shared_ptr< SurgSim::Framework::Component > component, std::vector< std::shared_ptr< T >> *container) |
Template version of the addComponent method. More... | |
template<class T > | |
bool | tryRemoveComponent (std::shared_ptr< SurgSim::Framework::Component > component, std::vector< std::shared_ptr< T >> *container) |
Template version of the removeComponent method. More... | |
void | processComponents () |
Processes all the components that are scheduled for addition or removal, this needs to be called inside the doUpdate() function. More... | |
void | processBehaviors (const double dt) |
Processes behaviors This needs to be called inside doUpdate() function in each 'sub' manager. More... | |
void | copyScheduledComponents (std::vector< std::shared_ptr< Component >> *inflightAdditions, std::vector< std::shared_ptr< Component >> *inflightRemovals) |
Helper, blocks access to the additions and removal queue and copies the components from there to the intermediate inflight queues, after this call, the incoming queues will be empty. More... | |
std::shared_ptr< SurgSim::Framework::Logger > | getLogger () const |
Returns this manager's logger. More... | |
![]() | |
bool | initialize () |
Trigger the initialization of this object, this will be called before all other threads doStartup() are called. More... | |
bool | startUp () |
Trigger the startup of this object, this will be called after all other threads doInit() was called the thread will only enter the run loop triggering upated() if all threads doInit() and doStartup() returned true. More... | |
bool | waitForBarrier (bool success) |
![]() | |
boost::mutex | m_componentMutex |
Blocks protects addition and removal queues. More... | |
std::shared_ptr< SurgSim::Framework::Logger > | m_logger |
Logger for this class. More... | |
std::vector< std::shared_ptr< SurgSim::Framework::Behavior > > | m_behaviors |
Collection of behaviors. More... | |
std::vector< std::shared_ptr< Component > > | m_componentAdditions |
std::vector< std::shared_ptr< Component > > | m_componentRemovals |
Testing class used to publicly expose PhysicsManager's protected member functions.
|
inlineoverridevirtual |
Overridden from BasicThread
Reimplemented from SurgSim::Physics::PhysicsManager.
|
inlineoverridevirtual |
Overridden from BasicThread
Reimplemented from SurgSim::Physics::PhysicsManager.
|
inlinevirtual |
Overridden from BasicThread
Reimplemented from SurgSim::Physics::PhysicsManager.
|
inlineoverridevirtual |
Overridden from ComponentManager
Reimplemented from SurgSim::Physics::PhysicsManager.
|
inlineoverridevirtual |
Overridden from ComponentManager
Reimplemented from SurgSim::Physics::PhysicsManager.