#include <OSGExtendActorBase.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 | ~ExtendActorBase (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 |
Extra Children Management | |
| UInt32 | addExtraChild (const NodePtr &pNode) |
| UInt32 | addExtraChild (const NodePtr &pNode, PriorityType prio) |
Mutli Pass Management | |
| void | setNumPasses (UInt32 numPasses) |
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 | |
| ExtendActorBase (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 OSGExtendActorBase.h.
typedef ActorBase osg::ExtendActorBase::Inherited [protected] |
Definition at line 104 of file OSGExtendActorBase.h.
typedef Inherited::StateType osg::ExtendActorBase::StateType [protected] |
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.
| ExtendActorBase::~ExtendActorBase | ( | void | ) | [virtual] |
| ExtendActorBase::ExtendActorBase | ( | void | ) | [protected] |
Default constructor
Definition at line 94 of file OSGExtendActorBase.cpp.
00095 : Inherited() 00096 { 00097 }
| ExtendActorBase::ResultE ExtendActorBase::start | ( | void | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 60 of file OSGExtendActorBase.cpp.
References start.
00061 { 00062 return Inherited::start(); 00063 }
| ExtendActorBase::ResultE ExtendActorBase::stop | ( | void | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 66 of file OSGExtendActorBase.cpp.
References osg::ActorBase::stop().
00067 { 00068 return Inherited::stop(); 00069 }
| ExtendActorBase::ResultE ExtendActorBase::enterNode | ( | FunctorArgumentType & | funcArg | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 76 of file OSGExtendActorBase.cpp.
References osg::NewActionTypes::Continue.
00077 { 00078 return NewActionTypes::Continue; 00079 }
| ExtendActorBase::ResultE ExtendActorBase::leaveNode | ( | FunctorArgumentType & | funcArg | ) | [pure virtual] |
Implements osg::ActorBase.
Definition at line 82 of file OSGExtendActorBase.cpp.
References osg::NewActionTypes::Continue.
00083 { 00084 return NewActionTypes::Continue; 00085 }
Add a node as extra child, i.e. this node will be traversed as if it was a child of the currently traversed node.
Definition at line 50 of file OSGExtendActorBase.inl.
References osg::ExtraChildrenList::addChild(), osg::ActorBase::getAction(), and osg::NewActionBase::getExtraChildrenList().
00051 { 00052 return getAction()->getExtraChildrenList().addChild(pNode); 00053 }
| UInt32 osg::ExtendActorBase::addExtraChild | ( | const NodePtr & | pNode, | |
| PriorityType | prio | |||
| ) | [inline] |
Add a node as extra child with priority, this node will be traversed as if it was a child of the currently traversed node.
Definition at line 60 of file OSGExtendActorBase.inl.
References osg::ExtraChildrenList::addChild(), osg::ActorBase::getAction(), and osg::NewActionBase::getExtraChildrenList().
00061 { 00062 return getAction()->getExtraChildrenList().addChild(pNode, prio); 00063 }
| void osg::ExtendActorBase::setNumPasses | ( | UInt32 | numPasses | ) | [inline] |
Definition at line 70 of file OSGExtendActorBase.inl.
References osg::ActorBase::getAction(), and osg::NewActionBase::setNumPasses().
00071 { 00072 getAction()->setNumPasses(numPasses); 00073 }
| UInt32 ExtendActorBase::addHelper | ( | NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 104 of file OSGExtendActorBase.cpp.
References osg::NewActionBase::addExtendActor().
00105 { 00106 return pAction->addExtendActor(this); 00107 }
| void ExtendActorBase::subHelper | ( | NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 110 of file OSGExtendActorBase.cpp.
References osg::endLog(), osg::NewActionBase::findExtendActor(), osg::NewActionBase::subExtendActor(), and SWARNING.
00111 { 00112 UInt32 actorIndex = pAction->findExtendActor(this); 00113 00114 if(actorIndex == TypeTraits<UInt32>::getMax()) 00115 { 00116 SWARNING << "ExtendActorBase::subHelper: Illegal actor index." 00117 << endLog; 00118 00119 return; 00120 } 00121 00122 pAction->subExtendActor(actorIndex); 00123 }
| UInt32 ExtendActorBase::findHelper | ( | const NewActionBase * | pAction | ) | [protected, virtual] |
Implements osg::ActorBase.
Definition at line 126 of file OSGExtendActorBase.cpp.
References osg::NewActionBase::findExtendActor().
00127 { 00128 return pAction->findExtendActor(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 addExtraChild(), and 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.
The children list must have been enabled with setChildrenListEnabled(true);
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.
The children list must have been enabled with setChildrenListEnabled(true);
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.
The children list must have been enabled with setChildrenListEnabled(true);
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.
The children list must have been enabled with setChildrenListEnabled(true);
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.
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.
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.5.5