Class: RigidCircle

RigidCircle(xf, radius) → {RigidCircle}

new RigidCircle(xf, radius) → {RigidCircle}

Default Constructor for Rigid Circle
Parameters:
Name Type Description
xf Transform The transform to map the Rigid Circle to
radius float The radius for the Rigid Circle
Source:
Returns:
Type
RigidCircle

Methods

collideCircCirc(c1, c2, collisionInfo) → {Boolean}

Handles collision between 2 Rigid Circles
Parameters:
Name Type Description
c1 RigidCircle The 1st Rigid Circle
c2 RigidCircle The 2nd Rigid Circle
collisionInfo CollisionInfo Where the collision info is stored
Source:
Returns:
Whether there was a collision or not
Type
Boolean

collisionTest(otherShape, collisionInfo) → {Boolean}

This function decides which collision function to use based on the type of the shape
Parameters:
Name Type Description
otherShape RigidShape The shape being checked
collisionInfo CollisionInfo Where the collision info is to be stored
Source:
Returns:
If there is a collision
Type
Boolean

draw(aCamera)

Draws the Rigid Circle
Parameters:
Name Type Description
aCamera Camera The camera to draw it on
Source:

getRadius() → {float}

Get the radius of the Rigid Circle
Source:
Returns:
Type
float

incShapeSizeBy(dt)

Increase the radius by the passed amount
Parameters:
Name Type Description
dt float The amount to increase the radius by
Source:

setTransform(xf)

Sets the Rigid Circle to a new transform
Parameters:
Name Type Description
xf Transform Which transform to set the RigidCircle to
Source:

update()

Updates the RigidCircle
Source:

updateInertia()

Update the inertia
Source: