use crate::ode::*;
pub mod obg;
pub struct GeomOffset<'a> {
pub gsub: dGeomID,
pub o: &'a dVector3
}
pub trait AsPtr<T> {
fn as_ptr_mut(&mut self) -> *mut T;
fn as_ptr(&self) -> *const T;
}
impl<T> AsPtr<T> for Vec<T> {
fn as_ptr_mut(&mut self) -> *mut T { &mut self[0] as *mut T }
fn as_ptr(&self) -> *const T { &self[0] as *const T }
}
#[derive(Clone)]
pub struct TCMaterial {
pub tex: i32,
pub col: dVector4
}
impl TCMaterial {
pub fn new(t: i32, c: dVector4) -> TCMaterial {
TCMaterial{tex: t, col: c}
}
}
pub struct Cam {
pub pos: Vec<f32>,
pub ypr: Vec<f32>
}
impl Cam {
pub fn new(p: Vec<f32>, y: Vec<f32>) -> Cam {
Cam{pos: p, ypr: y}
}
}