| Package | PBLabs.Rendering2D |
| Interface | public interface ISpatialManager2D |
| Implementors | BasicSpatialManager2D, Box2DManagerComponent |
| Method | Defined by | ||
|---|---|---|---|
|
AddSpatialObject(object:ISpatialObject2D):void
Add a generic spatial object to this manager.
| ISpatialManager2D | ||
|
Cast a ray and (optionally) return information about what it hits in result.
| ISpatialManager2D | ||
|
QueryCircle(center:Point, radius:Number, mask:ObjectType, results:Array):Boolean
Return all the spatial objects that overlap the specified circle.
| ISpatialManager2D | ||
|
QueryRectangle(box:Rectangle, mask:ObjectType, results:Array):Boolean
Return all the spatial objects that overlap with the specified box and match
one or more of the types in the mask.
| ISpatialManager2D | ||
|
RemoveSpatialObject(object:ISpatialObject2D):void
Remove a previously registered object from this manager.
| ISpatialManager2D | ||
| AddSpatialObject | () | method |
public function AddSpatialObject(object:ISpatialObject2D):voidAdd a generic spatial object to this manager. A manager with advanced functionality will support both general ISpatialObject2D implementations as well as enabling special functionality for its peered classes.
Parametersobject:ISpatialObject2D |
| CastRay | () | method |
public function CastRay(start:Point, end:Point, flags:ObjectType, result:RayHitInfo):BooleanCast a ray and (optionally) return information about what it hits in result.
Parametersstart:Point |
|
end:Point |
|
flags:ObjectType |
|
result:RayHitInfo |
Boolean |
| QueryCircle | () | method |
public function QueryCircle(center:Point, radius:Number, mask:ObjectType, results:Array):BooleanReturn all the spatial objects that overlap the specified circle.
Parameterscenter:Point |
|
radius:Number |
|
mask:ObjectType |
|
results:Array |
Boolean |
See also
| QueryRectangle | () | method |
public function QueryRectangle(box:Rectangle, mask:ObjectType, results:Array):BooleanReturn all the spatial objects that overlap with the specified box and match one or more of the types in the mask.
Parametersbox:Rectangle |
|
mask:ObjectType |
|
results:Array |
Boolean — True if one or more objects were found and push()'ed to results.
|
| RemoveSpatialObject | () | method |
public function RemoveSpatialObject(object:ISpatialObject2D):voidRemove a previously registered object from this manager.
Parametersobject:ISpatialObject2D |
See also