[][src]Struct gut::mesh::uniform_poly_mesh::QuadMeshExt

pub struct QuadMeshExt<T: Real> {
    pub base_mesh: QuadMesh<T>,
    pub face_indices: Vec<usize>,
    pub face_offsets: Vec<usize>,
}

Fields

base_mesh: QuadMesh<T>

Vertex positions.

face_indices: Vec<usize>

Lists of face indices for each vertex. Since each vertex can have a variable number of face neighbours, the face_offsets field keeps track of where each subarray of indices begins.

face_offsets: Vec<usize>

Offsets into the face_indices array, one for each vertex. The last offset is always equal to the size of face_indices for convenience.

Methods

impl<T: Real> QuadMeshExt<T>[src]

pub fn new(verts: Vec<[T; 3]>, indices: Vec<usize>) -> QuadMeshExt<T>[src]

pub fn face_iter(&self) -> Iter<[usize; 4]>[src]

Iterate over each face.

pub fn face_iter_mut(&mut self) -> IterMut<[usize; 4]>[src]

Iterate mutably over each face.

pub fn face(&self, fidx: FaceIndex) -> &[usize; 4][src]

Face accessor. These are vertex indices.

pub fn faces(&self) -> &[[usize; 4]][src]

Return a slice of individual faces.

pub fn reverse(&mut self)[src]

Reverse the order of each polygon in this mesh.

pub fn reversed(self) -> Self[src]

Reverse the order of each polygon in this mesh. This is the consuming version of the reverse method.

pub fn sort_vertices_by_key<K, F>(&mut self, f: F) where
    F: FnMut(usize) -> K,
    K: Ord
[src]

Sort vertices by the given key values.

Trait Implementations

impl<T: Real> Merge for QuadMeshExt<T>[src]

fn merge(&mut self, other: Self) -> &mut Self[src]

Attributes with the same name but different types won't be merged.

impl<T: Real> NumVertices for QuadMeshExt<T>[src]

impl<T: Real> NumFaces for QuadMeshExt<T>[src]

impl<T: Real> Attrib for QuadMeshExt<T>[src]

impl<T: Real> VertexPositions for QuadMeshExt<T>[src]

type Element = <QuadMesh<T> as VertexPositions>::Element

impl<T: Real> FaceVertex for QuadMeshExt<T>[src]

impl<T: Real> FaceEdge for QuadMeshExt<T>[src]

impl<T: Real> VertexFace for QuadMeshExt<T>[src]

impl<T: Real> VertexAttrib for QuadMeshExt<T>[src]

impl<T: Real> FaceAttrib for QuadMeshExt<T>[src]

impl<T: Real> FaceVertexAttrib for QuadMeshExt<T>[src]

impl<T: Real> FaceEdgeAttrib for QuadMeshExt<T>[src]

impl<T: Real> From<QuadMesh<T>> for QuadMeshExt<T>[src]

impl<T: Real> From<QuadMeshExt<T>> for QuadMesh<T>[src]

impl<T: Clone + Real> Clone for QuadMeshExt<T>[src]

impl<T: Real> Default for QuadMeshExt<T>[src]

fn default() -> Self[src]

Produce an empty mesh. This is not particularly useful on its own, however it can be used as a null case for various mesh algorithms.

impl<T: PartialEq + Real> PartialEq<QuadMeshExt<T>> for QuadMeshExt<T>[src]

impl<T: Debug + Real> Debug for QuadMeshExt<T>[src]

impl<T: Real> StructuralPartialEq for QuadMeshExt<T>[src]

Auto Trait Implementations

impl<T> Send for QuadMeshExt<T>

impl<T> Sync for QuadMeshExt<T>

impl<T> Unpin for QuadMeshExt<T> where
    T: Unpin

impl<T> UnwindSafe for QuadMeshExt<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for QuadMeshExt<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, M> Scale<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn scale(&mut Self, [T; 3])[src]

Scale a mesh in 3D by a given vector of scale factors. s = [1.0; 3] corresponds to a noop.

impl<T, M> Rotate<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn rotate_by_matrix(&mut Self, [[T; 3]; 3])[src]

Rotate the mesh using the given column-major rotation matrix.

impl<T, M> Translate<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: BaseFloat
[src]

fn translate(&mut Self, [T; 3])[src]

Translate the mesh by the given translation vector (displacement) t.

impl<S, T> Scaled<T> for S where
    S: Scale<T>,
    T: Copy
[src]

impl<S, T> Rotated<T> for S where
    S: Rotate<T>,
    T: BaseFloat
[src]

impl<S, T> Translated<T> for S where
    S: Translate<T>, 
[src]

impl<M, T> BoundingBox<T> for M where
    M: VertexPositions<Element = [T; 3]>,
    T: Real
[src]

fn bounding_box(&Self) -> BBox<T>[src]

Compute the bounding box of this object.

impl<M> Connectivity<VertexFaceIndex> for M where
    M: NumVertices + NumFaces + FaceVertex
[src]

impl<T> Bytes for T[src]

impl<M, T> VertexMesh<T> for M where
    M: Attrib + VertexAttrib + NumVertices + VertexPositions<Element = [T; 3]>,
    T: Real
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]