Struct ncollide::shape::BaseMesh
[−]
[src]
pub struct BaseMesh<P, I, E> where
P: Point, { /* fields omitted */ }
A mesh generic wrt. the contained mesh elements characterized by vertices.
Methods
impl<P, I, E> BaseMesh<P, I, E> where
E: BaseMeshElement<I, P> + HasBoundingVolume<Id<Multiplicative>, AABB<P>>,
P: Point,
[src]
E: BaseMeshElement<I, P> + HasBoundingVolume<Id<Multiplicative>, AABB<P>>,
P: Point,
fn new(
vertices: Arc<Vec<P>>,
indices: Arc<Vec<I>>,
uvs: Option<Arc<Vec<Point<<P as EuclideanSpace>::Real, U2>>>>,
normals: Option<Arc<Vec<<P as Point>::Vector>>>
) -> BaseMesh<P, I, E>
[src]
vertices: Arc<Vec<P>>,
indices: Arc<Vec<I>>,
uvs: Option<Arc<Vec<Point<<P as EuclideanSpace>::Real, U2>>>>,
normals: Option<Arc<Vec<<P as Point>::Vector>>>
) -> BaseMesh<P, I, E>
Builds a new mesh.
impl<P, I, E> BaseMesh<P, I, E> where
P: Point,
[src]
P: Point,
fn vertices(&self) -> &Arc<Vec<P>>
[src]
The vertices of this mesh.
fn len(&self) -> usize
[src]
The number of primitives on thes mesh.
fn bounding_volumes(&self) -> &[AABB<P>]
[src]
Bounding volumes of the subsimplices.
fn indices(&self) -> &Arc<Vec<I>>
[src]
The indices of this mesh.
fn uvs(&self) -> &Option<Arc<Vec<Point<<P as EuclideanSpace>::Real, U2>>>>
[src]
The texture coordinates of this mesh.
fn normals(&self) -> &Option<Arc<Vec<<P as Point>::Vector>>>
[src]
The normals of this mesh.
fn bvt(&self) -> &BVT<usize, AABB<P>>
[src]
The acceleration structure used for efficient collision detection and ray casting.
impl<P, I, E> BaseMesh<P, I, E> where
E: BaseMeshElement<I, P>,
P: Point,
[src]
E: BaseMeshElement<I, P>,
P: Point,
fn element_at(&self, i: usize) -> E
[src]
Gets the i-th mesh element.
Trait Implementations
impl<P, M, I, E> RayCast<P, M> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P> + RayCast<P, Id<Multiplicative>>,
I: Index<usize, Output = usize>,
M: Isometry<P>,
P: Point,
[src]
E: BaseMeshElement<I, P> + RayCast<P, Id<Multiplicative>>,
I: Index<usize, Output = usize>,
M: Isometry<P>,
P: Point,
fn toi_with_ray(
&self,
m: &M,
ray: &Ray<P>,
bool
) -> Option<<P as EuclideanSpace>::Real>
[src]
&self,
m: &M,
ray: &Ray<P>,
bool
) -> Option<<P as EuclideanSpace>::Real>
Computes the time of impact between this transform shape and a ray.
fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
bool
) -> Option<RayIntersection<<P as Point>::Vector>>
[src]
&self,
m: &M,
ray: &Ray<P>,
bool
) -> Option<RayIntersection<<P as Point>::Vector>>
Computes the time of impact, and normal between this transformed shape and a ray.
fn toi_and_normal_and_uv_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
[src]
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<<P as Point>::Vector>>
Computes time of impact, normal, and texture coordinates (uv) between this transformed shape and a ray. Read more
fn intersects_ray(&self, m: &M, ray: &Ray<P>) -> bool
[src]
Tests whether a ray intersects this transformed shape.
impl<P, I, E> Clone for BaseMesh<P, I, E> where
P: Point,
[src]
P: Point,
impl<P, M, I, E> HasBoundingVolume<M, AABB<P>> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P>,
M: Isometry<P>,
P: Point,
[src]
E: BaseMeshElement<I, P>,
M: Isometry<P>,
P: Point,
fn bounding_volume(&self, m: &M) -> AABB<P>
[src]
The bounding volume of self
transformed by m
.
impl<P, M, I, E> HasBoundingVolume<M, BoundingSphere<P>> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P>,
M: Isometry<P>,
P: Point,
[src]
E: BaseMeshElement<I, P>,
M: Isometry<P>,
P: Point,
fn bounding_volume(&self, m: &M) -> BoundingSphere<P>
[src]
The bounding volume of self
transformed by m
.
impl<P, M, I, E> PointQuery<P, M> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P> + PointQuery<P, Id<Multiplicative>> + PointQueryWithLocation<P, Id<Multiplicative>>,
M: Isometry<P>,
P: Point,
[src]
E: BaseMeshElement<I, P> + PointQuery<P, Id<Multiplicative>> + PointQueryWithLocation<P, Id<Multiplicative>>,
M: Isometry<P>,
P: Point,
fn project_point(&self, m: &M, point: &P, solid: bool) -> PointProjection<P>
[src]
Projects a point on self
transformed by m
.
fn contains_point(&self, m: &M, point: &P) -> bool
[src]
Tests if the given point is inside of self
transformed by m
.
fn distance_to_point(
&self,
m: &M,
pt: &P,
solid: bool
) -> <P as EuclideanSpace>::Real
[src]
&self,
m: &M,
pt: &P,
solid: bool
) -> <P as EuclideanSpace>::Real
Computes the minimal distance between a point and self
transformed by m
.
impl<P, M, I, E> PointQueryWithLocation<P, M> for BaseMesh<P, I, E> where
E: BaseMeshElement<I, P> + PointQueryWithLocation<P, Id<Multiplicative>>,
M: Isometry<P>,
P: Point,
[src]
E: BaseMeshElement<I, P> + PointQueryWithLocation<P, Id<Multiplicative>>,
M: Isometry<P>,
P: Point,
type Location = PointProjectionInfo<<E as PointQueryWithLocation<P, Id<Multiplicative>>>::Location>
Additional shape-specific projection information Read more
fn project_point_with_location(
&self,
m: &M,
point: &P,
bool
) -> (PointProjection<P>, <BaseMesh<P, I, E> as PointQueryWithLocation<P, M>>::Location)
[src]
&self,
m: &M,
point: &P,
bool
) -> (PointProjection<P>, <BaseMesh<P, I, E> as PointQueryWithLocation<P, M>>::Location)
Projects a point on self
transformed by m
.