Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat Class Reference

Behavior tree condition evaluating a floating point parameter table entry. More...

Inheritance diagram for Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat:
Dragengine.BehaviorTreeSystem.BTCondition

Classes

enum  Operator
 Compare operator. More...

Public Member Functions

bool evaluateCondition (BTContext context, Dictionary parameters)
 Evaluate condition.
float getCompareValue ()
 Default compare against value.
float getDefaultValue ()
 Default value if entry to compare is not null.
ParameterTableEntry getEntry ()
 Parameter table entry to compare.
ParameterTableEntry getEntryCompareValue ()
 Parameter table entry to compare against.
Operator getOperator ()
 Compare operator from eOperators.
String getParameterNameCompareValue ()
 Use named parameter as source of compare value if not null.
float getThreshold ()
 Threshold value.
BTConditionParameterTableFloat negated ()
 Create condition testing the exact opposite.
BTConditionParameterTableFloat new (ParameterTableEntry entry, float defaultValue, Operator operator, float compareValue)
 Create condition.
BTConditionParameterTableFloat new (ParameterTableEntry entry, float defaultValue, Operator operator, float compareValue, String parameterNameCompareValue)
 Create condition.
BTConditionParameterTableFloat new (ParameterTableEntry entry, float defaultValue, Operator operator, ParameterTableEntry entryCompareValue, float compareValue, String parameterNameCompareValue)
 Create condition.
void setCompareValue (float compareValue)
 Set default compare against value.
void setDefaultValue (float defaultValue)
 Set default value if entry to compare is not null.
void setEntry (ParameterTableEntry entry)
 Set parameter table entry to compare.
void setEntryCompareValue (ParameterTableEntry entry)
 Set parameter table entry to compare against.
void setOperator (Operator operator)
 Set compare operator from eOperators.
void setParameterNameCompareValue (String name)
 Use named parameter as source of compare value if not null.
void setThreshold (float threshold)
 Set threshold value.

Public Attributes

float pCompareValue
float pDefaultValue
ParameterTableEntry pEntry
ParameterTableEntry pEntryCompareValue
Operator pOperator
String pParameterNameCompareValue
float pThreshold

Detailed Description

Behavior tree condition evaluating a floating point parameter table entry.

Compares the value of a parameter table entry against a static value or another parameter table entry. A threshold is used for the compare operations defaulting to 0.0001.

Member Function Documentation

◆ evaluateCondition()

bool Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.evaluateCondition ( BTContext context,
Dictionary parameters )

Evaluate condition.

Parameters
parametersDictionary with parameters of type String key and String value. Do not change the content of the dictionary as it is shared.

Implements Dragengine.BehaviorTreeSystem.BTCondition.

References evaluateCondition(), getCompareValue(), getEntryCompareValue(), getParameterNameCompareValue(), negated(), new(), pCompareValue, pEntry, pEntryCompareValue, pOperator, pParameterNameCompareValue, pThreshold, setCompareValue(), setEntryCompareValue(), setParameterNameCompareValue(), and setThreshold().

Referenced by evaluateCondition().

◆ getCompareValue()

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getCompareValue ( )

Default compare against value.

References getDefaultValue(), and pDefaultValue.

Referenced by evaluateCondition().

◆ getDefaultValue()

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getDefaultValue ( )

Default value if entry to compare is not null.

References pDefaultValue, pOperator, and pThreshold.

Referenced by getCompareValue().

◆ getEntry()

ParameterTableEntry Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getEntry ( )

Parameter table entry to compare.

References new().

Referenced by setOperator().

◆ getEntryCompareValue()

ParameterTableEntry Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getEntryCompareValue ( )

Parameter table entry to compare against.

References new(), and pEntry.

Referenced by evaluateCondition().

◆ getOperator()

Operator Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getOperator ( )

Compare operator from eOperators.

Referenced by setParameterNameCompareValue().

◆ getParameterNameCompareValue()

String Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getParameterNameCompareValue ( )

Use named parameter as source of compare value if not null.

References pDefaultValue.

Referenced by evaluateCondition().

◆ getThreshold()

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.getThreshold ( )

Threshold value.

References pEntry.

Referenced by negated().

◆ negated()

BTConditionParameterTableFloat Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.negated ( )

Create condition testing the exact opposite.

References getThreshold(), pOperator, pThreshold, and setOperator().

Referenced by evaluateCondition().

◆ new() [1/3]

BTConditionParameterTableFloat Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.new ( ParameterTableEntry entry,
float defaultValue,
Operator operator,
float compareValue )

Create condition.

References new().

Referenced by evaluateCondition(), getEntry(), getEntryCompareValue(), new(), new(), and setEntry().

◆ new() [2/3]

BTConditionParameterTableFloat Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.new ( ParameterTableEntry entry,
float defaultValue,
Operator operator,
float compareValue,
String parameterNameCompareValue )

Create condition.

References new().

◆ new() [3/3]

BTConditionParameterTableFloat Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.new ( ParameterTableEntry entry,
float defaultValue,
Operator operator,
ParameterTableEntry entryCompareValue,
float compareValue,
String parameterNameCompareValue )

Create condition.

◆ setCompareValue()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setCompareValue ( float compareValue)

Set default compare against value.

References setDefaultValue().

Referenced by evaluateCondition().

◆ setDefaultValue()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setDefaultValue ( float defaultValue)

Set default value if entry to compare is not null.

References pCompareValue, pEntryCompareValue, and pParameterNameCompareValue.

Referenced by setCompareValue().

◆ setEntry()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setEntry ( ParameterTableEntry entry)

Set parameter table entry to compare.

References new(), and pEntry.

Referenced by setThreshold().

◆ setEntryCompareValue()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setEntryCompareValue ( ParameterTableEntry entry)

Set parameter table entry to compare against.

Referenced by evaluateCondition().

◆ setOperator()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setOperator ( Operator operator)

Set compare operator from eOperators.

References getEntry().

Referenced by negated().

◆ setParameterNameCompareValue()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setParameterNameCompareValue ( String name)

Use named parameter as source of compare value if not null.

References getOperator(), and pOperator.

Referenced by evaluateCondition().

◆ setThreshold()

void Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.setThreshold ( float threshold)

Set threshold value.

References setEntry().

Referenced by evaluateCondition().

Member Data Documentation

◆ pCompareValue

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pCompareValue

◆ pDefaultValue

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pDefaultValue

◆ pEntry

ParameterTableEntry Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pEntry

◆ pEntryCompareValue

ParameterTableEntry Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pEntryCompareValue

◆ pOperator

Operator Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pOperator

◆ pParameterNameCompareValue

String Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pParameterNameCompareValue

◆ pThreshold

float Dragengine.BehaviorTreeSystem.BTConditionParameterTableFloat.pThreshold

The documentation for this class was generated from the following file: