Class Index | File Index

Classes


Class CAAT.Module.CircleManager.PackedCircleManager


Defined in: PackedCircleManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
 
 
 
Method Summary
Method Attributes Method Name and Description
<private>  
 
addCircle(aCircle)
Adds a circle to the simulation
 
circlesCanCollide(circleA, circleB)
 
Forces all circles to move to where their delegate position is Assumes all targets have a 'position' property!
 
getCircleAt(xpos, ypos, buffer)
Given an x,y position finds circle underneath and sets it to the currently grabbed circle
 
handleBoundaryForCircle(aCircle, boundsRule)
 
Packs the circles towards the center of the bounds.
 
initialize(overrides)
 
 
removeCircle(aCircle)
Removes a circle from the simulations
 
Memory Management
 
setBounds(x, y, w, h)
Accessors
 
 
 
sortOnDistanceToTarget(circleA, circleB)
Helpers
Class Detail
CAAT.Module.CircleManager.PackedCircleManager()
Field Detail
allCircles

bounds

numberOfCollisionPasses

numberOfTargetingPasses
Method Detail
<private> __init()

addCircle(aCircle)
Adds a circle to the simulation
Parameters:
aCircle

circlesCanCollide(circleA, circleB)
Parameters:
circleA
circleB

forceCirclesToMatchDelegatePositions()
Forces all circles to move to where their delegate position is Assumes all targets have a 'position' property!

getCircleAt(xpos, ypos, buffer)
Given an x,y position finds circle underneath and sets it to the currently grabbed circle
Parameters:
{Number} xpos
An x position
{Number} ypos
A y position
{Number} buffer
A radiusSquared around the point in question where something is considered to match

handleBoundaryForCircle(aCircle, boundsRule)
Parameters:
aCircle
boundsRule

handleCollisions()
Packs the circles towards the center of the bounds. Each circle will have it's own 'targetPosition' later on

initialize(overrides)
Parameters:
overrides

pushAllCirclesTowardTarget(aTarget)
Parameters:
aTarget

removeCircle(aCircle)
Removes a circle from the simulations
Parameters:
aCircle
Circle to remove

removeExpiredElements()
Memory Management

setBounds(x, y, w, h)
Accessors
Parameters:
x
y
w
h

setNumberOfCollisionPasses(value)
Parameters:
value

setNumberOfTargetingPasses(value)
Parameters:
value

sortOnDistanceToTarget(circleA, circleB)
Helpers
Parameters:
circleA
circleB

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:19 GMT-0700 (PDT)