Package svs_simulation :: Package numdata :: Module geomlib :: Class SphereBounds2D
[show private | hide private]
[frames | no frames]

Class SphereBounds2D


Represents a spherical bounding box in 2D space.
Method Summary
  __init__(self, world)
  addPoint(self, x, y)
Adds points into the radius of the sphere.
boolean collidesWith(self, sphere)
Checks if this sphere collides with the specified sphere.
boolean containedWithin(self, minX, minY, maxX, maxY)
Checks if this sphere is fully contained within the specified bounding area.
boolean containsPoint(self, x, y)
Checks if point lies wihtin sphere.
boolean containsPointInWorld(self, x, y)
Checks if point lies within bounds as mapped to world.
  decode(self, data)
Applies encoded data to self.
  encode(self)
Returns encoded representation of self.
integer liesWithin(self, minX, minY, maxX, maxY)
Checks if this sphere lies in the specified bounding area.
boolean locatedWithin(self, minX, minY, maxX, maxY)
Checks if the location of the sphere lies in the specified bounding area.
  reset(self)
Sets bounds to zero sizes.
  setDimensions(self, width, height)
Creates a bounding sphere for an object of the specified width and height.
  setLocation(self, x, y)
Sets location of spehere in world.
  translate(self, x, y)
Translates location of spehere in world.

Method Details

addPoint(self, x, y)

Adds points into the radius of the sphere.

collidesWith(self, sphere)

Checks if this sphere collides with the specified sphere.

Returns True or False.
Returns:
boolean

containedWithin(self, minX, minY, maxX, maxY)

Checks if this sphere is fully contained within the specified bounding area.

Returns True or False.
Returns:
boolean

containsPoint(self, x, y)

Checks if point lies wihtin sphere.

Returns True or False.
Returns:
boolean

containsPointInWorld(self, x, y)

Checks if point lies within bounds as mapped to world.

Returns True or False.
Returns:
boolean

decode(self, data)

Applies encoded data to self.

encode(self)

Returns encoded representation of self.

@rtype:dict

liesWithin(self, minX, minY, maxX, maxY)

Checks if this sphere lies in the specified bounding area.

Returns either geom_const.NO_INTERSECT or a value for the side it intersects with.
Returns:
integer

locatedWithin(self, minX, minY, maxX, maxY)

Checks if the location of the sphere lies in the specified bounding area.

Returns True or False.
Returns:
boolean

reset(self)

Sets bounds to zero sizes.

setDimensions(self, width, height)

Creates a bounding sphere for an object of the specified width and height.

setLocation(self, x, y)

Sets location of spehere in world.

translate(self, x, y)

Translates location of spehere in world.

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