Package SmootLight :: Package util :: Module BehaviorQuerySystem
[hide private]
[frames] | no frames]

Module BehaviorQuerySystem

source code

Functions [hide private]
 
initBQS() source code
 
addBehavior(behavior)
Add a behavior to the behavior registry.
source code
 
query(predicateList)
BehaviorQuerySystem.query takes a list of predicates (functions with signature: (behavior,output)), and optionally a behavior to be compared to.
source code
 
getDistLambda(loc, maxDist)
Returns a lambda function that checks if for behaviors within maxDist of loc.
source code
 
getBehaviorsNear(loc, maxdist)
A premade method to do the common task of finding behavior near a location.
source code
Variables [hide private]
  __package__ = 'SmootLight.util'
  behaviorList = [<SmootLight.behaviors.EchoBehavior.EchoBehavio...
  initialized = True
Function Details [hide private]

getDistLambda(loc, maxDist)

source code 

Returns a lambda function that checks if for behaviors within maxDist of loc. Can be passed in as an arg to query.


Variables Details [hide private]

behaviorList

Value:
[<SmootLight.behaviors.EchoBehavior.EchoBehavior object at 0x9979a6c>,
 <SmootLight.behaviors.BehaviorChain.BehaviorChain object at 0x9979d6c\
>,
 <SmootLight.behaviors.MoveBehavior.MoveBehavior object at 0x998222c>,
 <SmootLight.behaviors.TouchOSC.TouchOSC object at 0x998284c>,
 <SmootLight.behaviors.RestrictLocation.RestrictLocation object at 0x9\
982d8c>,
 <SmootLight.behaviors.ColorChangerBehavior.ColorChangerBehavior objec\
...