diff options
Diffstat (limited to 'stockton-levels/src/traits/tree.rs')
-rw-r--r-- | stockton-levels/src/traits/tree.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/stockton-levels/src/traits/tree.rs b/stockton-levels/src/traits/tree.rs index 253ae1b..5ca0d59 100644 --- a/stockton-levels/src/traits/tree.rs +++ b/stockton-levels/src/traits/tree.rs @@ -24,29 +24,29 @@ use na::Vector3; /// A node in a BSP tree. /// Either has two children *or* a leaf entry. #[derive(Debug, Clone)] -pub struct BSPNode { +pub struct BspNode { pub plane_idx: u32, pub min: Vector3<i32>, pub max: Vector3<i32>, - pub value: BSPNodeValue, + pub value: BspNodeValue, } #[derive(Debug, Clone)] -pub enum BSPNodeValue { - Leaf(BSPLeaf), - Children(Box<BSPNode>, Box<BSPNode>), +pub enum BspNodeValue { + Leaf(BspLeaf), + Children(Box<BspNode>, Box<BspNode>), } /// A leaf in a BSP tree. /// Will be under a `BSPNode`, min and max values are stored there. #[derive(Debug, Clone)] -pub struct BSPLeaf { +pub struct BspLeaf { pub cluster_id: u32, pub area: i32, pub faces_idx: Box<[u32]>, pub brushes_idx: Box<[u32]>, } -pub trait HasBSPTree<S: CoordSystem>: HasFaces<S> + HasBrushes<S> + HasVisData { - fn get_bsp_root(&self) -> &BSPNode; +pub trait HasBspTree<S: CoordSystem>: HasFaces<S> + HasBrushes<S> + HasVisData { + fn get_bsp_root(&self) -> &BspNode; } |