Struct ptex_sys::ffi::FaceInfo

source ·
#[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

source

pub fn from_res_and_adjacency<T: Into<Res>>( res: T, adjacent_faces: &[i32; 4], adjacent_edges: &[i32; 4], is_subface: bool ) -> Self

source

pub fn resolution(&self) -> Res

Return a Res resolution struct.

source

pub fn set_resolution<T: Into<Res>>(&mut self, res: T)

Set the resolution for this face.

source

pub fn adjacent_edge(&self, edge_id: i32) -> EdgeId

Return the adjacent edge for this face.

source

pub fn set_adjacent_edges( &mut self, e1: EdgeId, e2: EdgeId, e3: EdgeId, e4: EdgeId )

Set the adjacent edges.

source

pub fn adjacent_face(&self, face_id: i32) -> i32

Get the adjacent face for the specified face ID.

source

pub fn set_adjacent_faces(&mut self, f1: i32, f2: i32, f3: i32, f4: i32)

Set the adjacent faces.

source

pub fn has_edits(&self) -> bool

Return true if the FaceInfo contains edits.

source

pub fn is_constant(&self) -> bool

Return true if the FaceInfo contains constant data.

source

pub fn is_neighborhood_constant(&self) -> bool

Return true if the FaceInfo is in a neighborhood of constant faces.

source

pub fn is_subface(&self) -> bool

Return true if the FaceInfo represents a subface.

Trait Implementations§

source§

impl Clone for FaceInfo

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FaceInfo

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FaceInfo

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl ExternType for FaceInfo

§

type Kind = Trivial

§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
source§

impl Copy for FaceInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.