Every scene should have one root node for the AFFORDANCE TREE. This uses the settings of the NEEDSIM Manager and controls the simulation. More...

Inheritance diagram for NEEDSIM.NEEDSIMRoot:
NEEDSIM3rdParty.Singleton< NEEDSIMRoot >

Public Member Functions

void BuildFlatAffordanceTreeFromScene ()
 Goes through the scene and adds all NEEDSIMNodes as children of the root. This is best if you don't have complexity issues to deal with. Otherwise building the affordance tree with more depth is adviced. More...
 
void BuildAffordanceTreeFromNode (NEEDSIMNode node)
 To use this please pass the node you want to use as root node to this method. It is assumed that in the scene hierarchy this node is the root node to all other NEEDSIMNodes. So if you have a village with houses and objects in each house you should, in the scene view, make the village parent of the houses, and the houses object of the village, and each game object should have a NEEDSIMNode. You can leave the interactions set to none for the village and the houses if they are just used to calculate the abstraction for the Affordance Tree. The method BuildTreeBasedOnSceneHierarchy() that is called here will not work for intermediate objects in the hierarchy - there is only deeper search if a direct ancestor is a NEEDSIMNode. More...
 
- Public Member Functions inherited from NEEDSIM3rdParty.Singleton< NEEDSIMRoot >
void OnDestroy ()
 When Unity quits, it destroys objects in a random order. In principle, a Singleton is only destroyed when application quits. If any script calls Instance after it have been destroyed, it will create a buggy ghost object that will stay on the Editor scene even after stopping playing the Application. Really bad! So, this was made to be sure we're not creating that buggy ghost object. More...
 

Protected Member Functions

 NEEDSIMRoot ()
 guarantee this will be always a singleton only - can't use the constructor! More...
 

Detailed Description

Every scene should have one root node for the AFFORDANCE TREE. This uses the settings of the NEEDSIM Manager and controls the simulation.

Constructor & Destructor Documentation

NEEDSIM.NEEDSIMRoot.NEEDSIMRoot ( )
protected

guarantee this will be always a singleton only - can't use the constructor!

Member Function Documentation

void NEEDSIM.NEEDSIMRoot.BuildAffordanceTreeFromNode ( NEEDSIMNode  node)

To use this please pass the node you want to use as root node to this method. It is assumed that in the scene hierarchy this node is the root node to all other NEEDSIMNodes. So if you have a village with houses and objects in each house you should, in the scene view, make the village parent of the houses, and the houses object of the village, and each game object should have a NEEDSIMNode. You can leave the interactions set to none for the village and the houses if they are just used to calculate the abstraction for the Affordance Tree. The method BuildTreeBasedOnSceneHierarchy() that is called here will not work for intermediate objects in the hierarchy - there is only deeper search if a direct ancestor is a NEEDSIMNode.

Parameters
node
void NEEDSIM.NEEDSIMRoot.BuildFlatAffordanceTreeFromScene ( )

Goes through the scene and adds all NEEDSIMNodes as children of the root. This is best if you don't have complexity issues to deal with. Otherwise building the affordance tree with more depth is adviced.


The documentation for this class was generated from the following file:
  • NEEDSIMRoot.cs