Package populus :: Module HumanTerritory :: Class HumanTerritory
[frames] | no frames]

Class HumanTerritory


Human territory base class. A human territory is a structured organization of space made by humans and objects in order to suggest a certain usage of the environment.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
getCenter(self)
Get the center point of the human territory.
 
getRadius(self)
Get the maximum radius of the human territory.
 
reorganize(self, o=None, p=None, q=None, r=None, s=None, t=None)
Reorganize the territorial structure.
 
addMembers(self, newMembers)
Add a new group of members to the territory.
 
removeMember(self, member)
Remove a given member from the territory.
 
locateMember(self, member)
Locate a member of the territory returning the space in which it is located.
 
relocateMember(self, member)
Relocate a dynamic member that might have recently moved.
 
relocateAllMembers(self)
Relocate all the members of the territory.
 
annotateTerritory(self, color=(1,1,1,1))
Draw annotations for the human territory.
 
stashAnnotations(self)
Stash all the annotations.
 
unstashAnnotations(self)
Unstash all the annotations.
 
output(self)
Print a text description of the territory.

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

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

reorganize(self, o=None, p=None, q=None, r=None, s=None, t=None)

 

Reorganize the territorial structure. Call this method every time the size or the boundaries of an inner space has been changed, as well as when the whole territory moved somewhere else.

addMembers(self, newMembers)

 

Add a new group of members to the territory. Members of the new group which are already members of the territory will be skipped from adding. The territory is reorganized after adding.

locateMember(self, member)

 

Locate a member of the territory returning the space in which it is located. Return false if the given member is not into the territory.

relocateAllMembers(self)

 

Relocate all the members of the territory. Members outside the territory will be removed.