playcanvas-opti-pixel - v1.2.0
Preparing search index...
BVH
Class BVH<N, L, B>
Type Parameters
N
L
B
extends
BoxType
Index
Constructors
constructor
Properties
builder
Accessors
root
Methods
clear
closest
Point
To
Point
create
From
Array
delete
frustum
Culling
frustum
Culling
LOD
insert
insert
Range
intersects
Box
intersects
Ray
intersects
Sphere
is
Node
Intersected
move
ray
Intersections
traverse
Constructors
constructor
new
BVH
<
N
,
L
,
B
extends
TypedArrayType
>
(
builder
:
IBVHBuilder
<
N
,
L
,
B
>
,
)
:
BVH
<
N
,
L
,
B
>
Type Parameters
N
L
B
extends
TypedArrayType
Parameters
builder
:
IBVHBuilder
<
N
,
L
,
B
>
Returns
BVH
<
N
,
L
,
B
>
Properties
builder
builder
:
IBVHBuilder
<
N
,
L
,
B
>
Accessors
root
get
root
()
:
BVHNode
<
N
,
L
,
B
>
Returns
BVHNode
<
N
,
L
,
B
>
Methods
clear
clear
()
:
void
Returns
void
closest
Point
To
Point
closestPointToPoint
(
point
:
FloatArray
,
onClosestDistance
?:
onClosestDistanceCallback
<
L
>
,
)
:
number
Parameters
point
:
FloatArray
Optional
onClosestDistance
:
onClosestDistanceCallback
<
L
>
Returns
number
create
From
Array
createFromArray
(
objects
:
ArrayLike
<
L
>
,
boxes
:
FloatArray
[]
,
onLeafCreation
?:
onLeafCreationCallback
<
N
,
L
,
B
>
,
margin
?:
number
,
)
:
void
Parameters
objects
:
ArrayLike
<
L
>
boxes
:
FloatArray
[]
Optional
onLeafCreation
:
onLeafCreationCallback
<
N
,
L
,
B
>
Optional
margin
:
number
Returns
void
delete
delete
(
node
:
BVHNode
<
N
,
L
,
B
>
)
:
BVHNode
<
N
,
L
,
B
>
Parameters
node
:
BVHNode
<
N
,
L
,
B
>
Returns
BVHNode
<
N
,
L
,
B
>
frustum
Culling
frustumCulling
(
frustum
:
Frustum
,
onIntersection
:
onFrustumIntersectionCallback
<
N
,
L
,
B
>
,
)
:
void
Parameters
frustum
:
Frustum
onIntersection
:
onFrustumIntersectionCallback
<
N
,
L
,
B
>
Returns
void
frustum
Culling
LOD
frustumCullingLOD
(
frustum
:
Frustum
,
cameraPosition
:
FloatArray
,
levels
:
LODLevel
[]
,
onIntersection
:
onFrustumIntersectionLODCallback
<
N
,
L
,
B
>
,
)
:
void
Parameters
frustum
:
Frustum
cameraPosition
:
FloatArray
levels
:
LODLevel
[]
onIntersection
:
onFrustumIntersectionLODCallback
<
N
,
L
,
B
>
Returns
void
insert
insert
(
object
:
L
,
box
:
FloatArray
,
margin
:
number
)
:
BVHNode
<
N
,
L
,
B
>
Parameters
object
:
L
box
:
FloatArray
margin
:
number
Returns
BVHNode
<
N
,
L
,
B
>
insert
Range
insertRange
(
objects
:
L
[]
,
boxes
:
FloatArray
[]
,
margins
?:
number
|
number
[]
|
FloatArray
,
onLeafCreation
?:
onLeafCreationCallback
<
N
,
L
,
B
>
,
)
:
void
Parameters
objects
:
L
[]
boxes
:
FloatArray
[]
Optional
margins
:
number
|
number
[]
|
FloatArray
Optional
onLeafCreation
:
onLeafCreationCallback
<
N
,
L
,
B
>
Returns
void
intersects
Box
intersectsBox
(
box
:
FloatArray
,
onIntersection
:
onIntersectionCallback
<
L
>
,
)
:
boolean
Parameters
box
:
FloatArray
onIntersection
:
onIntersectionCallback
<
L
>
Returns
boolean
intersects
Ray
intersectsRay
(
dir
:
FloatArray
,
origin
:
FloatArray
,
onIntersection
:
onIntersectionCallback
<
L
>
,
near
?:
number
,
far
?:
number
,
)
:
boolean
Parameters
dir
:
FloatArray
origin
:
FloatArray
onIntersection
:
onIntersectionCallback
<
L
>
near
:
number
= 0
far
:
number
= Infinity
Returns
boolean
intersects
Sphere
intersectsSphere
(
center
:
FloatArray
,
radius
:
number
,
onIntersection
:
onIntersectionCallback
<
L
>
,
)
:
boolean
Parameters
center
:
FloatArray
radius
:
number
onIntersection
:
onIntersectionCallback
<
L
>
Returns
boolean
is
Node
Intersected
isNodeIntersected
(
node
:
BVHNode
<
N
,
L
,
B
>
,
onIntersection
:
onIntersectionCallback
<
L
>
,
)
:
boolean
Parameters
node
:
BVHNode
<
N
,
L
,
B
>
onIntersection
:
onIntersectionCallback
<
L
>
Returns
boolean
move
move
(
node
:
BVHNode
<
N
,
L
,
B
>
,
margin
:
number
)
:
void
Parameters
node
:
BVHNode
<
N
,
L
,
B
>
margin
:
number
Returns
void
ray
Intersections
rayIntersections
(
ray
:
Ray
,
onIntersection
:
onIntersectionRayCallback
<
L
>
,
near
?:
number
,
far
?:
number
,
)
:
void
Parameters
ray
:
Ray
onIntersection
:
onIntersectionRayCallback
<
L
>
near
:
number
= 0
far
:
number
= Infinity
Returns
void
traverse
traverse
(
callback
:
onTraverseCallback
<
N
,
L
,
B
>
)
:
void
Parameters
callback
:
onTraverseCallback
<
N
,
L
,
B
>
Returns
void
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
builder
Accessors
root
Methods
clear
closest
Point
To
Point
create
From
Array
delete
frustum
Culling
frustum
Culling
LOD
insert
insert
Range
intersects
Box
intersects
Ray
intersects
Sphere
is
Node
Intersected
move
ray
Intersections
traverse
playcanvas-opti-pixel - v1.2.0
Loading...