Package svs_simulation :: Package terrain :: Module structures :: Class Structure
[show private | hide private]
[frames | no frames]

Class Structure

          Entity --+    
                   |    
  BasicSpatialEntity --+
                       |
GenericTerrainObject --+
                       |
                      Structure


Self contained spatial structure within a terrain, such as a building, etc.
Method Summary
  __init__(self)
  __str__(self)
Returns string representation of structure.
  addWallplane(self, wallplane)
Adds wallplane and adjust bounds to contain it.
  containsPoint(self, x, y)
Tests if coordinates are contained within structure bounds.
  createInnerBoundary(self, margin)
Creates inner boundary on floorplane at margin distance from edges.
  decode(self, data, margin)
Decodes data and applies it to self.
  decodeWallplanes(self, data)
Decodes representation of wallplanes.
dict encode(self)
Returns encoded representation of self.
  encodeWallplanes(self)
Returns and encoded representation of wallplanes.
  enterPartition(self, partition)
Called when structure is added to a partition.
  exitPartition(self, partition)
Called when structure is removed from a partition.
  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.
  getName(self)
Returns name for structure.
  getWorldbounds(self)
Returns the bounds of the structure as mapped to the world coordinates.
  setFloorplane(self, floorplane)
Sets floorplane and adjust bounds to contain it.
  setup(self, _uid, name, filepath)
    Inherited from GenericTerrainObject
  addEntity(self, entity)
Adds entity to terrain object.
  addGraph(self, graphName, graph)
Adds new graph to object.
  getGraph(self, graphName)
Returns named graph.
  removeEntity(self, entity)
Adds entity to terrain object.
  update(self, simTime)
Updates self in response to simulation time.
    Inherited from Entity
  enterStructure(self, structure)
Called when entity enters a structure.
  enterWorld(self, world)
Called when entity is added to world.
  exitWorld(self, simTime)
Called when structure is removed world.
  handleSimEvent(self, event)
Handles event form simulation.
boolean isTagged(self)
Returns tag state.
  placeInWorld(self)
Sets the structure and partition that the entity is within.
  reportChange(self, data)
Forwards data representing change in entity to process handler.
  startWorld(self, simTime)
Called when the simulation world starts running, or if an entity has been added to a world after it has started.
  stopWorld(self, simTime)
Called when the simulation world stops running, or if an entity has been removed from a world after it has started.
  updateWorld(self, simTime)
Called when the simulation world updates.

Method Details

__str__(self)
(Informal representation operator)

Returns string representation of structure.

addWallplane(self, wallplane)

Adds wallplane and adjust bounds to contain it.

containsPoint(self, x, y)

Tests if coordinates are contained within structure bounds.

If a floorplane is defines for the structure uses that, otherwise uses world bounds.
Overrides:
svs_simulation.terrain.util_classes.GenericTerrainObject.containsPoint

createInnerBoundary(self, margin=None)

Creates inner boundary on floorplane at margin distance from edges.

decode(self, data, margin=None)

Decodes data and applies it to self.
Overrides:
svs_simulation.entities.base_entities.BasicSpatialEntity.decode

decodeWallplanes(self, data)

Decodes representation of wallplanes.

encode(self)

Returns encoded representation of self.
Returns:
dict
Overrides:
svs_simulation.entities.base_entities.BasicSpatialEntity.encode

encodeWallplanes(self)

Returns and encoded representation of wallplanes.

enterPartition(self, partition)

Called when structure is added to a partition.
Overrides:
svs_simulation.entities.base_entities.Entity.enterPartition

exitPartition(self, partition)

Called when structure is removed from a partition.
Overrides:
svs_simulation.entities.base_entities.Entity.exitPartition

getBoundsMaxX(self)

Returns maximum x coordinate from bounds.
Overrides:
svs_simulation.terrain.util_classes.GenericTerrainObject.getBoundsMaxX

getBoundsMaxY(self)

Returns maximum y coordinate from bounds.
Overrides:
svs_simulation.terrain.util_classes.GenericTerrainObject.getBoundsMaxY

getBoundsMinX(self)

Returns minimum x coordinate from bounds.
Overrides:
svs_simulation.terrain.util_classes.GenericTerrainObject.getBoundsMinX

getBoundsMinY(self)

Returns minimum y coordinate from bounds.
Overrides:
svs_simulation.terrain.util_classes.GenericTerrainObject.getBoundsMinY

getName(self)

Returns name for structure. If the structure has no name retuens its _uid.
Overrides:
svs_simulation.entities.base_entities.Entity.getName

getWorldbounds(self)

Returns the bounds of the structure as mapped to the world coordinates.

setFloorplane(self, floorplane)

Sets floorplane and adjust bounds to contain it.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:27 2005 http://epydoc.sf.net