#include <OSGBasicActorBase.h>
Public Types | |
Types | |
| typedef NewActionTypes::ResultE | ResultE |
| typedef NewActionTypes::PriorityType | PriorityType |
| typedef NewActionTypes::PriorityTypeTraits | PriorityTypeTraits |
| typedef NewActionTypes::Functor | Functor |
| typedef NewActionTypes::FunctorArgumentType | FunctorArgumentType |
Public Member Functions | |
Destructor | |
| virtual | ~BasicActorBase (void) |
Start/Stop | |
| virtual ResultE | start (void)=0 |
| virtual ResultE | stop (void)=0 |
Enter/Leave Callback | |
| virtual ResultE | enterNode (FunctorArgumentType &funcArg)=0 |
| virtual ResultE | leaveNode (FunctorArgumentType &funcArg)=0 |
Config | |
| bool | getEnterNodeFlag (void) const |
| bool | getLeaveNodeFlag (void) const |
| void | setEnterNodeFlag (bool enter) |
| void | setLeaveNodeFlag (bool leave) |
Action Access | |
| const NewActionBase * | getAction (void) const |
| NewActionBase * | getAction (void) |
| UInt32 | getActorId (void) const |
Children Management | |
| bool | getChildrenListEnabled (void) const |
| void | setChildrenListEnabled (bool enabled) |
| NodePtr | getNode (void) const |
| UInt32 | getNumChildren (void) const |
| NodePtr | getChild (UInt32 childIndex) const |
| bool | getChildActive (UInt32 childIndex) const |
| void | setChildActive (UInt32 childIndex, bool active) |
| PriorityType | getChildPriority (UInt32 childIndex) const |
| void | setChildPriority (UInt32 childIndex, PriorityType prio) |
Extra Children Management | |
| UInt32 | getNumExtraChildren (void) const |
| NodePtr | getExtraChild (UInt32 childIndex) const |
| bool | getExtraChildActive (UInt32 childIndex) const |
| void | setExtraChildActive (UInt32 childIndex, bool active) |
| PriorityType | getExtraChildPriority (UInt32 childIndex) const |
| void | setExtraChildPriority (UInt32 childIndex, PriorityType prio) |
Multi Pass Management | |
| UInt32 | getNumPasses (void) const |
State Management | |
| virtual ActorBaseState * | createStateClone (void)=0 |
| virtual void | destroyStateClone (ActorBaseState *pStateClone)=0 |
| virtual void | createInitialState (void)=0 |
| virtual void | deleteInitialState (void)=0 |
| void | beginEditState (void) |
| void | endEditState (void) |
| const ActorBaseState * | getState (void) const |
| ActorBaseState * | getState (void) |
| void | setState (ActorBaseState *pState) |
Protected Types | |
Types | |
| typedef ActorBase | Inherited |
| typedef Inherited::StateType | StateType |
Protected Member Functions | |
Constructor | |
| BasicActorBase (void) | |
Add, Sub and Find Helper | |
| virtual UInt32 | addHelper (NewActionBase *pAction) |
| virtual void | subHelper (NewActionBase *pAction) |
| virtual UInt32 | findHelper (const NewActionBase *pAction) |
Event Notification | |
| virtual void | addEvent (NewActionBase *pAction, UInt32 actorId) |
| virtual void | subEvent (NewActionBase *pAction, UInt32 actorId) |
Friends | |
Friends | |
| class | osg::NewActionBase |
Definition at line 56 of file OSGBasicActorBase.h.
typedef ActorBase osg::BasicActorBase::Inherited [protected] |
Definition at line 89 of file OSGBasicActorBase.h.
typedef Inherited::StateType osg::BasicActorBase::StateType [protected] |
Reimplemented from osg::ActorBase.
Definition at line 90 of file OSGBasicActorBase.h.
typedef NewActionTypes::ResultE osg::ActorBase::ResultE [inherited] |
Definition at line 66 of file OSGActorBase.h.
typedef NewActionTypes::PriorityType osg::ActorBase::PriorityType [inherited] |
Definition at line 67 of file OSGActorBase.h.
typedef NewActionTypes::PriorityTypeTraits osg::ActorBase::PriorityTypeTraits [inherited] |
Definition at line 68 of file OSGActorBase.h.
typedef NewActionTypes::Functor osg::ActorBase::Functor [inherited] |
Definition at line 69 of file OSGActorBase.h.
typedef NewActionTypes::FunctorArgumentType osg::ActorBase::FunctorArgumentType [inherited] |
Definition at line 70 of file OSGActorBase.h.
| BasicActorBase::~BasicActorBase | ( | void | ) | [virtual] |
Definition at line 51 of file OSGBasicActorBase.cpp.
| BasicActorBase::BasicActorBase | ( | void | ) | [protected] |
Default constructor
Definition at line 94 of file OSGBasicActorBase.cpp.
00095 : Inherited() 00096 { 00097 }
| BasicActorBase::ResultE BasicActorBase::start | ( | void | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 60 of file OSGBasicActorBase.cpp.
References osg::ActorBase::start().
00061 { 00062 return Inherited::start(); 00063 }
| BasicActorBase::ResultE BasicActorBase::stop | ( | void | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 66 of file OSGBasicActorBase.cpp.
References osg::ActorBase::stop().
00067 { 00068 return Inherited::stop(); 00069 }
| BasicActorBase::ResultE BasicActorBase::enterNode | ( | FunctorArgumentType & | funcArg | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 76 of file OSGBasicActorBase.cpp.
References osg::NewActionTypes::Continue.
00077 { 00078 return NewActionTypes::Continue; 00079 }
| BasicActorBase::ResultE BasicActorBase::leaveNode | ( | FunctorArgumentType & | funcArg | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 82 of file OSGBasicActorBase.cpp.
References osg::NewActionTypes::Continue.
00083 { 00084 return NewActionTypes::Continue; 00085 }
| UInt32 BasicActorBase::addHelper | ( | NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 104 of file OSGBasicActorBase.cpp.
References osg::NewActionBase::addBasicActor().
00105 { 00106 return pAction->addBasicActor(this); 00107 }
| void BasicActorBase::subHelper | ( | NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 110 of file OSGBasicActorBase.cpp.
References osg::endLog(), osg::NewActionBase::findBasicActor(), osg::NewActionBase::subBasicActor(), and SWARNING.
00111 { 00112 UInt32 actorIndex = pAction->findBasicActor(this); 00113 00114 if(actorIndex == TypeTraits<UInt32>::getMax()) 00115 { 00116 SWARNING << "BasicActorBase::subHelper: Illegal actor index." 00117 << endLog; 00118 00119 return; 00120 } 00121 00122 pAction->subBasicActor(actorIndex); 00123 }
| UInt32 BasicActorBase::findHelper | ( | const NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 126 of file OSGBasicActorBase.cpp.
References osg::NewActionBase::findBasicActor().
00127 { 00128 return pAction->findBasicActor(this); 00129 }
| bool osg::ActorBase::getEnterNodeFlag | ( | void | ) | const [inline, inherited] |
Return if operations upon "entering" a node are enabled.
Definition at line 75 of file OSGActorBase.inl.
References osg::ActorBase::_enterNodeFlag.
Referenced by osg::PriorityAction::addBasicEvent(), osg::DepthFirstStateAction::addBasicEvent(), osg::DepthFirstAction::addBasicEvent(), osg::PriorityAction::addExtendEvent(), osg::DepthFirstStateAction::addExtendEvent(), and osg::DepthFirstAction::addExtendEvent().
00076 { 00077 return _enterNodeFlag; 00078 }
| bool osg::ActorBase::getLeaveNodeFlag | ( | void | ) | const [inline, inherited] |
Return if operations upon "leaving" a node are enabled.
Definition at line 84 of file OSGActorBase.inl.
References osg::ActorBase::_leaveNodeFlag.
Referenced by osg::DepthFirstStateAction::addBasicEvent(), osg::DepthFirstAction::addBasicEvent(), osg::DepthFirstStateAction::addExtendEvent(), and osg::DepthFirstAction::addExtendEvent().
00085 { 00086 return _leaveNodeFlag; 00087 }
| void osg::ActorBase::setEnterNodeFlag | ( | bool | enter | ) | [inline, inherited] |
Set if operations upon entering a node are desired.
Definition at line 95 of file OSGActorBase.inl.
References osg::ActorBase::_enterNodeFlag.
00096 { 00097 _enterNodeFlag = enter; 00098 }
| void osg::ActorBase::setLeaveNodeFlag | ( | bool | leave | ) | [inline, inherited] |
Set if operations upon leaving a node are desired.
Definition at line 106 of file OSGActorBase.inl.
References osg::ActorBase::_leaveNodeFlag.
00107 { 00108 _leaveNodeFlag = leave; 00109 }
| const NewActionBase * osg::ActorBase::getAction | ( | void | ) | const [inline, inherited] |
Definition at line 116 of file OSGActorBase.inl.
References osg::ActorBase::_pAction.
Referenced by osg::ExtendActorBase::addExtraChild(), and osg::ExtendActorBase::setNumPasses().
00117 { 00118 return _pAction; 00119 }
| NewActionBase * osg::ActorBase::getAction | ( | void | ) | [inline, inherited] |
Definition at line 122 of file OSGActorBase.inl.
References osg::ActorBase::_pAction.
00123 { 00124 return _pAction; 00125 }
| UInt32 osg::ActorBase::getActorId | ( | void | ) | const [inline, inherited] |
Definition at line 128 of file OSGActorBase.inl.
References osg::ActorBase::_actorId.
Referenced by osg::NewActionBase::subBasicActor(), and osg::NewActionBase::subExtendActor().
00129 { 00130 return _actorId; 00131 }
| bool osg::ActorBase::getChildrenListEnabled | ( | void | ) | const [inline, inherited] |
Return if the children list is enabled.
Definition at line 141 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, and osg::NewActionBase::getChildrenListEnabled().
00142 { 00143 return _pAction->getChildrenListEnabled(); 00144 }
| void osg::ActorBase::setChildrenListEnabled | ( | bool | enabled | ) | [inline, inherited] |
Enable or disable the children list.
Definition at line 150 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, and osg::NewActionBase::setChildrenListEnabled().
00151 { 00152 _pAction->setChildrenListEnabled(enabled); 00153 }
| NodePtr osg::ActorBase::getNode | ( | void | ) | const [inline, inherited] |
Return the traversed node.
Definition at line 159 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getChildrenList(), and osg::ChildrenList::getParentNode().
00160 { 00161 return _pAction->getChildrenList().getParentNode(); 00162 }
| UInt32 osg::ActorBase::getNumChildren | ( | void | ) | const [inline, inherited] |
Return the number of children of the traversed node.
Definition at line 168 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getChildrenList(), and osg::ChildrenList::getSize().
00169 { 00170 return _pAction->getChildrenList().getSize(); 00171 }
Return the childIndex'th child of the traversed node.
Definition at line 178 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::ChildrenList::getChild(), and osg::NewActionBase::getChildrenList().
00179 { 00180 return _pAction->getChildrenList().getChild(childIndex); 00181 }
| bool osg::ActorBase::getChildActive | ( | UInt32 | childIndex | ) | const [inline, inherited] |
Return if the childIndex'th child is active, i.e. whether it will be traversed.
Definition at line 191 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::ChildrenList::getActive(), and osg::NewActionBase::getChildrenList().
00192 { 00193 return _pAction->getChildrenList().getActive(childIndex); 00194 }
| void osg::ActorBase::setChildActive | ( | UInt32 | childIndex, | |
| bool | active | |||
| ) | [inline, inherited] |
Set if the childIndex'th child will be included in the traversal.
Definition at line 203 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getChildrenList(), and osg::ChildrenList::setActive().
00204 { 00205 _pAction->getChildrenList().setActive(childIndex, active); 00206 }
| ActorBase::PriorityType osg::ActorBase::getChildPriority | ( | UInt32 | childIndex | ) | const [inline, inherited] |
Return the priority assigned to the childIndex'th child.
Definition at line 215 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getChildrenList(), and osg::ChildrenList::getPriority().
00216 { 00217 return _pAction->getChildrenList().getPriority(childIndex); 00218 }
| void osg::ActorBase::setChildPriority | ( | UInt32 | childIndex, | |
| PriorityType | prio | |||
| ) | [inline, inherited] |
Set the priority of the childIndex'th child.
Definition at line 227 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getChildrenList(), and osg::ChildrenList::setPriority().
00228 { 00229 _pAction->getChildrenList().setPriority(childIndex, prio); 00230 }
| UInt32 osg::ActorBase::getNumExtraChildren | ( | void | ) | const [inline, inherited] |
Return the number of extra children already added.
Definition at line 240 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getExtraChildrenList(), and osg::ExtraChildrenList::getSize().
00241 { 00242 return _pAction->getExtraChildrenList().getSize(); 00243 }
Return the childIndex'th extra child.
Definition at line 250 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::ExtraChildrenList::getChild(), and osg::NewActionBase::getExtraChildrenList().
00251 { 00252 return _pAction->getExtraChildrenList().getChild(childIndex); 00253 }
| bool osg::ActorBase::getExtraChildActive | ( | UInt32 | childIndex | ) | const [inline, inherited] |
Return if the childIndex'th extra child is active, i.e. whether it will be traversed.
Definition at line 261 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::ExtraChildrenList::getActive(), and osg::NewActionBase::getExtraChildrenList().
00262 { 00263 return _pAction->getExtraChildrenList().getActive(childIndex); 00264 }
| void osg::ActorBase::setExtraChildActive | ( | UInt32 | childIndex, | |
| bool | active | |||
| ) | [inline, inherited] |
Set if the childIndex'th extra child will be included in the traversal.
Definition at line 271 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getExtraChildrenList(), and osg::ExtraChildrenList::setActive().
00272 { 00273 _pAction->getExtraChildrenList().setActive(childIndex, active); 00274 }
| ActorBase::PriorityType osg::ActorBase::getExtraChildPriority | ( | UInt32 | childIndex | ) | const [inline, inherited] |
Return the priority assigned to the childIndex'th extra child.
Definition at line 281 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getExtraChildrenList(), and osg::ExtraChildrenList::getPriority().
00282 { 00283 return _pAction->getExtraChildrenList().getPriority(childIndex); 00284 }
| void osg::ActorBase::setExtraChildPriority | ( | UInt32 | childIndex, | |
| PriorityType | prio | |||
| ) | [inline, inherited] |
Set the priority of the childIndex'th extra child.
Definition at line 291 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, osg::NewActionBase::getExtraChildrenList(), and osg::ExtraChildrenList::setPriority().
00292 { 00293 _pAction->getExtraChildrenList().setPriority(childIndex, prio); 00294 }
| UInt32 osg::ActorBase::getNumPasses | ( | void | ) | const [inline, inherited] |
Return the number of passes requested for the current node. The default number of passes is 1.
Definition at line 305 of file OSGActorBase.inl.
References osg::ActorBase::_pAction, and osg::NewActionBase::getNumPasses().
00306 { 00307 return _pAction->getNumPasses(); 00308 }
| virtual ActorBaseState* osg::ActorBase::createStateClone | ( | void | ) | [pure virtual, inherited] |
| virtual void osg::ActorBase::destroyStateClone | ( | ActorBaseState * | pStateClone | ) | [pure virtual, inherited] |
| virtual void osg::ActorBase::createInitialState | ( | void | ) | [pure virtual, inherited] |
Referenced by osg::ActorBase::addEvent().
| virtual void osg::ActorBase::deleteInitialState | ( | void | ) | [pure virtual, inherited] |
Referenced by osg::ActorBase::subEvent().
| void osg::ActorBase::beginEditState | ( | void | ) | [inline, inherited] |
Notify the action, that state is about to be edited.
Ext: Call this method inside a functor or the enterNode method of an actor before accessing any state variables. If you are worried about top performance you may omit the call as long as you only read state values, but as this is error prone it is not recommended.
Definition at line 326 of file OSGActorBase.inl.
References osg::ActorBase::_actorId, osg::ActorBase::_pAction, and osg::NewActionBase::beginEditStateEvent().
| void osg::ActorBase::endEditState | ( | void | ) | [inline, inherited] |
Notify the action, that state access is complete.
Ext: Call this method after you are done with modifying state. None of the implemented actions perform anything upon this call, hence it is not as critical as the beginEditState call.
Definition at line 341 of file OSGActorBase.inl.
References osg::ActorBase::_actorId, osg::ActorBase::_pAction, and osg::NewActionBase::endEditStateEvent().
| const ActorBase::ActorBaseState * osg::ActorBase::getState | ( | void | ) | const [inline, inherited] |
Get a const pointer to the currently used state.
Definition at line 350 of file OSGActorBase.inl.
References osg::ActorBase::_pState.
00351 { 00352 return _pState; 00353 }
| ActorBase::ActorBaseState * osg::ActorBase::getState | ( | void | ) | [inline, inherited] |
Get a pointer to the currently used state.
Definition at line 359 of file OSGActorBase.inl.
References osg::ActorBase::_pState.
00360 { 00361 return _pState; 00362 }
| void osg::ActorBase::setState | ( | ActorBaseState * | pState | ) | [inline, inherited] |
Set the currently used state.
Definition at line 368 of file OSGActorBase.inl.
References osg::ActorBase::_pState.
00369 { 00370 _pState = pState; 00371 }
| void ActorBase::addEvent | ( | NewActionBase * | pAction, | |
| UInt32 | actorId | |||
| ) | [protected, virtual, inherited] |
Notifies the actor, that it was added to an action.
Definition at line 160 of file OSGActorBase.cpp.
References osg::ActorBase::_actorId, osg::ActorBase::_pAction, osg::ActorBase::createInitialState(), osg::endLog(), and SWARNING.
Referenced by osg::NewActionBase::addBasicActor(), and osg::NewActionBase::addExtendActor().
00161 { 00162 if((_pAction != NULL) || (_actorId != TypeTraits<UInt32>::getMax())) 00163 { 00164 SWARNING << "ActorBase::attachEvent: Actor already attached." 00165 << endLog; 00166 } 00167 00168 createInitialState(); 00169 00170 _pAction = pAction; 00171 _actorId = actorId; 00172 }
| void ActorBase::subEvent | ( | NewActionBase * | pAction, | |
| UInt32 | actorId | |||
| ) | [protected, virtual, inherited] |
Notifies the actor, that it was removed from an action.
Definition at line 179 of file OSGActorBase.cpp.
References osg::ActorBase::_actorId, osg::ActorBase::_pAction, osg::ActorBase::deleteInitialState(), osg::endLog(), and SWARNING.
Referenced by osg::NewActionBase::subBasicActor(), and osg::NewActionBase::subExtendActor().
00180 { 00181 if((_pAction != pAction) || (_actorId != actorId)) 00182 { 00183 SWARNING << "ActorBase::detachEvent: Inconsistency detected." 00184 << endLog; 00185 } 00186 00187 deleteInitialState(); 00188 00189 _pAction = NULL; 00190 _actorId = TypeTraits<UInt32>::getMax(); 00191 }
friend class osg::NewActionBase [friend, inherited] |
Definition at line 214 of file OSGActorBase.h.
1.6.1