CUGL 1.3
Cornell University Game Library
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
CUInverterNode.h
1 //
2 // CUInverterNode.h
3 // Cornell University Game Library (CUGL)
4 //
5 // This module provides support for an inverter decorator behavior node.
6 // An inverter takes a node of priority p and gives it the opposite priority
7 // 1-p. This is type of negation operator.
8 //
9 // BehaviorNode objects are managed by BehaviorManager, and should never
10 // be allocated directly. Instead, you create a behavior node definition
11 // and pass it to a factor method in BehaviorManager.
12 //
13 // EXPERIMENTAL: This module is experimental. The API may change significantly
14 // in future CUGL releases.
15 //
16 // CUGL MIT License:
17 // This software is provided 'as-is', without any express or implied
18 // warranty. In no event will the authors be held liable for any damages
19 // arising from the use of this software.
20 //
21 // Permission is granted to anyone to use this software for any purpose,
22 // including commercial applications, and to alter it and redistribute it
23 // freely, subject to the following restrictions:
24 //
25 // 1. The origin of this software must not be misrepresented; you must not
26 // claim that you wrote the original software. If you use this software
27 // in a product, an acknowledgment in the product documentation would be
28 // appreciated but is not required.
29 //
30 // 2. Altered source versions must be plainly marked as such, and must not
31 // be misrepresented as being the original software.
32 //
33 // 3. This notice may not be removed or altered from any source distribution.
34 //
35 // Author: Apurv Sethi and Andrew Matsumoto (with Walker White)
36 // Version: 5/21/2018
37 //
38 #ifndef __CU_INVERTER_NODE_H__
39 #define __CU_INVERTER_NODE_H__
40 #include <cugl/ai/behavior/CUDecoratorNode.h>
41 #include <string>
42 #include <vector>
43 
44 namespace cugl {
45  namespace ai {
46 
59 class InverterNode : public DecoratorNode {
60 #pragma mark Constructors
61 public:
68  InverterNode() : DecoratorNode() { _classname = "InverterNode"; };
69 
74 
89  virtual void query(float dt) override;
90 };
91  }
92 }
93 #endif /* __CU_INVERTER_NODE_H__ */
cugl::ai::InverterNode
Definition: CUInverterNode.h:59
cugl::ai::InverterNode::InverterNode
InverterNode()
Definition: CUInverterNode.h:68
cugl::ai::BehaviorNode::_classname
std::string _classname
Definition: CUBehaviorNode.h:306
cugl::ai::BehaviorNode::dispose
virtual void dispose()
cugl::ai::InverterNode::~InverterNode
~InverterNode()
Definition: CUInverterNode.h:73
cugl::ai::InverterNode::query
virtual void query(float dt) override
cugl::ai::DecoratorNode
Definition: CUDecoratorNode.h:63