Skip to content

Commit 7025372

Browse files
committed
InsertPoint bug fixed
1 parent 32dce12 commit 7025372

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Packages/NativeTrees/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v0.1.2
2+
- Fixed bug for InsertPoint methods
3+
14
v0.1.1
25
- Removed redundant call to Clear in constructors
36

Packages/NativeTrees/Runtime/Octree/NativeOctree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void InsertPoint(T obj, float3 point)
134134

135135
// We can (mainly) do without recursion for this insertion method. Except for when an octant needs to subdivide.
136136
QuarterSizeBounds extents = new QuarterSizeBounds(boundsCenter, boundsQuarterSize);
137-
int depth = 0;
137+
int depth = 1;
138138
uint nodeId = 1;
139139
while (depth <= maxDepth)
140140
{

Packages/NativeTrees/Runtime/Quadtree/NativeQuadtree.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void InsertPoint(T obj, float2 point)
134134

135135
// We can (mainly) do without recursion for this insertion method. Except for when an quad needs to subdivide.
136136
QuarterSizeBounds extents = new QuarterSizeBounds(boundsCenter, boundsQuarterSize);
137-
int depth = 0;
137+
int depth = 1;
138138
uint nodeId = 1;
139139
while (depth <= maxDepth)
140140
{

Packages/NativeTrees/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.bartofzo.nativetrees",
33
"displayName": "NativeTrees",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"unity": "2021.3",
66
"description": "Generic, burst compatible sparse octree and quadtree \nthat store objects together with their axis aligned bounding boxes (AABB's)",
77
"keywords": [

0 commit comments

Comments
 (0)