Struct ncollide_geometry::shape::Segment
[−]
[src]
pub struct Segment<P> { /* fields omitted */ }
A segment shape.
Methods
impl<P: Point> Segment<P>
[src]
impl<P> Segment<P>
[src]
fn a(&self) -> &P
The first point of this segment.
fn b(&self) -> &P
The second point of this segment.
Trait Implementations
impl<P: PartialEq> PartialEq for Segment<P>
[src]
fn eq(&self, __arg_0: &Segment<P>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Segment<P>) -> bool
This method tests for !=
.
impl<P: Debug> Debug for Segment<P>
[src]
impl<P: Clone> Clone for Segment<P>
[src]
fn clone(&self) -> Segment<P>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<P: Encodable> Encodable for Segment<P>
[src]
fn encode<__SP: Encoder>(&self, __arg_0: &mut __SP) -> Result<(), __SP::Error>
Serialize a value using an Encoder
.
impl<P: Decodable> Decodable for Segment<P>
[src]
fn decode<__DP: Decoder>(__arg_0: &mut __DP) -> Result<Segment<P>, __DP::Error>
Deserialize a value using a Decoder
.
impl<P: Point> BaseMeshElement<Point2<usize>, P> for Segment<P>
[src]
fn new_with_vertices_and_indices(vs: &[P], is: &Point2<usize>) -> Segment<P>
Creates a new mesh element from a set of vertices and indices.
impl<P: Point, M: Isometry<P>> SupportMap<P, M> for Segment<P>
[src]
fn support_point(&self, m: &M, dir: &P::Vector) -> P
Evaluates the support function of the object. A support function is a function associating a vector to the shape point which maximizes their dot product. This does not include the margin
of the object. Margins are shape-dependent. Use support_point
to sample the complete shape. Read more
impl<P: Point, M: Isometry<P>> Shape<P, M> for Segment<P>
[src]
fn aabb(&self, m: &M) -> AABB<P>
The AABB of self
.
fn bounding_sphere(&self, m: &M) -> BoundingSphere<P>
The bounding sphere of self
.
fn as_ray_cast(&self) -> Option<&RayCast<P, M>>
The RayCast
implementation of self
.
fn as_point_query(&self) -> Option<&PointQuery<P, M>>
The PointQuery
implementation of self
.
fn as_support_map(&self) -> Option<&SupportMap<P, M>>
The support mapping of self
if applicable.
fn is_support_map(&self) -> bool
Whether self
uses a supportmapping-based representation.
fn as_composite_shape(&self) -> Option<&CompositeShape<P, M>>
The composite shape representation of self
if applicable.
fn is_composite_shape(&self) -> bool
Whether self
uses a composite shape-based representation.
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, AABB<P>> for Segment<P>
[src]
fn bounding_volume(&self, m: &M) -> AABB<P>
The bounding volume of self
transformed by m
.
impl<P: Point, M: Isometry<P>> HasBoundingVolume<M, BoundingSphere<P>> for Segment<P>
[src]
fn bounding_volume(&self, m: &M) -> BoundingSphere<P>
The bounding volume of self
transformed by m
.
impl<P, M> RayCast<P, M> for Segment<P> where
P: Point,
M: Isometry<P>,
[src]
P: Point,
M: Isometry<P>,
fn toi_and_normal_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
Computes the time of impact, and normal between this transformed shape and a ray.
fn toi_with_ray(&self, m: &M, ray: &Ray<P>, solid: bool) -> Option<P::Real>
Computes the time of impact between this transform shape and a ray.
fn toi_and_normal_and_uv_with_ray(
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::Vector>>
&self,
m: &M,
ray: &Ray<P>,
solid: bool
) -> Option<RayIntersection<P::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
Tests whether a ray intersects this transformed shape.
impl<P: Point, M: Isometry<P>> PointQuery<P, M> for Segment<P>
[src]
fn project_point(&self, m: &M, pt: &P, solid: bool) -> PointProjection<P>
Projects a point on self
transformed by m
.
fn distance_to_point(&self, m: &M, pt: &P, solid: bool) -> P::Real
Computes the minimal distance between a point and self
transformed by m
.
fn contains_point(&self, m: &M, pt: &P) -> bool
Tests if the given point is inside of self
transformed by m
.
impl<P: Point, M: Isometry<P>> RichPointQuery<P, M> for Segment<P>
[src]
type ExtraInfo = P::Real
Additional shape-specific projection information Read more
fn project_point_with_extra_info(
&self,
m: &M,
pt: &P,
_: bool
) -> (PointProjection<P>, Self::ExtraInfo)
&self,
m: &M,
pt: &P,
_: bool
) -> (PointProjection<P>, Self::ExtraInfo)
Projects a point on self
transformed by m
.