Files
Mini-Nav/mini-nav/scenegraph/roomnode.py

13 lines
350 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from dataclasses import dataclass
import numpy as np
@dataclass
class RoomNode:
room_id: str # 例如: "room_A"
# 范围:不用复杂的 Polygon用一个中心点+半径,或者简单的 3D BBox 足够了
center: np.ndarray # [x, y, z]
bbox_extent: np.ndarray # [dx, dy, dz] 用于快速判断一个点在不在房间里