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