#include <OSGNewActionBase.h>
Inheritance diagram for osg::NewActionBase:

Definition at line 63 of file OSGNewActionBase.h.
|
|
Definition at line 72 of file OSGNewActionBase.h. |
|
|
Definition at line 73 of file OSGNewActionBase.h. |
|
|
Definition at line 74 of file OSGNewActionBase.h. |
|
|
Definition at line 75 of file OSGNewActionBase.h. |
|
|
Definition at line 156 of file OSGNewActionBase.h. |
|
|
Definition at line 157 of file OSGNewActionBase.h. |
|
|
Definition at line 159 of file OSGNewActionBase.h. |
|
|
Definition at line 160 of file OSGNewActionBase.h. |
|
|
Definition at line 161 of file OSGNewActionBase.h. |
|
|
Destructor. Definition at line 122 of file OSGNewActionBase.cpp.
|
|
|
Definition at line 362 of file OSGNewActionBase.cpp. 00363 : _extendActors ( ), 00364 _basicActors ( ), 00365 #ifdef OSG_NEWACTION_STATISTICS 00366 _pStatistics (NULL ), 00367 _ownStatistics (false ), 00368 #endif /* OSG_NEWACTION_STATISTICS */ 00369 _travMask (TypeTraits<UInt32>::BitsSet), 00370 _numPasses (1 ), 00371 _childrenListEnabled(false ), 00372 _childrenList ( ), 00373 _extraChildrenList ( ) 00374 { 00375 }
|
|
|
|
|
|
|
|
|
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. |
|
|
Add an actor to this action, it will be appended to the list of extend or basic actors. Returns the index at which the actor was added.
Definition at line 144 of file OSGNewActionBase.cpp. References osg::ActorBase::addHelper(). 00145 { 00146 return pActor->addHelper(this); 00147 }
|
|
|
Remove an actor from this action. The actor may now be attached to another action. Dev: See NewActionBase::addActor(ActorBase *pActor) for an explanation of the mechanism used to discover the type of pActor. Definition at line 159 of file OSGNewActionBase.cpp. References osg::ActorBase::subHelper(). 00160 { 00161 pActor->subHelper(this); 00162 }
|
|
|
Return the index of an actor or TypeTraits<UInt32>::getMax() if the actor can not be found. Note that two actors may have the same index, if one is derived from ExtendActorBase and the other from BasicActorBase. Dev: See NewActionBase::addActor(ActorBase *pActor) for an explanation of the mechanism used to discover the type of pActor. I'm not sure if this is a useful thing to have ?? -carsten Definition at line 177 of file OSGNewActionBase.cpp. References osg::ActorBase::findHelper(). 00178 { 00179 return pActor->findHelper(this); 00180 }
|
|
|
Return the total number of actors attached to this action. Definition at line 186 of file OSGNewActionBase.cpp. References _basicActors, and _extendActors. Referenced by addBasicActor(), and addExtendActor(). 00187 { 00188 return _extendActors.size() + _basicActors.size(); 00189 }
|
|
|
Add an extend actor to this action. Returns the index at which the actor was added.
Definition at line 202 of file OSGNewActionBase.cpp. References _extendActors. Referenced by osg::ExtendActorBase::addHelper(). 00203 { 00204 return addExtendActor(pActor, _extendActors.size()); 00205 }
|
|
||||||||||||
|
Add an extend actor to this action before the index pos. Returns the index at which the actor was added, i.e. this should be pos.
Definition at line 214 of file OSGNewActionBase.cpp. References _extendActors, osg::ActorBase::addEvent(), and getNumActors(). 00215 { 00216 UInt32 actorId = getNumActors(); 00217 00218 pActor ->addEvent (this, actorId); 00219 _extendActors. insert (_extendActors.begin() + pos, pActor ); 00220 this ->addExtendEvent(pActor, pos ); 00221 00222 return pos; 00223 }
|
|
|
Remove the extend actor at index pos. The actor may now be attached to another action. Definition at line 230 of file OSGNewActionBase.cpp. References _extendActors, osg::ActorBase::getActorId(), and osg::ActorBase::subEvent(). Referenced by osg::ExtendActorBase::subHelper(). 00231 { 00232 ExtendActorStoreIt itActor = _extendActors.begin() + pos; 00233 ExtendActorBase *pActor = *itActor; 00234 00235 this ->subExtendEvent(pActor, pos ); 00236 pActor->subEvent (this, pActor->getActorId()); 00237 00238 _extendActors.erase(itActor); 00239 }
|
|
|
Return the index of the extend actor or TypeTraits<UInt32>::getMax() if the actor is not found. The return value may be used as the pos argument to the addExtendActor and subExtendActor methods. Definition at line 247 of file OSGNewActionBase.cpp. References _extendActors. Referenced by osg::ExtendActorBase::findHelper(), and osg::ExtendActorBase::subHelper(). 00248 { 00249 ExtendActorStoreConstIt itActors = _extendActors.begin(); 00250 ExtendActorStoreConstIt endActors = _extendActors.end (); 00251 00252 UInt32 pos = 0; 00253 bool found = false; 00254 00255 for(; (itActors != endActors) && !found; ++itActors, ++pos) 00256 { 00257 if(*itActors == pActor) 00258 { 00259 found = true; 00260 break; 00261 } 00262 } 00263 00264 return (found ? pos : TypeTraits<UInt32>::getMax()); 00265 }
|
|
|
Return the number of extend actors attached to the action. Definition at line 271 of file OSGNewActionBase.cpp. References _extendActors. 00272 { 00273 return _extendActors.size(); 00274 }
|
|
|
Add an basic actor to this action. Returns the index at which the actor was added.
Definition at line 287 of file OSGNewActionBase.cpp. References _basicActors. Referenced by osg::BasicActorBase::addHelper(). 00288 { 00289 return addBasicActor(pActor, _basicActors.size()); 00290 }
|
|
||||||||||||
|
Add an basic actor to this action before the index pos. Returns the index at which the actor was added, i.e. this should be pos.
Definition at line 299 of file OSGNewActionBase.cpp. References _basicActors, osg::ActorBase::addEvent(), and getNumActors(). 00300 { 00301 UInt32 actorId = getNumActors(); 00302 00303 pActor ->addEvent (this, actorId); 00304 _basicActors. insert (_basicActors.begin() + pos, pActor ); 00305 this ->addBasicEvent(pActor, pos ); 00306 00307 return pos; 00308 }
|
|
|
Remove the basic actor at index pos. The actor may now be attached to another action. Definition at line 315 of file OSGNewActionBase.cpp. References _basicActors, osg::ActorBase::getActorId(), and osg::ActorBase::subEvent(). Referenced by osg::BasicActorBase::subHelper(). 00316 { 00317 BasicActorStoreIt itActor = _basicActors.begin() + pos; 00318 BasicActorBase *pActor = *itActor; 00319 00320 this ->subBasicEvent(pActor, pos ); 00321 pActor->subEvent (this, pActor->getActorId()); 00322 00323 _basicActors.erase(itActor); 00324 }
|
|
|
Return the index of the basic actor or TypeTraits<UInt32>::getMax() if the actor is not found. The return value may be used as the pos argument to the addBasicActor and subBasicActor methods. Definition at line 332 of file OSGNewActionBase.cpp. References _basicActors. Referenced by osg::BasicActorBase::findHelper(), and osg::BasicActorBase::subHelper(). 00333 { 00334 BasicActorStoreConstIt itActors = _basicActors.begin(); 00335 BasicActorStoreConstIt endActors = _basicActors.end (); 00336 00337 UInt32 pos = 0; 00338 bool found = false; 00339 00340 for(; (itActors != endActors) && !found; ++itActors, ++pos) 00341 { 00342 if(*itActors == pActor) 00343 found = true; 00344 } 00345 00346 return (found ? pos : TypeTraits<UInt32>::getMax()); 00347 }
|
|
|
Return the number of basic actors attached to the action. Definition at line 353 of file OSGNewActionBase.cpp. References _basicActors. 00354 { 00355 return _basicActors.size(); 00356 }
|
|
|
Return the traversal mask of this action. The action will only traverse a node if the bitwise AND of its traversal mask with the actions is nonzero. Definition at line 76 of file OSGNewActionBase.inl. References _travMask. Referenced by osg::PriorityAction::enqueueChildren(), osg::DepthFirstStateAction::pushChildren(), and osg::DepthFirstAction::pushChildren(). 00077 { 00078 return _travMask; 00079 }
|
|
|
Set the actions traversal maks. The action will only traverse a node if the bitwise AND of its traversal mask with the actions is nonzero. Definition at line 86 of file OSGNewActionBase.inl. References _travMask. 00087 { 00088 _travMask = travMask; 00089 }
|
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. |
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. |
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. |
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. |
|
|
Called before the actors are started. When overriding this method the inherited version must be called. Reimplemented in osg::DepthFirstStateAction, and osg::PriorityAction. Definition at line 386 of file OSGNewActionBase.cpp. References _ownStatistics, _pStatistics, osg::StatCollector::create(), osg::StatCollector::getElem(), getStatistics(), osg::StatElem::reset(), statNodesEnter, and statNodesLeave. Referenced by osg::DepthFirstAction::apply(). 00387 { 00388 #ifdef OSG_NEWACTION_STATISTICS 00389 if(_pStatistics == NULL) 00390 { 00391 _pStatistics = StatCollector::create(); 00392 _ownStatistics = true; 00393 } 00394 else 00395 { 00396 _ownStatistics = false; 00397 } 00398 00399 getStatistics()->getElem(statNodesEnter)->reset(); 00400 getStatistics()->getElem(statNodesLeave)->reset(); 00401 #endif /* OSG_NEWACTION_STATISTICS */ 00402 }
|
|
|
Called after the actors are stopped. When overriding this method the inherited version must be called. Reimplemented in osg::DepthFirstStateAction, and osg::PriorityAction. Definition at line 409 of file OSGNewActionBase.cpp. References _ownStatistics, and _pStatistics. Referenced by osg::DepthFirstAction::apply(). 00410 { 00411 #ifdef OSG_NEWACTION_STATISTICS 00412 if(_ownStatistics == true) 00413 { 00414 delete _pStatistics; 00415 _pStatistics = NULL; 00416 } 00417 #endif /* OSG_NEWACTION_STATISTICS */ 00418 }
|
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. Referenced by osg::ActorBase::beginEditState(). |
|
||||||||||||
|
Implemented in osg::DepthFirstAction, osg::DepthFirstStateAction, and osg::PriorityAction. Referenced by osg::ActorBase::endEditState(). |
|
|
Return if the children list is enabled. Definition at line 99 of file OSGNewActionBase.inl. References _childrenListEnabled. Referenced by osg::PriorityAction::enqueueChildren(), osg::ActorBase::getChildrenListEnabled(), osg::DepthFirstStateAction::pushChildren(), and osg::DepthFirstAction::pushChildren(). 00100 { 00101 return _childrenListEnabled; 00102 }
|
|
|
Enable or disable the children list. Ext: Actors should avoid enabling the children list without need as it has a negative impact on performance, e.g. if you do not want to traverse any children it is far more effective to return NewActionTypes::Skip instead of enabling the children list and setting all children inactive. Definition at line 115 of file OSGNewActionBase.inl. References _childrenList, _childrenListEnabled, and osg::ChildrenList::reset(). Referenced by osg::PriorityAction::enqueueChildren(), osg::DepthFirstStateAction::pushChildren(), osg::DepthFirstAction::pushChildren(), and osg::ActorBase::setChildrenListEnabled(). 00116 { 00117 if((enabled == true) && (_childrenListEnabled == false)) 00118 { 00119 _childrenList.reset(); 00120 } 00121 00122 _childrenListEnabled = enabled; 00123 }
|
|
|
Return a const reference to the children list. Ext: ExtendActorBase and BasicActorBase have convenience functions for children management, use them instead of manipulating the list directly. Definition at line 134 of file OSGNewActionBase.inl. References _childrenList. Referenced by osg::PriorityAction::enqueueChildren(), osg::ActorBase::getChild(), osg::ActorBase::getChildActive(), osg::ActorBase::getChildPriority(), osg::ActorBase::getNode(), osg::ActorBase::getNumChildren(), osg::DepthFirstStateAction::pushChildren(), osg::DepthFirstAction::pushChildren(), osg::ActorBase::setChildActive(), osg::ActorBase::setChildPriority(), osg::PriorityAction::traverseEnter(), osg::DepthFirstStateAction::traverseEnter(), osg::DepthFirstAction::traverseEnter(), osg::DepthFirstStateAction::traverseEnterLeave(), and osg::DepthFirstAction::traverseEnterLeave(). 00135 { 00136 return _childrenList; 00137 }
|
|
|
Return a reference to the children list. Ext: ExtendActorBase and BasicActorBase have convenience functions for children management, use them instead of manipulating the list directly. Definition at line 148 of file OSGNewActionBase.inl. References _childrenList. 00149 { 00150 return _childrenList; 00151 }
|
|
|
Return a const reference to the extra children list. Ext: ExtendActorBase and BasicActorBase have convenience functions for extra children management, use them instead of manipulating the list directly. Definition at line 162 of file OSGNewActionBase.inl. References _extraChildrenList. Referenced by osg::ExtendActorBase::addExtraChild(), osg::PriorityAction::enqueueChildren(), osg::ActorBase::getExtraChild(), osg::ActorBase::getExtraChildActive(), osg::ActorBase::getExtraChildPriority(), osg::ActorBase::getNumExtraChildren(), osg::DepthFirstStateAction::pushChildren(), osg::DepthFirstAction::pushChildren(), osg::ActorBase::setExtraChildActive(), and osg::ActorBase::setExtraChildPriority(). 00163 { 00164 return _extraChildrenList; 00165 }
|
|
|
Return a reference to the children list. Ext: ExtendActorBase and BasicActorBase have convenience functions for extra children management, use them instead of manipulating the list directly. Definition at line 176 of file OSGNewActionBase.inl. References _extraChildrenList. 00177 { 00178 return _extraChildrenList; 00179 }
|
|
|
Definition at line 186 of file OSGNewActionBase.inl. References _numPasses. Referenced by osg::ActorBase::getNumPasses(), osg::PriorityAction::traverseEnter(), osg::DepthFirstStateAction::traverseEnter(), osg::DepthFirstAction::traverseEnter(), osg::DepthFirstStateAction::traverseEnterLeave(), and osg::DepthFirstAction::traverseEnterLeave(). 00187 { 00188 return _numPasses; 00189 }
|
|
|
Definition at line 192 of file OSGNewActionBase.inl. References _numPasses. Referenced by osg::PriorityAction::enqueueChildren(), osg::DepthFirstStateAction::pushChildren(), osg::DepthFirstAction::pushChildren(), and osg::ExtendActorBase::setNumPasses(). 00193 { 00194 _numPasses = numPasses; 00195 }
|
|
|
Return a const iterator to the beginning of the extend actors. Definition at line 205 of file OSGNewActionBase.inl. References _extendActors. Referenced by osg::PriorityAction::addExtendEvent(), osg::DepthFirstStateAction::addExtendEvent(), osg::DepthFirstAction::addExtendEvent(), osg::DepthFirstStateAction::cloneState(), osg::DepthFirstStateAction::decRefCount(), osg::DepthFirstStateAction::getState(), osg::DepthFirstStateAction::setState(), startActors(), and stopActors(). 00206 { 00207 return _extendActors.begin(); 00208 }
|
|
|
Return an iterator to the beginning of the extend actors. Definition at line 214 of file OSGNewActionBase.inl. References _extendActors. 00215 { 00216 return _extendActors.begin(); 00217 }
|
|
|
Return a const iterator to the end of the extend actors. Definition at line 223 of file OSGNewActionBase.inl. References _extendActors. Referenced by osg::PriorityAction::cloneState(), osg::DepthFirstStateAction::cloneState(), osg::PriorityAction::decRefCount(), osg::DepthFirstStateAction::decRefCount(), osg::DepthFirstStateAction::enterNode(), osg::DepthFirstAction::enterNode(), osg::DepthFirstStateAction::getState(), osg::DepthFirstStateAction::leaveNode(), osg::DepthFirstAction::leaveNode(), osg::PriorityAction::setState(), osg::DepthFirstStateAction::setState(), startActors(), and stopActors(). 00224 { 00225 return _extendActors.end(); 00226 }
|
|
|
Return an iterator to the end of the extend actors. Definition at line 232 of file OSGNewActionBase.inl. References _extendActors. 00233 { 00234 return _extendActors.end(); 00235 }
|
|
|
Return a const iterator to the beginning of the basic actors. Definition at line 241 of file OSGNewActionBase.inl. References _basicActors. Referenced by osg::PriorityAction::addBasicEvent(), osg::DepthFirstStateAction::addBasicEvent(), osg::DepthFirstAction::addBasicEvent(), osg::DepthFirstStateAction::cloneState(), osg::DepthFirstStateAction::decRefCount(), osg::PriorityAction::enterNode(), osg::DepthFirstStateAction::getState(), osg::DepthFirstStateAction::setState(), startActors(), and stopActors(). 00242 { 00243 return _basicActors.begin(); 00244 }
|
|
|
Return an iterator to the beginning of the basic actors. Definition at line 250 of file OSGNewActionBase.inl. References _basicActors. 00251 { 00252 return _basicActors.begin(); 00253 }
|
|
|
Return a const iterator to the end of the basic actors. Definition at line 259 of file OSGNewActionBase.inl. References _basicActors. Referenced by osg::PriorityAction::cloneState(), osg::DepthFirstStateAction::cloneState(), osg::PriorityAction::decRefCount(), osg::DepthFirstStateAction::decRefCount(), osg::PriorityAction::enterNode(), osg::DepthFirstStateAction::enterNode(), osg::DepthFirstAction::enterNode(), osg::DepthFirstStateAction::getState(), osg::DepthFirstStateAction::leaveNode(), osg::DepthFirstAction::leaveNode(), osg::DepthFirstStateAction::setState(), startActors(), and stopActors(). 00260 { 00261 return _basicActors.end(); 00262 }
|
|
|
Return an iterator to the end of the basic actors. Definition at line 268 of file OSGNewActionBase.inl. References _basicActors. 00269 { 00270 return _basicActors.end(); 00271 }
|
|
|
Return a const iterator to the beginning of the extend actors. Definition at line 425 of file OSGNewActionBase.cpp. References beginBasic(), beginExtend(), osg::NewActionTypes::Continue, endBasic(), endExtend(), osg::NewActionTypes::Quit, and ResultE. Referenced by osg::PriorityAction::apply(), osg::DepthFirstStateAction::apply(), and osg::DepthFirstAction::apply(). 00426 { 00427 ResultE result = NewActionTypes::Continue; 00428 00429 ExtendActorStoreIt itExtend = beginExtend(); 00430 ExtendActorStoreIt endItExtend = endExtend (); 00431 00432 for(; (itExtend != endItExtend ) && 00433 !(result & NewActionTypes::Quit); ++itExtend) 00434 { 00435 result = (*itExtend)->start(); 00436 } 00437 00438 BasicActorStoreIt itBasic = beginBasic(); 00439 BasicActorStoreIt endItBasic = endBasic (); 00440 00441 for(; (itBasic != endItBasic ) && 00442 !(result & NewActionTypes::Quit); ++itBasic) 00443 { 00444 result = (*itBasic)->start(); 00445 } 00446 |