[][src]Struct ncollide3d::shape::TriMesh

pub struct TriMesh<N: Real> { /* fields omitted */ }

A 3d triangle mesh.

Methods

impl<N: Real> TriMesh<N>[src]

pub fn new(
    points: Vec<Point<N>>,
    indices: Vec<Point3<usize>>,
    uvs: Option<Vec<Point2<N>>>
) -> TriMesh<N>
[src]

Builds a new mesh.

pub fn aabb(&self) -> &AABB<N>[src]

The triangle mesh's AABB.

pub fn points(&self) -> &[Point<N>][src]

The points of this mesh.

pub fn faces(&self) -> &[TriMeshFace<N>][src]

The faces of this mesh.

pub fn edges(&self) -> &[TriMeshEdge][src]

The edges of this mesh.

pub fn vertices(&self) -> &[TriMeshVertex][src]

The vertices of this mesh.

pub fn transform_by(&mut self, transform: &Isometry<N>)[src]

Applies a transformation to this triangle mesh.

pub fn scale_by(&mut self, scale: &Vector<N>)[src]

Applies a non-uniform scale to this triangle mesh.

pub fn oriented(&self) -> bool[src]

Whether this trimesh is considered is oriented or not.

By default a trimesh is not oriented.

pub fn set_oriented(&mut self, oriented: bool)[src]

Whether this trimesh is considered as oriented or not.

This is determined at the initialization of the trimesh.

pub fn face_containing_feature(&self, id: FeatureId) -> usize[src]

Face containing feature.

pub fn edge_segment(&self, i: usize) -> Segment<N>[src]

The segment of the i-th edge on this triangle mesh.

pub fn uvs(&self) -> Option<&[Point2<N>]>[src]

The texture coordinates of this mesh.

pub fn triangle_at(&self, i: usize) -> Triangle<N>[src]

Gets the i-th mesh element.

pub fn is_backface(&self, feature: FeatureId) -> bool[src]

Returns true if the given feature is a FeatureId::Face and identifies a backface of this trimesh.

pub fn bvt(&self) -> &BVT<usize, AABB<N>>[src]

The optimization structure used by this triangle mesh.

pub fn vertex_tangent_cone_contains_dir(
    &self,
    i: usize,
    deformations: Option<&[N]>,
    dir: &Unit<Vector<N>>
) -> bool
[src]

Tests that the given dir is on the tangent cone of the ith vertex of this mesh.

pub fn vertex_tangent_cone_polar_contains_dir(
    &self,
    i: usize,
    dir: &Unit<Vector<N>>,
    sin_ang_tol: N
) -> bool
[src]

Tests that the given dir is on the polar of the tangent cone of the ith vertex of this mesh.

pub fn edge_tangent_cone_contains_dir(
    &self,
    i: usize,
    deformations: Option<&[N]>,
    dir: &Unit<Vector<N>>
) -> bool
[src]

Tests that the given dir is on the tangent cone of the ith edge of this mesh.

pub fn edge_tangent_cone_polar_contains_orthogonal_dir(
    &self,
    i: usize,
    dir: &Unit<Vector<N>>,
    sin_ang_tol: N
) -> bool
[src]

Tests that the given dir is on the polar of the tangent cone of the ith edge of this mesh.

The dir is assumed to be orthogonal to the edge.

pub fn edge_tangent_cone_polar_contains_dir(
    &self,
    i: usize,
    dir: &Unit<Vector<N>>,
    sin_ang_tol: N,
    _cos_ang_tol: N
) -> bool
[src]

Tests that the given dir is on the polar of the tangent cone of the ith edge of this mesh.

pub fn face_tangent_cone_contains_dir(
    &self,
    i: usize,
    deformations: Option<&[N]>,
    dir: &Unit<Vector<N>>
) -> bool
[src]

Tests that the given dir is on the tangent cone of the ith face of this mesh.

pub fn face_tangent_cone_polar_contains_dir(
    &self,
    i: usize,
    dir: &Unit<Vector<N>>,
    cos_ang_tol: N
) -> bool
[src]

Checks if the polar of the tangent cone of the i-th face of this triangle mesh contains the specified direction within an angular tolerence.

pub fn tangent_cone_polar_contains_dir(
    &self,
    feature: FeatureId,
    dir: &Unit<Vector<N>>,
    sin_ang_tol: N,
    cos_ang_tol: N
) -> bool
[src]

Checks if the polar of the tangent cone of the specified feature of this triangle mesh contains the specified direction within an angular tolerence.

Trait Implementations

impl<N: Real> HasBoundingVolume<N, AABB<N>> for TriMesh<N>[src]

impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for TriMesh<N>[src]

impl<N: Real> PointQuery<N> for TriMesh<N>[src]

fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N[src]

Computes the minimal distance between a point and self transformed by m.

impl<N: Real> PointQueryWithLocation<N> for TriMesh<N>[src]

type Location = (usize, TrianglePointLocation<N>)

Additional shape-specific projection information Read more

impl<N: Real> RayCast<N> for TriMesh<N>[src]

fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool[src]

Tests whether a ray intersects this transformed shape.

impl<N: Real> CompositeShape<N> for TriMesh<N>[src]

impl<N: Real> DeformableShape<N> for TriMesh<N>[src]

fn set_deformations(&mut self, coords: &[N])[src]

Updates all the degrees of freedom of this shape.

impl<N: Real> Shape<N> for TriMesh<N>[src]

fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]

The convex polyhedron representation of self if applicable.

fn as_support_map(&self) -> Option<&dyn SupportMap<N>>[src]

The support mapping of self if applicable.

fn is_convex_polyhedron(&self) -> bool[src]

Whether self uses a convex polyhedron representation.

fn is_support_map(&self) -> bool[src]

Whether self uses a support-mapping based representation.

impl<N: Real> From<TriMesh<N>> for TriMesh<N>[src]

impl<N: Clone + Real> Clone for TriMesh<N>[src]

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

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<N> Send for TriMesh<N> where
    N: Scalar

impl<N> Sync for TriMesh<N> where
    N: Scalar

Blanket Implementations

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> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

The type returned in the event of a conversion error.

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

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> Same for T

type Output = T

Should always be Self