From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- html/SmootLight.behaviors.Square-pysrc.html | 138 ++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 html/SmootLight.behaviors.Square-pysrc.html (limited to 'html/SmootLight.behaviors.Square-pysrc.html') diff --git a/html/SmootLight.behaviors.Square-pysrc.html b/html/SmootLight.behaviors.Square-pysrc.html new file mode 100644 index 0000000..56d0841 --- /dev/null +++ b/html/SmootLight.behaviors.Square-pysrc.html @@ -0,0 +1,138 @@ + + + + + SmootLight.behaviors.Square + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package behaviors :: + Module Square + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.behaviors.Square

+
+ 1  from operationscore.Behavior import * 
+
2 -class Square(Behavior): +
3 """Square is a simple behavior that makes a square with side lengths Width*2 around locations in + 4 the sensor input. Specify: + 5 <Width> -- the sidelength/2 + 6 """ + 7 +
8 - def processResponse(self, sensorInputs, recursiveInputs): +
9 for sensory in sensorInputs:#TODO: consider replicating the dict +10 sensory['CenterLoc'] = list(sensory['Location']) +11 xLoc = sensory['Location'][0] +12 yLoc = sensory['Location'][1] +13 width = self['Width'] +14 #sensory['Location'] = 'True' +15 sensory['Location'] =\ +16 '{x}<'+str(xLoc+width)+',{x}>'+str(xLoc-width)+\ +17 ',{y}<'+str(yLoc+width)+',{y}>'+str(yLoc-width) +18 return (sensorInputs, recursiveInputs) +
19 +
20 - def setLastOutput(self, output): +
21 coutput = Behavior.deepCopyPacket(output) +22 for data in coutput: +23 data['Location'] = data['CenterLoc'] +24 return coutput +
25 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3