Package SmootLight :: Package behaviors :: Module Square :: Class Square
[hide private]
[frames] | no frames]

Class Square

source code

                                    object --+        
                                             |        
operationscore.SmootCoreObject.SmootCoreObject --+    
                                                 |    
                  operationscore.Behavior.Behavior --+
                                                     |
                                                    Square

Square is a simple behavior that makes a square with side lengths Width*2 around locations in the sensor input. Specify: <Width> -- the sidelength/2

Instance Methods [hide private]
 
processResponse(self, sensorInputs, recursiveInputs) source code
 
setLastOutput(self, output)
Override to modify state.
source code

Inherited from operationscore.Behavior.Behavior: addInput, addInputs, addMapper, addMapperToResponse, behaviorInit, getLastOutput, immediateProcessInput, init, timeStep

Inherited from operationscore.SmootCoreObject.SmootCoreObject: __contains__, __getitem__, __getiter__, __init__, __setitem__, acquireLock, addDieListener, className, die, releaseLock, removeDieListener, validateArgDict, validateArgs

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from operationscore.Behavior.Behavior: deepCopyPacket

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

processResponse(self, sensorInputs, recursiveInputs)

source code 
Overrides: operationscore.Behavior.Behavior.processResponse

setLastOutput(self, output)

source code 

Override to modify state. For example: if you are using a behavior that does uses strings for location specification, you will want to override this to point to a single location. Make sure you keep lastState as a [] of {}. (List of dicts). Additonally, ensure that you call Behavior.deepCopyPacket on the packet before hand to avoid inadvertent down-stream modifications. Look at Square.py for an example of this.

Overrides: operationscore.Behavior.Behavior.setLastOutput
(inherited documentation)