Struct half_edge_mesh::face::Face [] [src]

pub struct Face {
    pub edge: EdgePtr,
    pub normal: Vector3<f32>,
    pub center: Point3<f32>,
    pub id: u32,
}

Fields

edge: EdgePtr normal: Vector3<f32> center: Point3<f32> id: u32

Methods

impl Face
[src]

fn empty(id: u32) -> Face

fn with_edge(id: u32, edge: EdgePtr) -> Face

fn take_edge(&mut self, edge: EdgePtr)

fn set_edge(&mut self, edge: &EdgePtr)

fn set_edge_rc(&mut self, edge: &EdgeRc)

fn is_valid(&self) -> bool

fn get_edge(&self) -> Option<EdgeRc>

fn num_vertices(&self) -> usize

fn compute_attrs(&mut self)

Computes the attributes (normal and center) of this face Note: this only works when the edges and verts are properly connected So wait for the right time during initialization to run this When a face or faces are added to a half edge mesh with one of the provided functions, this function is called, so that the face attributes are correct. TODO: Decide what to do with a degenerate face

fn adjacent_verts(&self) -> FaceAdjacentVertIterator

Iterates over the vertices which make up the face in counterclockwise order

fn adjacent_edges(&self) -> FaceAdjacentEdgeIterator

Iterates over the edges which make up the face in counterclockwise order

fn adjacent_faces(&self) -> FaceAdjacentFaceIterator

Iterates over the faces adjacent to this face in counterclockwise order

fn distance_to(&self, point: &Point3<f32>) -> f32

fn directed_distance_to(&self, point: &Point3<f32>) -> f32

fn can_see(&self, point: &Point3<f32>) -> bool

Trait Implementations

impl Debug for Face
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq<Face> for Face
[src]

fn eq(&self, other: &Face) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Eq for Face
[src]

impl Hash for Face
[src]

fn hash<H>(&self, state: &mut H) where H: Hasher

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.