Skip to content

Commit 32dce12

Browse files
committed
corrected some variable names
1 parent 6366482 commit 32dce12

File tree

5 files changed

+74
-176
lines changed

5 files changed

+74
-176
lines changed

Packages/NativeTrees/Runtime/Octree/NativeOctree.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ void InsertNext(uint nodeid, in QuarterSizeBounds quarterSizeBounds, in ObjWrapp
161161
if ((objMask & octantMask) != octantMask)
162162
continue;
163163

164-
uint ocantId = GetOctantId(nodeid, i);
164+
uint octantId = GetOctantId(nodeid, i);
165165
var octantCenterQuarterSize = QuarterSizeBounds.GetOctant(quarterSizeBounds, i);
166166

167-
if (!TryInsert(ocantId, octantCenterQuarterSize, objWrapper, parentDepth))
168-
InsertNext(ocantId, octantCenterQuarterSize, objWrapper, parentDepth);
167+
if (!TryInsert(octantId, octantCenterQuarterSize, objWrapper, parentDepth))
168+
InsertNext(octantId, octantCenterQuarterSize, objWrapper, parentDepth);
169169
}
170170
}
171171

Packages/NativeTrees/Runtime/Quadtree/NativeQuadtree.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ void InsertNext(uint nodeid, in QuarterSizeBounds quarterSizeBounds, in ObjWrapp
161161
if ((objMask & quadMask) != quadMask)
162162
continue;
163163

164-
uint ocantId = GetQuadId(nodeid, i);
164+
uint quadId = GetQuadId(nodeid, i);
165165
var quadCenterQuarterSize = QuarterSizeBounds.GetQuad(quarterSizeBounds, i);
166166

167-
if (!TryInsert(ocantId, quadCenterQuarterSize, objWrapper, parentDepth))
168-
InsertNext(ocantId, quadCenterQuarterSize, objWrapper, parentDepth);
167+
if (!TryInsert(quadId, quadCenterQuarterSize, objWrapper, parentDepth))
168+
InsertNext(quadId, quadCenterQuarterSize, objWrapper, parentDepth);
169169
}
170170
}
171171

Packages/NativeTrees/Runtime/Quadtree/NativeQuadtreeRangeQuery.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ bool RangeNext<U>(in AABB2D range, uint nodeId, in QuarterSizeBounds quarterSize
3535

3636
for (int i = 0; i < 4; i++)
3737
{
38-
int octantMask = QuadMasks[i];
39-
if ((rangeMask & octantMask) == octantMask)
38+
int quadMask = QuadMasks[i];
39+
if ((rangeMask & quadMask) == quadMask)
4040
{
4141
uint octantId = GetQuadId(nodeId, i);
4242
if (nodes.TryGetValue(octantId, out int objectCount) &&

Packages/NativeTrees/Runtime/Quadtree/NativeQuadtreeRaycastQuery.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool RaycastNext<U>(
7171

7272
for (int i = 0; i < 3; i++)
7373
{
74-
uint octantId = GetQuadId(nodeId, quadIndex);
74+
uint quadId = GetQuadId(nodeId, quadIndex);
7575

7676
#if DEBUG_RAYCAST_GIZMO
7777
var debugExt = ExtentsBounds.GetOctant(extentsBounds, octantIndex);
@@ -81,10 +81,10 @@ bool RaycastNext<U>(
8181
UnityEngine.Gizmos.DrawCube((Vector2)debugExt.nodeCenter, (Vector2)debugExt.nodeExtents * 1.75f);
8282
#endif
8383

84-
if (nodes.TryGetValue(octantId, out int objectCount) &&
84+
if (nodes.TryGetValue(quadId, out int objectCount) &&
8585
Raycast(
8686
ray: new PrecomputedRay2D(ray, quadRayIntersection),
87-
nodeId: octantId,
87+
nodeId: quadId,
8888
extentsBounds: ExtentsBounds.GetQuad(extentsBounds, quadIndex),
8989
objectCount: objectCount,
9090
hit: out hit,

0 commit comments

Comments
 (0)