Struct ncollide3d::shape::TriMesh [−][src]
pub struct TriMesh<N: Real> { /* fields omitted */ }
Shape commonly known as a 2d line strip or a 3d triangle mesh.
Methods
impl<N: Real> TriMesh<N>
[src]
impl<N: Real> TriMesh<N>
pub fn new(
vertices: Vec<Point<N>>,
indices: Vec<Point3<usize>>,
uvs: Option<Vec<Point2<N>>>
) -> TriMesh<N>
[src]
pub fn new(
vertices: Vec<Point<N>>,
indices: Vec<Point3<usize>>,
uvs: Option<Vec<Point2<N>>>
) -> TriMesh<N>
Builds a new mesh.
pub fn vertices(&self) -> &Vec<Point<N>>
[src]
pub fn vertices(&self) -> &Vec<Point<N>>
The vertices of this mesh.
pub fn bounding_volumes(&self) -> &[AABB<N>]
[src]
pub fn bounding_volumes(&self) -> &[AABB<N>]
Bounding volumes of the subsimplices.
pub fn indices(&self) -> &Vec<Point3<usize>>
[src]
pub fn indices(&self) -> &Vec<Point3<usize>>
The indices of this mesh.
pub fn uvs(&self) -> &Option<Vec<Point2<N>>>
[src]
pub fn uvs(&self) -> &Option<Vec<Point2<N>>>
The texture coordinates of this mesh.
pub fn bvt(&self) -> &BVT<usize, AABB<N>>
[src]
pub fn bvt(&self) -> &BVT<usize, AABB<N>>
The acceleration structure used for efficient collision detection and ray casting.
pub fn triangle_at(&self, i: usize) -> Triangle<N>
[src]
pub fn triangle_at(&self, i: usize) -> Triangle<N>
Gets the i-th mesh element.
Trait Implementations
impl<N: Real> HasBoundingVolume<N, AABB<N>> for TriMesh<N>
[src]
impl<N: Real> HasBoundingVolume<N, AABB<N>> for TriMesh<N>
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> AABB<N>
The bounding volume of self
transformed by m
.
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for TriMesh<N>
[src]
impl<N: Real> HasBoundingVolume<N, BoundingSphere<N>> for TriMesh<N>
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_volume(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding volume of self
transformed by m
.
impl<N: Real> PointQuery<N> for TriMesh<N>
[src]
impl<N: Real> PointQuery<N> for TriMesh<N>
fn project_point(
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>
[src]
fn project_point(
&self,
m: &Isometry<N>,
point: &Point<N>,
solid: bool
) -> PointProjection<N>
Projects a point on self
transformed by m
.
fn project_point_with_feature(
&self,
_: &Isometry<N>,
_: &Point<N>
) -> (PointProjection<N>, FeatureId)
[src]
fn project_point_with_feature(
&self,
_: &Isometry<N>,
_: &Point<N>
) -> (PointProjection<N>, FeatureId)
Projects a point on the boundary of self
transformed by m
and retuns the id of the feature the point was projected on. Read more
fn contains_point(&self, m: &Isometry<N>, point: &Point<N>) -> bool
[src]
fn contains_point(&self, m: &Isometry<N>, point: &Point<N>) -> bool
Tests if the given point is inside of self
transformed by m
.
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
[src]
fn distance_to_point(&self, m: &Isometry<N>, pt: &Point<N>, solid: bool) -> N
Computes the minimal distance between a point and self
transformed by m
.
impl<N: Real> PointQueryWithLocation<N> for TriMesh<N>
[src]
impl<N: Real> PointQueryWithLocation<N> for TriMesh<N>
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]
fn project_point_with_location(
&self,
m: &Isometry<N>,
point: &Point<N>,
_: bool
) -> (PointProjection<N>, Self::Location)
Projects a point on self
transformed by m
.
impl<N: Real> RayCast<N> for TriMesh<N>
[src]
impl<N: Real> RayCast<N> for TriMesh<N>
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, _: bool) -> Option<N>
[src]
fn toi_with_ray(&self, m: &Isometry<N>, ray: &Ray<N>, _: bool) -> Option<N>
Computes the time of impact between this transform shape and a ray.
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
_: bool
) -> Option<RayIntersection<N>>
[src]
fn toi_and_normal_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
_: bool
) -> Option<RayIntersection<N>>
Computes the time of impact, and normal between this transformed shape and a ray.
fn toi_and_normal_and_uv_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
[src]
fn toi_and_normal_and_uv_with_ray(
&self,
m: &Isometry<N>,
ray: &Ray<N>,
solid: bool
) -> Option<RayIntersection<N>>
Computes time of impact, normal, and texture coordinates (uv) between this transformed shape and a ray. Read more
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
[src]
fn intersects_ray(&self, m: &Isometry<N>, ray: &Ray<N>) -> bool
Tests whether a ray intersects this transformed shape.
impl<N: Real> Shape<N> for TriMesh<N>
[src]
impl<N: Real> Shape<N> for TriMesh<N>
fn aabb(&self, m: &Isometry<N>) -> AABB<N>
[src]
fn aabb(&self, m: &Isometry<N>) -> AABB<N>
The AABB of self
.
fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N>
[src]
fn bounding_sphere(&self, m: &Isometry<N>) -> BoundingSphere<N>
The bounding sphere of self
.
fn as_ray_cast(&self) -> Option<&RayCast<N>>
[src]
fn as_ray_cast(&self) -> Option<&RayCast<N>>
The RayCast
implementation of self
.
fn as_point_query(&self) -> Option<&PointQuery<N>>
[src]
fn as_point_query(&self) -> Option<&PointQuery<N>>
The PointQuery
implementation of self
.
fn as_composite_shape(&self) -> Option<&CompositeShape<N>>
[src]
fn as_composite_shape(&self) -> Option<&CompositeShape<N>>
The composite shape representation of self
if applicable.
fn is_composite_shape(&self) -> bool
[src]
fn is_composite_shape(&self) -> bool
Whether self
uses a composite shape-based representation.
fn subshape_transform(&self, _: usize) -> Option<Isometry<N>>
[src]
fn subshape_transform(&self, _: usize) -> Option<Isometry<N>>
The transform of a specific subshape. Read more
fn as_convex_polyhedron(&self) -> Option<&ConvexPolyhedron<N>>
[src]
fn as_convex_polyhedron(&self) -> Option<&ConvexPolyhedron<N>>
The convex polyhedron representation of self
if applicable.
fn as_support_map(&self) -> Option<&SupportMap<N>>
[src]
fn as_support_map(&self) -> Option<&SupportMap<N>>
The support mapping of self
if applicable.
fn is_convex_polyhedron(&self) -> bool
[src]
fn is_convex_polyhedron(&self) -> bool
Whether self
uses a conve polyhedron representation.
fn is_support_map(&self) -> bool
[src]
fn is_support_map(&self) -> bool
Whether self
uses a supportmapping-based representation.
impl<N: Real> Clone for TriMesh<N>
[src]
impl<N: Real> Clone for TriMesh<N>
fn clone(&self) -> TriMesh<N>
[src]
fn clone(&self) -> TriMesh<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: Real> CompositeShape<N> for TriMesh<N>
[src]
impl<N: Real> CompositeShape<N> for TriMesh<N>
fn nparts(&self) -> usize
[src]
fn nparts(&self) -> usize
The number of sub-shape in this composide sahpe.
fn map_part_at(&self, i: usize, f: &mut FnMut(usize, &Isometry<N>, &Shape<N>))
[src]
fn map_part_at(&self, i: usize, f: &mut FnMut(usize, &Isometry<N>, &Shape<N>))
Applies a function to each sub-shape of this concave shape.
fn map_transformed_part_at(
&self,
i: usize,
m: &Isometry<N>,
f: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
)
[src]
fn map_transformed_part_at(
&self,
i: usize,
m: &Isometry<N>,
f: &mut FnMut(usize, &Isometry<N>, &Shape<N>)
)
Applies a transformation matrix and a function to each sub-shape of this concave shape. Read more
fn aabb_at(&self, i: usize) -> AABB<N>
[src]
fn aabb_at(&self, i: usize) -> AABB<N>
Gets the AABB of the shape identified by the index i
.
fn bvt(&self) -> &BVT<usize, AABB<N>>
[src]
fn bvt(&self) -> &BVT<usize, AABB<N>>
Gets the acceleration structure of the concave shape.