Qualia  0.2
ProbabilityNode.h
Go to the documentation of this file.
1 #include "mtrand.h"
2 
3 namespace BehaviorTree
4 {
5 
10  float weight;
12 
13  WeightedBehaviorTreeNode(float weight_, BehaviorTreeNode* node_) : weight(weight_), node(node_) {}
14 
15  bool isNull() const { return (node == NULL); }
16 
19 };
20 
22 
28 {
29 public:
31  virtual ~ProbabilityNode();
32 
34  virtual BehaviorTreeNode* setChildren(BehaviorTreeNode* node, ...);
35 
41 
46 #if is_computer()
47  virtual ProbabilityNode* addChild(BehaviorTreeNode* node, float weight);
48 #endif
49 
50  void init(void* object);
51  BEHAVIOR_STATUS execute(void* object);
52 
53 private:
55  float totalSum;
57  float* weighting;
58 };
59 
60 }