Qualia
0.2
|
Execute behaviors in parallel. More...
#include <ParallelNode.h>
Public Member Functions | |
BEHAVIOR_STATUS | execute (void *agent) |
This method is invoked by the node's parent when the node should be run. More... | |
void | init (void *agent) |
This method will be invoked before the node is executed for the first time. More... | |
ParallelNode (FAILURE_POLICY failurePolicy=FAIL_ON_ALL, SUCCESS_POLICY successPolicy=SUCCEED_ON_ALL) | |
virtual | ~ParallelNode () |
![]() | |
BehaviorTreeInternalNode () | |
virtual | ~BehaviorTreeInternalNode () |
virtual BehaviorTreeNode * | setChildren (BehaviorTreeNode *node,...) |
virtual BehaviorTreeNode * | _setChildren (BehaviorTreeNode *node, va_list nodeList) |
Helper method for setChildren(). More... | |
![]() | |
virtual | ~BehaviorTreeNode () |
Private Attributes | |
bool * | childrenRunning |
FAILURE_POLICY | failPolicy |
SUCCESS_POLICY | succeedPolicy |
uint8_t | nFailure |
uint8_t | nSuccess |
Additional Inherited Members | |
![]() | |
BehaviorTreeNode ** | children |
This node's children nodes. More... | |
uint8_t | nChildren |
The number of children of this node. More... | |
Execute behaviors in parallel.
There are two policies that control the flow of execution. The first is the policy for failure, and the second is the policy for success.
For failure, the options are "fail when one child fails" and "fail when all children fail". For success, the options are similarly "complete when one child completes", and "complete when all children complete".
ParallelNode::ParallelNode | ( | FAILURE_POLICY | failurePolicy = FAIL_ON_ALL , |
SUCCESS_POLICY | successPolicy = SUCCEED_ON_ALL |
||
) |
failurePolicy | Determines how many of the node's children must fail before the node fails |
successPolicy | Determines how many of the node's children must succeed before the node succeeds |
|
virtual |
|
virtual |
This method is invoked by the node's parent when the node should be run.
Implements BehaviorTree::BehaviorTreeInternalNode.
|
virtual |
This method will be invoked before the node is executed for the first time.
Implements BehaviorTree::BehaviorTreeInternalNode.
|
private |
|
private |
|
private |
|
private |
|
private |