BoundingSphere

Class used to store bounding sphere information

Hierarchy

• BoundingSphere

Constructors

constructor

Find examples in Playground
• Creates a new bounding sphere

Parameters

• min: Vector3

defines the minimum vector (in local space)

• max: Vector3

defines the maximum vector (in local space)

Properties

center

Find examples in Playground
center: Vector3

Gets the center of the bounding sphere in local space

centerWorld

Find examples in Playground
centerWorld: Vector3

Gets the center of the bounding sphere in world space

maximum

Find examples in Playground
maximum: Vector3

Gets the maximum vector in local space

minimum

Find examples in Playground
minimum: Vector3

Gets the minimum vector in local space

Find examples in Playground

Radius of the bounding sphere in local space

Find examples in Playground

Radius of the bounding sphere in world space

Methods

intersectsPoint

Find examples in Playground
• intersectsPoint(point: Vector3): boolean
• Tests if a point is inside the bounding sphere

Parameters

• point: Vector3

defines the point to test

Returns boolean

true if the point is inside the bounding sphere

isInFrustum

Find examples in Playground
• isInFrustum(frustumPlanes: Plane[]): boolean
• Tests if the bounding sphere is intersecting the frustum planes

Parameters

• frustumPlanes: Plane[]

defines the frustum planes to test

Returns boolean

true if there is an intersection

reConstruct

Find examples in Playground
• Recreates the entire bounding sphere from scratch

Parameters

• min: Vector3

defines the new minimum vector (in local space)

• max: Vector3

defines the new maximum vector (in local space)

scale

Find examples in Playground
• Scale the current bounding sphere by applying a scale factor

Parameters

• factor: number

defines the scale factor to apply

Returns BoundingSphere

the current bounding box

Static Intersects

Find examples in Playground
• Checks if two sphere intersct

sphere 0

sphere 1

Returns boolean

true if the speres intersect

Generated using TypeDoc