Qualia
0.2
|
Wraps a function or member pointer that returns a float value into a conditional node. More...
#include <FloatCondition.h>
Public Member Functions | |
BEHAVIOR_STATUS | execute (void *agent) |
Runs the test given in the constructor, and returns BT_SUCCESS if the test passes, or BT_FAILURE if the test fails. More... | |
void | init (void *agent) |
This method will be invoked before the node is executed for the first time. More... | |
FloatCondition (float(T::*const _func)() const, FLOAT_TEST _test, float _val, int _ulps=2^22) | |
FloatCondition (float(T::*_func)(), FLOAT_TEST _test, float _val, int _ulps=2^22) | |
FloatCondition (float(*_func)(), FLOAT_TEST _test, float _val, int _ulps=2^22) | |
![]() | |
virtual | ~BehaviorTreeNode () |
Private Member Functions | |
float | getObjVal (void *agent) |
template<> | |
float | getObjVal (void *agent) |
Private Attributes | |
float(T::*const | func )() |
float(*const | func2 )() |
FLOAT_TEST | test |
float | val |
int | ulps |
Wraps a function or member pointer that returns a float value into a conditional node.
To wrap a function pointer or static class member that takes no arguments and returns a float, instantiate FloatCondition without a type argument.
For example, to wrap the function "func", with the signature "float func()", one would do this: FloatCondition<> condition(&func,CLOSE,5.0f);
To wrap the static method "sMethod" of the class "Class", one would do this: FloatCondition<> condition(&Class::sMethod,CLOSE,5.0f);
To wrap a non-static class member, FloatCondition must be parameterized with the class's type. For example, to wrap the method "method" of class "Class", one would do this: FloatCondition<Class> condition(&Class:method,CLOSE,5.0f);
|
inline |
_func | the address of the const class member |
_test | the mathematical operation to perform on the return value of _func |
_val | the 'right side' of the mathematical expression the node performs |
_ulps | the number of "units in the last place" two floating point numbers can differ by and still be considered 'close' The default value of 2^25 will consider 5.000000000 and 5.000001 to be 'close'. However, the number of digits the numbers can differ by will vary depending on their size, due to how they are stored on the computer. |
|
inline |
_func | the address of the class member |
_test | the mathematical operation to perform on the return value of _func |
_val | the 'right side' of the mathematical expression the node performs |
_ulps | the number of "units in the last place" two floating point numbers can differ by and still be considered 'close' The default value of 2^25 will consider 5.000000000 and 5.000001 to be 'close'. However, the number of digits the numbers can differ by will vary depending on their size, due to how they are stored on the computer. |
|
inline |
_func | the address of the function or static class member |
_test | the mathematical operation to perform on the return value of _func |
_val | the 'right side' of the mathematical expression the node performs |
_ulps | the number of "units in the last place" two floating point numbers can differ by and still be considered 'close' The default value of 2^25 will consider 5.000000000 and 5.000001 to be 'close'. However, the number of digits the numbers can differ by will vary depending on their size, due to how they are stored on the computer. |
|
inlinevirtual |
Runs the test given in the constructor, and returns BT_SUCCESS if the test passes, or BT_FAILURE if the test fails.
Implements BehaviorTree::BehaviorTreeNode.
|
private |
|
inlineprivate |
|
inlinevirtual |
This method will be invoked before the node is executed for the first time.
Implements BehaviorTree::BehaviorTreeNode.
|
private |
|
private |
|
private |
|
private |
|
private |