Simulation.AffordanceTreeNode Class Reference

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...

Public Member Functions

 AffordanceTreeNode (AffordanceTreeNode parent, string name, string speciesName, Vector3 position)
 Create a new AffordanceTreeNode and attach it to the parent node More...
 
Slot AvailableSlot (bool consumeSlot)
 Returns a slot that has been won in an auction. Can be consumed in the process of asking for it. More...
 
bool AcceptAuctionVictory (Slot slot)
 Accepting a slot (for which a bid was previously placed). More...
 
bool AddSlot (Vector3 worldPosition, Vector3 localPosition)
 Adds a slot (a location to run interactions) to this Affordance Tree Node. More...
 
bool AddSlot (Vector3 worldPosition, Vector3 localPosition, Vector3 lookAtTarget)
 Adds a slot (a location to run interactions) to this Affordance Tree Node. More...
 
bool AddSlot (Vector3 worldPosition, Vector3 localPosition, Vector3 lookAtTarget, bool isAuctionable)
 Adds a slot (a location to run interactions) to this Affordance Tree Node. More...
 
void ApplyParentInteraction ()
 Apply the effects of the interaction that is running at the parent node to this node. More...
 
bool setSpecies (string name)
 Set the species of this node to a specific kind. More...
 
void Remove ()
 Remove/Delete this affordance tree node at an appropriate time More...
 
string Printer (bool reportAffordances)
 Returns a string with debug information. Recursive (reports this node and its children). More...
 
int CountOfChildren ()
 How many children (Affordance Tree nodes) this node has. More...
 

Properties

Affordance Affordance [get]
 The opportunities for interaction at this node, and an abstraction of the opportunities to interact with children nodes. More...
 
Species Species [get]
 A species determines which needs an agent has. Only required for agents. More...
 
Goal Goal [get, set]
 Goals are optional, and can be used to make decisions. More...
 
Needs SatisfactionLevels [get]
 Each need has a value between its min and max value: its satisfaction level. More...
 
string MostUrgentNeed [get]
 Which need is most urgent, taking weights as well as current satisfaction level into account. More...
 
bool 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) More...
 
List< SlotSlots [get]
 All the slots that belong to this Affordance Tree Node More...
 
AffordanceTreeNode Parent [get, set]
 The parent of this node More...
 
AffordanceTreeNode Root [get]
 The root of the Affordance Tree More...
 

Detailed Description

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.

Constructor & Destructor Documentation

Simulation.AffordanceTreeNode.AffordanceTreeNode ( AffordanceTreeNode  parent,
string  name,
string  speciesName,
Vector3  position 
)

Create a new AffordanceTreeNode and attach it to the parent node

Parameters
parentThe parent in the Affordance Tree
nameThe name of the node, useful for debugging
speciesNameIf this is an agent, which species it is
positionWorld position

Member Function Documentation

bool Simulation.AffordanceTreeNode.AcceptAuctionVictory ( Slot  slot)

Accepting a slot (for which a bid was previously placed).

Parameters
slotThe 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
worldPositionThe absolute position in the game world
localPositionThe 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
worldPositionThe absolute position in the game world
localPositionThe position relative to the parent transform
lookAtTargetA 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
worldPositionThe absolute position in the game world
localPositionThe position relative to the parent transform
lookAtTargetA position that characters can be oriented towards for better animation results
isAuctionableIf 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
consumeSlotWhether 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
reportAffordancesAdds 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
nameThe name (identifier) of the species
Returns
Whether the species was successfully set.

Property Documentation

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.

AffordanceTreeNode Simulation.AffordanceTreeNode.Parent
getset

The parent of this node

AffordanceTreeNode Simulation.AffordanceTreeNode.Root
get

The root of the Affordance Tree

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:
  • AffordanceTreeNode.cs