Struct ncollide3d::shape::TriMesh [−][src]
pub struct TriMesh<N: RealField> { /* fields omitted */ }
A 3d triangle mesh.
Implementations
impl<N: RealField> TriMesh<N>[src]
impl<N: RealField> TriMesh<N>[src]pub fn new(
points: Vec<Point<N>>,
indices: Vec<Point3<usize>>,
uvs: Option<Vec<Point2<N>>>
) -> TriMesh<N>[src]
points: Vec<Point<N>>,
indices: Vec<Point3<usize>>,
uvs: Option<Vec<Point2<N>>>
) -> TriMesh<N>
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 in-place a transformation to this triangle mesh.
pub fn transformed(self, transform: &Isometry<N>) -> Self[src]
Applies a transformation to this triangle mesh.
pub fn scale_by(&mut self, scale: &Vector<N>)[src]
Applies in-place a non-uniform scale to this triangle mesh.
pub fn scaled(self, scale: &Vector<N>) -> Self[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 adj_vertex_list(&self) -> &[usize][src]
The adjacent vertices list of this mesh.
Use TriMeshVertex.adj_vertices to index this. Elements are indexes into the vertices list.
pub fn adj_face_list(&self) -> &[usize][src]
The adjacent vertices list of this mesh.
Use TriMeshVertex.adj_faces to index this. Elements are indexes into the faces list.
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]
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
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]
&self,
i: usize,
dir: &Unit<Vector<N>>,
sin_ang_tol: N
) -> bool
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]
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
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]
&self,
i: usize,
dir: &Unit<Vector<N>>,
sin_ang_tol: N
) -> bool
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]
&self,
i: usize,
dir: &Unit<Vector<N>>,
sin_ang_tol: N,
_cos_ang_tol: N
) -> bool
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]
&self,
i: usize,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
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]
&self,
i: usize,
dir: &Unit<Vector<N>>,
cos_ang_tol: N
) -> bool
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]
&self,
feature: FeatureId,
dir: &Unit<Vector<N>>,
sin_ang_tol: N,
cos_ang_tol: N
) -> bool
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: RealField> CompositeShape<N> for TriMesh<N>[src]
impl<N: RealField> CompositeShape<N> for TriMesh<N>[src]fn nparts(&self) -> usize[src]
fn map_part_at(
&self,
i: usize,
m: &Isometry<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>)
)[src]
&self,
i: usize,
m: &Isometry<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>)
)
fn map_part_and_preprocessor_at(
&self,
i: usize,
m: &Isometry<N>,
prediction: &ContactPrediction<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &dyn ContactPreprocessor<N>)
)[src]
&self,
i: usize,
m: &Isometry<N>,
prediction: &ContactPrediction<N>,
f: &mut dyn FnMut(&Isometry<N>, &dyn Shape<N>, &dyn ContactPreprocessor<N>)
)
fn aabb_at(&self, i: usize) -> AABB<N>[src]
fn bvh(&self) -> BVHImpl<'_, N, usize, AABB<N>>[src]
impl<N: RealField> DeformableShape<N> for TriMesh<N>[src]
impl<N: RealField> DeformableShape<N> for TriMesh<N>[src]fn deformations_type(&self) -> DeformationsType[src]
fn set_deformations(&mut self, coords: &[N])[src]
Updates all the degrees of freedom of this shape.
fn update_local_approximation(
&self,
coords: &[N],
approx: &mut LocalShapeApproximation<N>
)[src]
&self,
coords: &[N],
approx: &mut LocalShapeApproximation<N>
)
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for TriMesh<N>[src]
impl<N: RealField> HasBoundingVolume<N, AABB<N>> for TriMesh<N>[src]fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>[src]
fn local_bounding_volume(&self) -> AABB<N>[src]
impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for TriMesh<N>[src]
impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for TriMesh<N>[src]fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>[src]
fn local_bounding_volume(&self) -> BoundingSphere<N>[src]
impl<N: RealField> PointQuery<N> for TriMesh<N>[src]
impl<N: RealField> PointQuery<N> for TriMesh<N>[src]fn project_point(
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>[src]
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>
fn project_point_with_feature(
&self,
m: &Isometry<N>,
point: &Point<N>
) -> (PointProjection<N>, FeatureId)[src]
&self,
m: &Isometry<N>,
point: &Point<N>
) -> (PointProjection<N>, FeatureId)
fn contains_point(&self, m: &Isometry<N>, point: &Point<N>) -> bool[src]
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N[src]
impl<N: RealField> PointQueryWithLocation<N> for TriMesh<N>[src]
impl<N: RealField> PointQueryWithLocation<N> for TriMesh<N>[src]type Location = (usize, TrianglePointLocation<N>)
Additional shape-specific projection information Read more
fn project_point_with_location(
&self,
m: &Isometry<N>,
point: &Point<N>,
_: bool
) -> (PointProjection<N>, Self::Location)[src]
&self,
m: &Isometry<N>,
point: &Point<N>,
_: bool
) -> (PointProjection<N>, Self::Location)
impl<N: RealField> RayCast<N> for TriMesh<N>[src]
impl<N: RealField> RayCast<N> for TriMesh<N>[src]fn toi_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
_: bool
) -> Option<N>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
_: bool
) -> Option<N>
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
_: bool
) -> Option<RayIntersection<N>>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
_: bool
) -> Option<RayIntersection<N>>
fn toi_and_normal_and_uv_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>[src]
&self,
m: &Isometry<N>,
ray: &Ray<N>,
max_toi: N,
solid: bool
) -> Option<RayIntersection<N>>
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>, max_toi: N) -> bool[src]
impl<N: RealField> Shape<N> for TriMesh<N>[src]
impl<N: RealField> Shape<N> for TriMesh<N>[src]fn aabb(&self, m: &Isometry<N>) -> AABB<N>[src]
fn local_aabb(&self) -> AABB<N>[src]
fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N>[src]
fn as_ray_cast(&self) -> Option<&dyn RayCast<N>>[src]
fn as_point_query(&self) -> Option<&dyn PointQuery<N>>[src]
fn as_composite_shape(&self) -> Option<&dyn CompositeShape<N>>[src]
fn is_composite_shape(&self) -> bool[src]
fn as_deformable_shape(&self) -> Option<&dyn DeformableShape<N>>[src]
fn as_deformable_shape_mut(&mut self) -> Option<&mut dyn DeformableShape<N>>[src]
fn is_deformable_shape(&self) -> bool[src]
fn tangent_cone_contains_dir(
&self,
fid: FeatureId,
m: &Isometry<N>,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool[src]
&self,
fid: FeatureId,
m: &Isometry<N>,
deformations: Option<&[N]>,
dir: &Unit<Vector<N>>
) -> bool
fn subshape_containing_feature(&self, id: FeatureId) -> usize[src]
fn local_bounding_sphere(&self) -> BoundingSphere<N>[src]
fn as_convex_polyhedron(&self) -> Option<&dyn ConvexPolyhedron<N>>[src]
fn as_support_map(&self) -> Option<&dyn SupportMap<N>>[src]
fn is_convex_polyhedron(&self) -> bool[src]
fn is_support_map(&self) -> bool[src]
Auto Trait Implementations
impl<N> RefUnwindSafe for TriMesh<N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<N> Send for TriMesh<N>
impl<N> Sync for TriMesh<N>
impl<N> Unpin for TriMesh<N> where
N: Unpin,
N: Unpin,
impl<N> UnwindSafe for TriMesh<N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> DowncastSync for T where
T: Any + Send + Sync, [src]
impl<T> DowncastSync for T where
T: Any + Send + Sync, [src]impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>, [src]