#

API Docs for: 0.6.1
Show: Inherited Protected Private Deprecated

# Sphere Class

Extends Shape
Defined in: `src/shapes/Sphere.js:6`

Spherical shape

## Constructor

### `Sphere`

(

- `radius`

)

Defined in `src/shapes/Sphere.js:6`

#### Parameters:

- `radius` Number

  The radius of the sphere, a non-negative number.

- Index
- Methods
- Properties

## Item Index

### Methods

- calculateLocalInertia
- updateBoundingSphereRadius
- volume

### Properties

- boundingSphereRadius
- collisionResponse
- id
- material
- radius
- type

## Methods

### `calculateLocalInertia`

() Vec3

Inherited from Shape: `src/shapes/Shape.js:68`

Calculates the inertia in the local frame for this shape.

#### Returns:

Vec3:

### `updateBoundingSphereRadius`

() Number

Inherited from Shape: `src/shapes/Shape.js:50`

Computes the bounding sphere radius. The result is stored in the property .boundingSphereRadius

#### Returns:

Number:

### `volume`

() Number

Inherited from Shape: `src/shapes/Shape.js:59`

Get the volume of this shape

#### Returns:

Number:

## Properties

### `boundingSphereRadius`

Number

Inherited from Shape: `src/shapes/Shape.js:31`

The local bounding sphere radius of this shape.

### `collisionResponse`

Boolean

Inherited from Shape: `src/shapes/Shape.js:37`

Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.

### `id`

Number

Inherited from Shape: `src/shapes/Shape.js:17`

Identifyer of the Shape.

### `material`

Material

Inherited from Shape: `src/shapes/Shape.js:43`

### `radius`

Number

Defined in `src/shapes/Sphere.js:17`

### `type`

Number

Inherited from Shape: `src/shapes/Shape.js:23`

The type of this shape. Must be set to an int > 0 by subclasses.