Struct ncollide::procedural::TriMesh [] [src]

pub struct TriMesh<P> where P: Point {
    pub coords: Vec<P>,
    pub normals: Option<Vec<P::Vector>>,
    pub uvs: Option<Vec<PointBase<P::Real, U2, MatrixArray<P::Real, U2, U1>>>>,
    pub indices: IndexBuffer,
}

Geometric description of a mesh.

Fields

Coordinates of the mesh vertices.

Coordinates of the mesh normals.

Textures coordinates of the mesh.

Index buffer of the mesh.

Methods

impl<P> TriMesh<P> where P: Point
[src]

Creates a new TriMesh.

If no indices is provided, trivial, sequential indices are generated.

Whether or not this triangle mesh has normals.

Whether or not this triangle mesh has texture coordinates.

Translates each vertex of this mesh.

Transforms each vertex and rotates each normal of this mesh.

The number of triangles on this mesh.

impl<P> TriMesh<P> where P: Point
[src]

Rotates each vertex and normal of this mesh.

impl<P> TriMesh<P> where P: Point
[src]

Recomputes the mesh normals using its vertex coordinates and adjascency informations infered from the index buffer.

impl<P> TriMesh<P> where P: Point
[src]

Scales each vertex of this mesh.

impl<P> TriMesh<P> where P: Point
[src]

Scales each vertex of this mesh.

impl<P> TriMesh<P> where P: Point
[src]

Force the mesh to use the same index for vertices, normals and uvs.

This might cause the duplication of some vertices, normals and uvs. Use this method to transform the mesh data to a OpenGL-compliant format.

impl<P> TriMesh<P> where P: Point + AsBytes
[src]

Forces the mesh to use a different index for the vertices, normals and uvs.

If recover_topology is true, this will merge exactly identical vertices together.

Trait Implementations

impl<P> Debug for TriMesh<P> where P: Debug + Point,
        P::Vector: Debug,
        P::Real: Debug
[src]

impl<P> Clone for TriMesh<P> where P: Clone + Point,
        P::Vector: Clone,
        P::Real: Clone
[src]