| Trees | Index | Help |
|
|---|
| Package svs_simulation :: Package terrain :: Module base_classes :: Class Terrain |
|
GenericTerrainObject --+
|
Terrain
TerrainProxyProvides overall management of terrain partitions.
Every terrain should contain at least one partition.| Method Summary | |
|---|---|
__init__(self)
| |
Adds linkpath to terrain, if the path has not been mapped to specific structures it attempts to do this. | |
Adds a new partition to the terrain. | |
Adds a path to the terrain. | |
Adds sim object to partition with specified name. | |
Adds structure to partition with specified name. | |
Adds and returns new node to high-level navigation graph. | |
Create a new partition to the terrain with the speficied name. | |
Creates structure to partition with specified name and eother wall or floorplane components. | |
Creates structure in specified partition with specified name and either wall or floorplane components. | |
Creates terrain from encoded data. | |
Creates partitions from encoded data. | |
Creates paths from encoded data. | |
| dict |
Returns encoded model of self. |
Returns simplified encoding of self, suitable for use by proxies. | |
| dict |
Returns encoded model of partitions. |
| dict |
Returns encoded model of paths. |
Returns a list of all resolved linkpaths for terrain. | |
Returns a list of all paths for terrain. | |
Returns maximum x coordinate from bounds. | |
Returns maximum y coordinate from bounds. | |
Returns minimum x coordinate from bounds. | |
Returns minimum y coordinate from bounds. | |
Returns partition mathcing specified name. | |
Returns partition containing specified coordinates. | |
Retrieves path from path store. | |
Returns the structure within which the specified coordinates are located. | |
Creates edges between list of navigation nodes. | |
Ensures that all necessary data is setup for terrain, makes sure linkpaths are resilved, etc. | |
Removes node from high-level navigation graph. | |
Checks the bounds of the terrain match its contents. | |
Returns maximum x coordinate from bounds. | |
Returns maximum y coordinate from bounds. | |
Sets minimum x coordinate from bounds. | |
Returns minimum y coordinate from bounds. | |
setup(self,
name,
bounds,
spaceX,
spaceY,
margin)
| |
| Inherited from GenericTerrainObject | |
Adds entity to terrain object. | |
Adds new graph to object. | |
Tests if specified coordinates are present in area. | |
Returns named graph. | |
Adds entity to terrain object. | |
Updates self in response to simulation time. | |
| Method Details |
|---|
addLinkPath(self, linkPath)Adds linkpath to terrain, if the path has not been mapped to specific structures it attempts to do this. |
addPartition(self, partition)Adds a new partition to the terrain. |
addPath(self, path)Adds a path to the terrain. |
addSimObjectToStructure(self, simObject, structureName)Adds sim object to partition with specified name. If the partition does not exist it is created. If no partition is specified, it is ignored. |
addStructure(self, structure, partitionName)Adds structure to partition with specified name. If the partition does not exist it is created. If no partition is specified, it is ignored. |
addTerrainNavigationNode(self, x, y)Adds and returns new node to high-level navigation graph. This also sets the partition and structure that the node is within. |
createPartitionFromName(self, partitionName, bounds=None)Create a new partition to the terrain with the speficied name. If a partition with the same name already exists, this is returned in its place. |
createSimObjectFromName(self, objectName, objectClass, structureName, vertices)Creates structure to partition with specified name and eother wall or floorplane components. If the partition does not exist it is created. If no partition is specified, it is ignored. |
createStructureFromName(self, structureName, partitionName)Creates structure in specified partition with specified name and either wall or floorplane components. If the partition does not exist it is created. If no partition is specified, it is ignored. |
decode(self, data)Creates terrain from encoded data. @type data:dict |
decodePartitions(self, data)Creates partitions from encoded data. @type data:dict |
decodePaths(self, data)Creates paths from encoded data. @type data:dict |
encode(self, partitions=True, structures=True, objects=True, agents=False)Returns encoded model of self.
|
encodeForProxy(self)Returns simplified encoding of self, suitable for use by proxies. This includes the basic terrain data and the names, but none of the data of its partitions. |
encodePartitions(self, structures=True, objects=True, agents=False)Returns encoded model of partitions.
|
encodePaths(self)Returns encoded model of paths.
|
getAllLinkPaths(self)Returns a list of all resolved linkpaths for terrain. |
getAllPaths(self)Returns a list of all paths for terrain. |
getBoundsMaxX(self)Returns maximum x coordinate from bounds. |
getBoundsMaxY(self)Returns maximum y coordinate from bounds. |
getBoundsMinX(self)Returns minimum x coordinate from bounds. |
getBoundsMinY(self)Returns minimum y coordinate from bounds. |
getPartition(self, partitionName)Returns partition mathcing specified name. ReturnsNone if not found.
|
getPartitionAtPoint(self, x, y)Returns partition containing specified coordinates. ReturnsNone if not found.
|
getPath(self, name=None, start=None, destination=None)Retrieves path from path store. |
getStructureContainingPoint(self, x, y)Returns the structure within which the specified coordinates are located. |
linkTerrainNavigationNodes(self, nodeList)Creates edges between list of navigation nodes. |
prepareToRun(self)Ensures that all necessary data is setup for terrain, makes sure linkpaths are resilved, etc. |
removeTerrainNavigationNode(self, node)Removes node from high-level navigation graph. |
resolveBounds(self)Checks the bounds of the terrain match its contents. |
setBoundsMaxX(self, newvalue)Returns maximum x coordinate from bounds. |
setBoundsMaxY(self, newvalue)Returns maximum y coordinate from bounds. |
setBoundsMinX(self, newvalue)Sets minimum x coordinate from bounds. |
setBoundsMinY(self, newvalue)Returns minimum y coordinate from bounds. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 | http://epydoc.sf.net |