22 #ifndef SCUMM_HE_MOONBASE_AI_NODE_H 23 #define SCUMM_HE_MOONBASE_AI_NODE_H 25 #include "common/array.h" 29 const float SUCCESS = -1;
30 const float FAILURE = 1e20f;
38 virtual float getG()
const {
return _valueG; }
39 virtual float calcH() {
return 0; }
49 void setValueG(
float inG) { _valueG = inG; }
50 float getValueG() {
return _valueG; }
52 int getObjID()
const {
return _objID; }
53 void setObjID(
int inputObjID) { _objID = inputObjID; }
55 virtual int numChildrenToGen() = 0;
56 virtual IContainedObject *createChildObj(
int index,
int &completionFlag) = 0;
58 virtual int checkSuccess() = 0;
59 virtual float calcT() {
return getG(); }
61 float returnG()
const {
return getG(); }
70 static int _nodeCount;
79 void setParent(
Node *parentPtr) { _parent = parentPtr; }
80 Node *getParent()
const {
return _parent; }
82 void setDepth(
int depth) { _depth = depth; }
83 int getDepth()
const {
return _depth; }
85 static int getNodeCount() {
return _nodeCount; }
91 int generateChildren();
92 int generateNextChild();
95 float getObjectT() {
return _contents->calcT(); }