Struct ncollide_geometry::shape::Cuboid
[−]
[src]
pub struct Cuboid<V> { /* fields omitted */ }
Shape of a box.
Methods
impl<V: Vector> Cuboid<V>
[src]
fn new(half_extents: V) -> Cuboid<V>
Creates a new box from its half-extents. Half-extents are the box half-width along each axis. Each half-extent must be greater than 0.04.
impl<V> Cuboid<V>
[src]
fn half_extents(&self) -> &V
The half-extents of this box. Half-extents are the box half-width along each axis.
Trait Implementations
impl<V: PartialEq> PartialEq for Cuboid<V>
[src]
fn eq(&self, __arg_0: &Cuboid<V>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Cuboid<V>) -> bool
This method tests for !=
.
impl<V: Debug> Debug for Cuboid<V>
[src]
impl<V: Clone> Clone for Cuboid<V>
[src]
fn clone(&self) -> Cuboid<V>
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<V: Encodable> Encodable for Cuboid<V>
[src]
fn encode<__SV: Encoder>(&self, __arg_0: &mut __SV) -> Result<(), __SV::Error>
Serialize a value using an Encoder
.
impl<V: Decodable> Decodable for Cuboid<V>
[src]
fn decode<__DV: Decoder>(__arg_0: &mut __DV) -> Result<Cuboid<V>, __DV::Error>
Deserialize a value using a Decoder
.
impl<P: Point, M: Isometry<P>> SupportMap<P, M> for Cuboid<P::Vector>
[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 Cuboid<P::Vector>
[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 Cuboid<P::Vector>
[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 Cuboid<P::Vector>
[src]
fn bounding_volume(&self, m: &M) -> BoundingSphere<P>
The bounding volume of self
transformed by m
.
impl<P: Point, M: Isometry<P>> RayCast<P, M> for Cuboid<P::Vector>
[src]
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_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_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 Cuboid<P::Vector>
[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
.