A base class for managers of DtTickable objects.
More...
A base class for managers of DtTickable objects.
| makVrv::DtTickableManager::DtTickableManager |
( |
DtDe & |
de | ) |
|
| virtual makVrv::DtTickableManager::~DtTickableManager |
( |
| ) |
|
|
virtual |
| virtual bool makVrv::DtTickableManager::addTickableObject |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
Add a DtTickable object to this manager.
- Parameters
-
| [in] | ticObj | is a pointer to a tick-able object to add. |
- Return values
-
| true | if the pointer was successfully added. |
| false | otherwise. |
- Note
- Objects added to this manager are not destroyed at destruction time of this manager.
- Exceptions
-
| DtCorruptedState | if called during tick-update. This call checks DtTickable::isThreadSafe() and places the tickable on the appropriate tickable list |
Implements makVrv::DtTickableManagerInterface.
| virtual bool makVrv::DtTickableManager::addTickableObjectToMainList |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
Add a tickable to the main (not threaded) tickable list Even if a tickable is 'thread safe' we may choose to not place it on the threaded list (mainly because it may be a scene object updater at the head of a not thread safe updater chain).
This call checks DtTickable::isThreadSafe() and places the tickable on the appropriate tickable list. This method sets the tickable's tickableListState to DtTickable::TickableOnMainList
Implements makVrv::DtTickableManagerInterface.
| virtual bool makVrv::DtTickableManager::addTickableObjectToThreadSafeList |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
Add a tickable to the threaded tickable list.
This method checks the tickable's isThreadSafe() method and will not add the tickable to the list if not thread-safe
Implements makVrv::DtTickableManagerInterface.
| virtual void makVrv::DtTickableManager::removeTickableObject |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
Remove a DtTickable object from this manager.
- Parameters
-
| [in] | ticObj | is a pointer to a tick-able object to remove. |
- Exceptions
-
| DtCorruptedState | if called during tick-update. Note: This form is kept for back compatibility. It is inefficient because it needs to check both tickable lists for the tickable to remove. The preferred method is to check the tickable for which list it's on (DtTickable::tickableListState()) and then explicitly remove it from the correct list |
Implements makVrv::DtTickableManagerInterface.
| virtual void makVrv::DtTickableManager::removeTickableObjectFromMainList |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
| virtual void makVrv::DtTickableManager::removeTickableObjectFromThreadSafeList |
( |
DtTickable * |
ticObj | ) |
|
|
virtual |
| virtual void makVrv::DtTickableManager::tick |
( |
DtTime |
tNow = 0.0 | ) |
|
|
virtual |
Function to update each tick-able object.
Each tick-able object on the main (not threaded) list receives a call to its update() function if its needsUpdate() function returns true. If the myUseMultithreadUpdate is false, tickables on the the thread-safe list are treated the same way. But if the flag is true, a parallel_for is used to call the tickable's updateIfNeeded() method (which currently just combines the call to needsUpdate() and update().
- Parameters
-
| [in] | tNow | is a time-stamp to pass to each object. |
- Note
- The order objects are updated is not guaranteed; but the objects on the multithreaded list will be updated before the tickables on the main list.
Implements makVrv::DtTickableManagerInterface.
| virtual bool makVrv::DtTickableManager::inTick |
( |
| ) |
|
|
virtual |
| virtual int makVrv::DtTickableManager::numTickables |
( |
| ) |
|
|
virtual |
| virtual int makVrv::DtTickableManager::numMultithreadedTickables |
( |
| ) |
|
|
virtual |
| virtual int makVrv::DtTickableManager::numTickedLastFrame |
( |
| ) |
|
|
virtual |
| virtual double makVrv::DtTickableManager::timeSpentThisFrame |
( |
| ) |
|
|
virtual |
| virtual void makVrv::DtTickableManager::setUseAdaptiveTickRate |
( |
bool |
value | ) |
|
|
virtual |
| virtual bool makVrv::DtTickableManager::useAdaptiveTickRate |
( |
| ) |
|
|
virtual |
| virtual void makVrv::DtTickableManager::resetAdaptiveTickrate |
( |
| ) |
|
|
virtual |
| virtual void makVrv::DtTickableManager::setUseMultithreadUpdate |
( |
bool |
useIt | ) |
|
|
virtual |
| virtual bool makVrv::DtTickableManager::useMultithreadUpdate |
( |
| ) |
const |
|
virtual |
adds tickable to the array if it is not already in the list
| TickableList makVrv::DtTickableManager::myThreadSafeTickables |
|
protected |
| bool makVrv::DtTickableManager::myUseMultithreadUpdate |
|
protected |
| DtTickable* makVrv::DtTickableManager::myCurrentTickObject |
|
protected |
| tbb::atomic<bool> makVrv::DtTickableManager::myOnTickFlag |
|
protected |
| bool makVrv::DtTickableManager::myUseAdaptiveTickRate |
|
protected |
| int makVrv::DtTickableManager::myNumTickablesLastFrame |
|
protected |
| DtDe& makVrv::DtTickableManager::myDe |
|
protected |
| double makVrv::DtTickableManager::myTimeSpentThisFrame |
|
protected |
The documentation for this class was generated from the following file:
- /data/exports/nrhent7-1/nightly/docs/vrForces.vrf4-10-branch/include/vrvCore/DtTickableManager.h