[][src]Trait shine_math::triangulation::Factory

pub trait Factory {
type Position: Position;
type Constraint: Constraint;
    fn create_infinite_vertex(&mut self) -> VertexIndex;
fn create_vertex_with_position(&mut self, p: Self::Position) -> VertexIndex;
fn create_face(&mut self) -> FaceIndex;
fn create_face_with_vertices(
        &mut self,
        v0: VertexIndex,
        v1: VertexIndex,
        v2: VertexIndex
    ) -> FaceIndex;
fn clear_constraint<E: Into<FaceEdge>>(&mut self, edge: E);
fn get_constraint<E: Into<FaceEdge>>(&self, edge: E) -> Self::Constraint;
fn set_constraint<E: Into<FaceEdge>>(
        &mut self,
        edge: E,
        c: Self::Constraint
    );
fn merge_constraint<E: Into<FaceEdge>>(
        &mut self,
        edge: E,
        c: Self::Constraint
    );
fn copy_constraint_partial(
        &mut self,
        f_from: FaceIndex,
        i_from: Rot3,
        f_to: FaceIndex,
        i_to: Rot3
    );
fn set_adjacent<A: Into<FaceEdge>, B: Into<FaceEdge>>(&mut self, a: A, b: B);
fn move_adjacent<T: Into<FaceEdge>, S: Into<FaceEdge>>(
        &mut self,
        target: T,
        source: S
    ); }

Associated Types

Loading content...

Required methods

fn create_infinite_vertex(&mut self) -> VertexIndex

fn create_vertex_with_position(&mut self, p: Self::Position) -> VertexIndex

fn create_face(&mut self) -> FaceIndex

fn create_face_with_vertices(
    &mut self,
    v0: VertexIndex,
    v1: VertexIndex,
    v2: VertexIndex
) -> FaceIndex

fn clear_constraint<E: Into<FaceEdge>>(&mut self, edge: E)

Clear the constraint of an edge and update both adjacent faces.

fn get_constraint<E: Into<FaceEdge>>(&self, edge: E) -> Self::Constraint

Get the constraint of an edge.

fn set_constraint<E: Into<FaceEdge>>(&mut self, edge: E, c: Self::Constraint)

Set the constraint of an edge and update both adjacent faces.

fn merge_constraint<E: Into<FaceEdge>>(&mut self, edge: E, c: Self::Constraint)

Adds constraint to an edge and update both adjacent faces.

fn copy_constraint_partial(
    &mut self,
    f_from: FaceIndex,
    i_from: Rot3,
    f_to: FaceIndex,
    i_to: Rot3
)

Copy constraint from one face into another. The only the trarget face is not modified and thus the nighbor might get in an incosisten state.

fn set_adjacent<A: Into<FaceEdge>, B: Into<FaceEdge>>(&mut self, a: A, b: B)

Set adjacent face information for two neighboring faces along the given edges

fn move_adjacent<T: Into<FaceEdge>, S: Into<FaceEdge>>(
    &mut self,
    target: T,
    source: S
)

Move adjacent face information from one face into another along the given edges. The new adjacent face pairs are updated but the old (source) face is not modified.

Loading content...

Implementors

impl<P, V, F, C> Factory for Triangulation<P, V, F, C> where
    P: Position,
    V: Vertex<Position = P>,
    F: Face
[src]

type Position = P

type Constraint = F::Constraint

Loading content...