Struct rapier3d::geometry::Cone[][src]

pub struct Cone {
    pub half_height: f32,
    pub radius: f32,
}

Cone shape with its principal axis aligned with the y axis.

Fields

half_height: f32

The half-height of the cone.

radius: f32

The base radius of the cone.

Implementations

impl Cone[src]

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

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

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

Computes the local-space AABB of this cone.

impl Cone[src]

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

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

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

Computes the local-space bounding sphere of this cone.

impl Cone[src]

pub fn new(half_height: f32, radius: f32) -> Cone[src]

Creates a new cone.

Arguments:

  • half_height - the half length of the cone along the y axis.
  • radius - the length of the cone along all other axis.

impl Cone[src]

pub fn to_trimesh(
    &self,
    nsubdiv: u32
) -> (Vec<Point<f32, U3>, Global>, Vec<[u32; 3], Global>)
[src]

Discretize the boundary of this cone as a triangle-mesh.

Trait Implementations

impl Clone for Cone[src]

impl Copy for Cone[src]

impl Debug for Cone[src]

impl PartialEq<Cone> for Cone[src]

impl PointQuery for Cone[src]

impl PolygonalFeatureMap for Cone[src]

impl RayCast for Cone[src]

impl Shape for Cone[src]

impl StructuralPartialEq for Cone[src]

impl SupportMap for Cone[src]

Auto Trait Implementations

impl RefUnwindSafe for Cone

impl Send for Cone

impl Sync for Cone

impl Unpin for Cone

impl UnwindSafe for Cone

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: Any + Send + Sync
[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: Copy + PartialEq<T> + Debug + Any
[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.