Each game object managed by the simulation has an Affordance Tree Node. It manages scope, affordances, slots, and, if the affordance tree is an active part of the simulation, its goals and levels of satisfaction.
More...
Each game object managed by the simulation has an Affordance Tree Node. It manages scope, affordances, slots, and, if the affordance tree is an active part of the simulation, its goals and levels of satisfaction.
Simulation.AffordanceTreeNode.AffordanceTreeNode |
( |
AffordanceTreeNode |
parent, |
|
|
string |
name, |
|
|
string |
speciesName, |
|
|
Vector3 |
position |
|
) |
| |
Create a new AffordanceTreeNode and attach it to the parent node
- Parameters
-
parent | The parent in the Affordance Tree |
name | The name of the node, useful for debugging |
speciesName | If this is an agent, which species it is |
position | World position |
bool Simulation.AffordanceTreeNode.AcceptAuctionVictory |
( |
Slot |
slot | ) |
|
Accepting a slot (for which a bid was previously placed).
- Parameters
-
slot | The slot this affordance tree node should consume (usually resulting in going to the slot and running an interaction) |
- Returns
- Whether a slot was made available for consumption
bool Simulation.AffordanceTreeNode.AddSlot |
( |
Vector3 |
worldPosition, |
|
|
Vector3 |
localPosition |
|
) |
| |
Adds a slot (a location to run interactions) to this Affordance Tree Node.
- Parameters
-
worldPosition | The absolute position in the game world |
localPosition | The position relative to the parent transform |
- Returns
- Whether the slot was successfully added
bool Simulation.AffordanceTreeNode.AddSlot |
( |
Vector3 |
worldPosition, |
|
|
Vector3 |
localPosition, |
|
|
Vector3 |
lookAtTarget |
|
) |
| |
Adds a slot (a location to run interactions) to this Affordance Tree Node.
- Parameters
-
worldPosition | The absolute position in the game world |
localPosition | The position relative to the parent transform |
lookAtTarget | A position that characters can be oriented towards for better animation results |
- Returns
- Whether the slot was successfully added
bool Simulation.AffordanceTreeNode.AddSlot |
( |
Vector3 |
worldPosition, |
|
|
Vector3 |
localPosition, |
|
|
Vector3 |
lookAtTarget, |
|
|
bool |
isAuctionable |
|
) |
| |
Adds a slot (a location to run interactions) to this Affordance Tree Node.
- Parameters
-
worldPosition | The absolute position in the game world |
localPosition | The position relative to the parent transform |
lookAtTarget | A position that characters can be oriented towards for better animation results |
isAuctionable | If the slot is not auctionable it will not be offered to agents. |
- Returns
- Whether the slot was successfully added
void Simulation.AffordanceTreeNode.ApplyParentInteraction |
( |
| ) |
|
Apply the effects of the interaction that is running at the parent node to this node.
Slot Simulation.AffordanceTreeNode.AvailableSlot |
( |
bool |
consumeSlot | ) |
|
Returns a slot that has been won in an auction. Can be consumed in the process of asking for it.
- Parameters
-
consumeSlot | Whether or not the slot should be consumed |
- Returns
- The slot that can be consumed
int Simulation.AffordanceTreeNode.CountOfChildren |
( |
| ) |
|
How many children (Affordance Tree nodes) this node has.
- Returns
string Simulation.AffordanceTreeNode.Printer |
( |
bool |
reportAffordances | ) |
|
Returns a string with debug information. Recursive (reports this node and its children).
- Parameters
-
reportAffordances | Adds detailed information about the affordances to the debug info. |
- Returns
- String with debug information
void Simulation.AffordanceTreeNode.Remove |
( |
| ) |
|
Remove/Delete this affordance tree node at an appropriate time
bool Simulation.AffordanceTreeNode.setSpecies |
( |
string |
name | ) |
|
Set the species of this node to a specific kind.
- Parameters
-
name | The name (identifier) of the species |
- Returns
- Whether the species was successfully set.
Affordance Simulation.AffordanceTreeNode.Affordance |
|
get |
The opportunities for interaction at this node, and an abstraction of the opportunities to interact with children nodes.
bool Simulation.AffordanceTreeNode.CurrentInteractionSatisfiesMostUrgentNeed |
|
get |
Whether the interaction this node is currently participating in (if any) can satisfy his most urgent need (taking weights as well as current satisfaction level into account)
Goal Simulation.AffordanceTreeNode.Goal |
|
getset |
Goals are optional, and can be used to make decisions.
string Simulation.AffordanceTreeNode.MostUrgentNeed |
|
get |
Which need is most urgent, taking weights as well as current satisfaction level into account.
Needs Simulation.AffordanceTreeNode.SatisfactionLevels |
|
get |
Each need has a value between its min and max value: its satisfaction level.
List<Slot> Simulation.AffordanceTreeNode.Slots |
|
get |
All the slots that belong to this Affordance Tree Node
Species Simulation.AffordanceTreeNode.Species |
|
get |
A species determines which needs an agent has. Only required for agents.
The documentation for this class was generated from the following file: