vbsp-common 0.1.0

Common types and helpers for valve bsp files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Vector;
use cgmath::Quaternion;

#[derive(Debug, Clone)]
pub struct PropPlacement<'a> {
    pub model: &'a str,
    pub rotation: Quaternion<f32>,
    pub scale: f32,
    pub origin: Vector,
    pub skin: i32,
}

/// Abstraction for various ways props are placed in a bsp
pub trait AsPropPlacement<'a> {
    fn as_prop_placement(&self) -> PropPlacement<'a>;
}