[][src]Struct mgf::Mesh

pub struct Mesh {
    pub x: Vector3<f32>,
    pub verts: Vec<Point3<f32>>,
    pub faces: Vec<(usize, usize, usize)>,
    pub bvh: BVH<AABB, usize>,
}

A triangle mesh is a set of triangles that forms some sort of mesh. There are no requirements on the convexivity of the mesh.

Fields

x: Vector3<f32>verts: Vec<Point3<f32>>faces: Vec<(usize, usize, usize)>bvh: BVH<AABB, usize>

Methods

impl Mesh[src]

pub fn new() -> Self[src]

pub fn with_capacity(cap_verts: usize, cap_faces: usize) -> Self[src]

pub fn push_vert(&mut self, p: Point3<f32>) -> usize[src]

pub fn push_face(&mut self, f: (usize, usize, usize)) -> usize[src]

Trait Implementations

impl<RHS> Contacts<RHS> for Mesh where
    RHS: Contacts<Triangle> + Contacts<Rectangle> + BoundedBy<AABB>, 
[src]

fn last_contact(&self, rhs: &RHS) -> Option<Contact>[src]

Returns the last contact found, if one exists.

impl Shape for Mesh[src]

fn set_pos(&mut self, p: Point3<f32>)[src]

Sets the center of the shape to p.

impl Volumetric for Mesh[src]

Rotating meshes is not a fast operation.

fn rotate_about<R: Rotation3<f32>>(self, r: R, p: Point3<f32>) -> Self[src]

Rotates the object around a point.

impl Clone for Mesh[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl AddAssign<Vector3<f32>> for Mesh[src]

impl SubAssign<Vector3<f32>> for Mesh[src]

Auto Trait Implementations

impl Send for Mesh

impl Sync for Mesh

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.