Package populus :: Module ReactiveLibrary :: Class SocialTerritorialMind
[frames] | no frames]

Class SocialTerritorialMind


A reactive intelligence able to navigate a dynamic environment and react properly to social situations and human territories.

It realizes gaze behaviors included the idle one, moreover it has behaviors for human territoriality in conversations and, partially, in queues also.

Nested Classes

Inherited from ReactiveMind.ReactiveMind: Motivation

Instance Methods
 
__init__(self)
The constructor create an instance of SocialTerritorialMind.

Inherited from ReactiveMind.ReactiveMind: addMotivation, createSteeringBehavior, forget, getBehaviorPriority, getBehaviorTime, getBehaviorTimeMarker, getBehaviorWeight, investigateBehavior, memorize, modifyBehaviorPriority, modifyBehaviorWeight, plugPerception, remember, requestStartBehavior, requestStopAllBehaviors, requestStopBehavior, setBehaviorTimeMarker, setBehaviorTimer, startSteeringBehavior, stopBehaviorLater, stopSteeringBehavior

Inherited from SteerLibrary.SteerLibraryMixIn: convertForceIntoCosts, initSetOfCosts, spanDirections, steerForArrival, steerForAvoidObstacle, steerForAvoidObstacles, steerForAvoidObstaclesNEW, steerForCohesion, steerForFacing, steerForFlee, steerForKeepGroupSpace, steerForMinDistance, steerForSeek

    Behavior Interfaces
 
focusOn(self, target=None, priority=None, caller=None)
Focus on a target reactive behavior.
 
glanceAt(self, target=None, duration=2.0, priority=None, caller=None, name=None)
Glance at a target reactive behavior.
 
gazeAt(self, target=None, duration=0.0, priority=None, caller=None, name=None)
Gaze at a target reactive behavior.
 
turnToward(self, target)
Turn toward reactive behavior.
 
turnHeadToward(self, target)
Turn head toward reactive behavior.
 
doIdleGaze(self, stop=False)
Do idle gaze reactive behavior.

Inherited from NavigationalMind: goTo, moveTo

    Update

Inherited from ReactiveMind.ReactiveMind: update

Static Methods

Inherited from SteerLibrary.SteerLibraryMixIn: addCost, getCost, getMagnitude, setCost, setMagnitude

Method Details

__init__(self)
(Constructor)

 

The constructor create an instance of SocialTerritorialMind.

Overrides: SteerLibrary.SteerLibraryMixIn.__init__

focusOn(self, target=None, priority=None, caller=None)

 

Focus on a target reactive behavior. Command an agent to look and stay focused on a given target.

A target may be

  1. A direction in local coordinates.
  2. A prop; in this case the agent will look at the its center of mass.
  3. Another human-like entity; in this case the agent will into the other's eyes.

Use priority override the default behavior priority or caller to propagate priority and weight from a calling behavior.

Notice that focus on nothing (target is None) means to de-focus from the previous target.

Parameters:
  • target (Vec3 or Prop or SimpleHumanBody) - The target as a direction in local coordinates, or a prop or a human-like entity.
  • priority (int) - Set a specific priority to the reactive behavior overriding the default one.
  • caller (dict) - The reactive behavior who called focuOn. Priority and weight of the caller will propagated to this reactive behavior.

glanceAt(self, target=None, duration=2.0, priority=None, caller=None, name=None)

 

Glance at a target reactive behavior. Command an agent to quickly glance at a given target.

The target will be memorized in the short time memory for 7 sec. A target may be

  1. A direction in local coordinates.
  2. A prop; in this case the agent will look at the its center of mass.
  3. Another human-like entity; in this case the agent will into the other's eyes.

Use priority override the default behavior priority or caller to propagate priority and weight from a calling behavior.

Set a unique name if you want to refer to this behavior instance later.

Parameters:
  • target (Vec3 or Prop or SimpleHumanBody) - The target as a direction in local coordinates, or a prop or a human-like entity.
  • priority (int) - Set a specific priority to the reactive behavior overriding the default one.
  • caller (dict) - The reactive behavior who called focuOn. Priority and weight of the caller will propagated to this reactive behavior.
  • name (string) - A name for this reactive behavior instance.

gazeAt(self, target=None, duration=0.0, priority=None, caller=None, name=None)

 

Gaze at a target reactive behavior. Command an agent to look at a given target.

A target may be

  1. A direction in local coordinates.
  2. A prop; in this case the agent will look at the its center of mass.
  3. Another human-like entity; in this case the agent will into the other's eyes.

Use priority override the default behavior priority or caller to propagate priority and weight from a calling behavior.

Set a unique name if you want to refer to this behavior instance later.

Parameters:
  • target (Vec3 or Prop or SimpleHumanBody) - The target as a direction in local coordinates, or a prop or a human-like entity.
  • priority (int) - Set a specific priority to the reactive behavior overriding the default one.
  • caller (dict) - The reactive behavior who called focuOn. Priority and weight of the caller will propagated to this reactive behavior.
  • name (string) - A name for this reactive behavior instance.

turnToward(self, target)

 

Turn toward reactive behavior. Command an agent to turn the whole body oward a given target.

A target may be a prop or another human-like entity.

Parameters:
  • target (Prop or SimpleHumanBody) - The target as a direction in local coordinates, or a prop or a human-like entity.

turnHeadToward(self, target)

 

Turn head toward reactive behavior. Command an agent to turn his head toward a given target.

A target may be

  1. A direction in global coordinates.
  2. A prop.
  3. Another human-like entity.
Parameters:
  • target (Vec3 or Prop or SimpleHumanBody) - The target as a direction in local coordinates, or a prop or a human-like entity.

doIdleGaze(self, stop=False)

 

Do idle gaze reactive behavior. Command an agent to start or stop gazing around purposelessy.

Parameters:
  • stop (bool) - If true the agent will stop doing idle gaze.