Skip to content

Instantly share code, notes, and snippets.

@enbugger
enbugger / OAHashMap.cs
Last active August 3, 2025 19:14
Array-based octree #octree #unity #burst
#define LOG_COUNTER
#define LOG_OPS
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
@enbugger
enbugger / RayCasting.cs
Last active August 3, 2025 18:49
#voxel #raycasting #unity #burst
using static Unity.Mathematics.math;
using Unity.Mathematics;
namespace Game
{
public interface IVoxelStore<T> where T : struct
{
// Should return null if the guess value is not in boundaries of any voxel
// Otherwise return arbitrary voxel data
T? GetVoxel(float3 guess);