#[repr(C)]pub struct FaceInfo {
pub res: Res,
pub adjedges: u8,
pub flags: u8,
pub adjfaces: [u32; 4],
}
Expand description
Information about a face, as stored in the Ptex file header.
Fields§
§res: Res
Resolution of face.
adjedges: u8
< Adjacent edges, 2 bits per edge.
flags: u8
Flags.
adjfaces: [u32; 4]
Adjacent faces (-1 == no adjacent face).
Implementations§
source§impl FaceInfo
impl FaceInfo
pub fn from_res_and_adjacency<T: Into<Res>>( res: T, adjacent_faces: &[i32; 4], adjacent_edges: &[i32; 4], is_subface: bool ) -> Self
sourcepub fn resolution(&self) -> Res
pub fn resolution(&self) -> Res
Return a Res resolution struct.
sourcepub fn set_resolution<T: Into<Res>>(&mut self, res: T)
pub fn set_resolution<T: Into<Res>>(&mut self, res: T)
Set the resolution for this face.
sourcepub fn adjacent_edge(&self, edge_id: i32) -> EdgeId
pub fn adjacent_edge(&self, edge_id: i32) -> EdgeId
Return the adjacent edge for this face.
sourcepub fn set_adjacent_edges(
&mut self,
e1: EdgeId,
e2: EdgeId,
e3: EdgeId,
e4: EdgeId
)
pub fn set_adjacent_edges( &mut self, e1: EdgeId, e2: EdgeId, e3: EdgeId, e4: EdgeId )
Set the adjacent edges.
sourcepub fn adjacent_face(&self, face_id: i32) -> i32
pub fn adjacent_face(&self, face_id: i32) -> i32
Get the adjacent face for the specified face ID.
sourcepub fn set_adjacent_faces(&mut self, f1: i32, f2: i32, f3: i32, f4: i32)
pub fn set_adjacent_faces(&mut self, f1: i32, f2: i32, f3: i32, f4: i32)
Set the adjacent faces.
sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Return true if the FaceInfo contains constant data.
sourcepub fn is_neighborhood_constant(&self) -> bool
pub fn is_neighborhood_constant(&self) -> bool
Return true if the FaceInfo is in a neighborhood of constant faces.
sourcepub fn is_subface(&self) -> bool
pub fn is_subface(&self) -> bool
Return true if the FaceInfo represents a subface.
Trait Implementations§
impl Copy for FaceInfo
Auto Trait Implementations§
impl Freeze for FaceInfo
impl RefUnwindSafe for FaceInfo
impl Send for FaceInfo
impl Sync for FaceInfo
impl Unpin for FaceInfo
impl UnwindSafe for FaceInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more