use std::marker::PhantomData;
use cgmath::{Point2, Point3};
use cgmath::{Vector2, Vector3};
#[derive(Copy, Clone, PartialEq, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Obb<S, V, P> {
pub center: P,
pub axis: V,
pub extents: V,
marker: PhantomData<S>,
}
impl<S, V, P> Obb<S, V, P> {
pub fn new(center: P, axis: V, extents: V) -> Self {
Self {
center,
axis,
extents,
marker: PhantomData,
}
}
}
pub type Obb2<S> = Obb<S, Vector2<S>, Point2<S>>;
pub type Obb3<S> = Obb<S, Vector3<S>, Point3<S>>;