@@ -497,7 +497,7 @@ function findPoints<T>(point: Vector3, radius: number, skipSelf: boolean,
497497 * @param T - The type of the data.
498498 */
499499
500- export class PointOctree < T = unknown > extends Octree < PointData < T > > {
500+ export class PointOctree < T = unknown > extends Octree < PointOctant < T > > {
501501
502502 /**
503503 * An octant boundary bias.
@@ -585,7 +585,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
585585 * @return The amount of points.
586586 */
587587
588- countPoints ( octant : PointOctant < T > = this . root as PointOctant < T > ) : number {
588+ countPoints ( octant : PointOctant < T > = this . root ) : number {
589589
590590 return countPoints ( octant ) ;
591591
@@ -603,7 +603,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
603603
604604 set ( point : Vector3 , data : T ) : boolean {
605605
606- return set ( point , data , this , this . root as PointOctant < T > , 0 ) ;
606+ return set ( point , data , this , this . root , 0 ) ;
607607
608608 }
609609
@@ -616,7 +616,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
616616
617617 remove ( point : Vector3 ) : T | null {
618618
619- return remove ( point , this , this . root as PointOctant < T > , null ) ;
619+ return remove ( point , this , this . root , null ) ;
620620
621621 }
622622
@@ -629,7 +629,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
629629
630630 get ( point : Vector3 ) : T | null {
631631
632- return get ( point , this , this . root as PointOctant < T > ) ;
632+ return get ( point , this , this . root ) ;
633633
634634 }
635635
@@ -643,7 +643,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
643643
644644 move ( point : Vector3 , position : Vector3 ) : T | null {
645645
646- return move ( point , position , this , this . root as PointOctant < T > , null , 0 ) ;
646+ return move ( point , position , this , this . root , null , 0 ) ;
647647
648648 }
649649
@@ -658,8 +658,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
658658
659659 findNearestPoint ( point : Vector3 , maxDistance = Number . POSITIVE_INFINITY , skipSelf = false ) : PointContainer < T > | null {
660660
661- const root = this . root as PointOctant < T > ;
662- const result = findNearestPoint ( point , maxDistance , skipSelf , root ) ;
661+ const result = findNearestPoint ( point , maxDistance , skipSelf , this . root ) ;
663662
664663 if ( result !== null && result . point !== null ) {
665664
@@ -683,7 +682,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
683682 findPoints ( point : Vector3 , radius : number , skipSelf = false ) : PointContainer < T > [ ] {
684683
685684 const result : PointContainer < T > [ ] = [ ] ;
686- findPoints ( point , radius , skipSelf , this . root as PointOctant < T > , result ) ;
685+ findPoints ( point , radius , skipSelf , this . root , result ) ;
687686 return result ;
688687
689688 }
@@ -698,7 +697,7 @@ export class PointOctree<T = unknown> extends Octree<PointData<T>> {
698697 raycast ( raycaster : Raycaster ) : RayPointIntersection < T > [ ] {
699698
700699 const result : RayPointIntersection < T > [ ] = [ ] ;
701- const octants = super . getIntersectingNodes ( raycaster ) as PointOctant < T > [ ] ;
700+ const octants = super . getIntersectingNodes ( raycaster ) ;
702701
703702 if ( octants . length > 0 ) {
704703
0 commit comments