# Class: Circle

## Phaser.Physics.Ninja. Circle

Arcade Physics Constructor

#### new Circle(body, x, y, radius)

  Ninja Physics Circle constructor. Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `body` | Phaser.Physics.Ninja.Body | The body that owns this shape.
  `x` | number | The x coordinate to create this shape at.
  `y` | number | The y coordinate to create this shape at.
  `radius` | number | The radius of this Circle.

  Source:
    - physics/ninja/Circle.js, line 20

### Members

#### body

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `system` | Phaser.Physics.Ninja.Body | A reference to the body that owns this shape.

  Source:
    - physics/ninja/Circle.js, line 25

#### circleTileProjections

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `circleTileProjections` | object | All of the collision response handlers.

  Source:
    - physics/ninja/Circle.js, line 91

#### <readonly> height

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `height` | number | The height.

  Source:
    - physics/ninja/Circle.js, line 69

#### oldpos

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `oldpos` | Phaser.Point | The position of this object in the previous update.

  Source:
    - physics/ninja/Circle.js, line 40

#### pos

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `pos` | Phaser.Point | The position of this object.

  Source:
    - physics/ninja/Circle.js, line 35

#### radius

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `radius` | number | The radius of this circle shape.

  Source:
    - physics/ninja/Circle.js, line 45

#### system

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `system` | Phaser.Physics.Ninja | A reference to the physics system.

  Source:
    - physics/ninja/Circle.js, line 30

#### velocity

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `velocity` | Phaser.Point | The velocity of this object.

  Source:
    - physics/ninja/Circle.js, line 86

#### <readonly> width

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `width` | number | The width.

  Source:
    - physics/ninja/Circle.js, line 63

#### <readonly> xw

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `xw` | number | Half the width.

  Source:
    - physics/ninja/Circle.js, line 51

#### <readonly> yw

  ##### Properties:

  Name | Type | Description
  --- | --- | ---
  `xw` | number | Half the height.

  Source:
    - physics/ninja/Circle.js, line 57

### Methods

#### collideCircleVsTile(t) → {boolean}

  Collides this Circle with a Tile.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 249

  ##### Returns:

  True if they collide, otherwise false.

  Type
    boolean

#### collideWorldBounds()

  Collides this Circle against the world bounds.

  Source:
    - physics/ninja/Circle.js, line 208

#### destroy()

  Destroys this Circle's reference to Body and System

  Source:
    - physics/ninja/Circle.js, line 2614

#### integrate()

  Updates this Circles position.

  Source:
    - physics/ninja/Circle.js, line 113

#### projCircle_22DegB(x, y, oH, oV, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 1721

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_22DegS(x, y, oH, oV, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 1429

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_45Deg(x, y, oH, oV, obj, t) → {number}

  Resolves 45 Degree tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 449

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_67DegB(x, y, oH, oV, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 2309

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_67DegS(x, y, oH, oV, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 2024

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_Concave(x, y, oH, oV, obj, t) → {number}

  Resolves Concave tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 719

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_Convex(x, y, oH, oV, obj, t) → {number}

  Resolves Convex tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 953

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_Full(x, y, oH, oV, obj, t) → {number}

  Resolves Full tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 337

  ##### Returns:

  The result of the collision.

  Type
    number

#### projCircle_Half(x, y, oH, oV, obj, t) → {number}

  Resolves Half tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 1195

  ##### Returns:

  The result of the collision.

  Type
    number

#### reportCollisionVsWorld(px, py, dx, dy, obj)

  Process a world collision and apply the resulting forces.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `px` | number | The tangent velocity
  `py` | number | The tangent velocity
  `dx` | number | Collision normal
  `dy` | number | Collision normal
  `obj` | number | Object this Circle collided with

  Source:
    - physics/ninja/Circle.js, line 133

#### resolveCircleTile(x, y, oH, oV, obj, t) → {number}

  Resolves tile collision.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | Penetration depth on the x axis.
  `y` | number | Penetration depth on the y axis.
  `oH` | number | Grid / voronoi region.
  `oV` | number | Grid / voronoi region.
  `obj` | Phaser.Physics.Ninja.Circle | The Circle involved in the collision.
  `t` | Phaser.Physics.Ninja.Tile | The Tile involved in the collision.

  Source:
    - physics/ninja/Circle.js, line 311

  ##### Returns:

  The result of the collision.

  Type
    number