Struct rapier2d::geometry::Cuboid[][src]

pub struct Cuboid {
    pub half_extents: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>,
}

Shape of a box.

Fields

half_extents: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>

The half-extents of the cuboid.

Implementations

impl Cuboid[src]

pub fn aabb(&self, pos: &Isometry<f32, U2, Unit<Complex<f32>>>) -> AABB[src]

Computes the world-space AABB of this cuboid, transformed by pos.

pub fn local_aabb(&self) -> AABB[src]

Computes the local-space AABB of this cuboid.

impl Cuboid[src]

pub fn bounding_sphere(
    &self,
    pos: &Isometry<f32, U2, Unit<Complex<f32>>>
) -> BoundingSphere
[src]

Computes the world-space bounding sphere of this cuboid, transformed by pos.

pub fn local_bounding_sphere(&self) -> BoundingSphere[src]

Computes the local-space bounding sphere of this cuboid.

impl Cuboid[src]

pub fn new(
    half_extents: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> Cuboid
[src]

Creates a new box from its half-extents. Half-extents are the box half-width along each axis. Each half-extent must be positive.

pub fn vertex_feature_id(vertex: Point<f32, U2>) -> u32[src]

Return the id of the vertex of this cuboid with a normal that maximizes the dot product with dir.

pub fn support_feature(
    &self,
    local_dir: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> PolygonalFeature
[src]

Return the feature of this cuboid with a normal that maximizes the dot product with dir.

pub fn support_face(
    &self,
    local_dir: Matrix<f32, U2, U1, <DefaultAllocator as Allocator<f32, U2, U1>>::Buffer>
) -> PolygonalFeature
[src]

Return the face of this cuboid with a normal that maximizes the dot product with local_dir.

impl Cuboid[src]

pub fn to_polyline(&self) -> Vec<Point<f32, U2>, Global>[src]

Discretize the boundary of this cuboid as a polygonal line.

Trait Implementations

impl Clone for Cuboid[src]

impl Copy for Cuboid[src]

impl Debug for Cuboid[src]

impl PartialEq<Cuboid> for Cuboid[src]

impl PointQuery for Cuboid[src]

impl PolygonalFeatureMap for Cuboid[src]

impl RayCast for Cuboid[src]

impl Shape for Cuboid[src]

impl StructuralPartialEq for Cuboid[src]

impl SupportMap for Cuboid[src]

Auto Trait Implementations

impl RefUnwindSafe for Cuboid

impl Send for Cuboid

impl Sync for Cuboid

impl Unpin for Cuboid

impl UnwindSafe for Cuboid

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,