feat(scenegraph): add hash codec for bits/tensor/bytes/cam_row conversion

Introduce hash_codec module providing bidirectional encoding/decoding:
- bits_tensor_to_hash_bytes / hash_bytes_to_bits_array
- bits_tensor_to_cam_row
- hash_bytes_to_cam_row / cam_row_to_hash_bytes
This commit is contained in:
2026-05-17 19:41:03 +08:00
parent 4ea567adba
commit ddb8cff6a9
3 changed files with 261 additions and 1 deletions

View File

@@ -5,8 +5,24 @@ This module exports the main scenegraph objects for easy import:
from mini_nav.scenegraph import SimpleSceneGraph, RoomNode, ObjectNode
"""
from .hash_codec import (
bits_tensor_to_cam_row,
bits_tensor_to_hash_bytes,
cam_row_to_hash_bytes,
hash_bytes_to_bits_array,
hash_bytes_to_cam_row,
)
from .objectnode import ObjectNode
from .roomnode import RoomNode
from .scenegraph import SimpleSceneGraph
__all__ = ["ObjectNode", "RoomNode", "SimpleSceneGraph"]
__all__ = [
"ObjectNode",
"RoomNode",
"SimpleSceneGraph",
"bits_tensor_to_cam_row",
"bits_tensor_to_hash_bytes",
"cam_row_to_hash_bytes",
"hash_bytes_to_bits_array",
"hash_bytes_to_cam_row",
]