1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use std::mem; use std::ops::Index; use std::os::raw::c_uint; use ffi::AiFace; define_type_and_iterator! { /// Face type (not yet implemented) struct Face(&AiFace) /// Face iterator type. struct FaceIter } impl<'a> Index<isize> for Face<'a> { type Output = c_uint; fn index(&self, index: isize) -> &c_uint { unsafe { assert!(index < self.num_indices as isize); mem::transmute(self.indices.offset(index)) } } }