[][src]Struct oxygengine_physics_2d::prelude::ColliderDesc

pub struct ColliderDesc<N> where
    N: RealField
{ /* fields omitted */ }

A non-deformable collider builder.

See https://www.nphysics.org/rigid_body_simulations_with_contacts/#colliders for details.

Implementations

impl<N> ColliderDesc<N> where
    N: RealField
[src]

pub fn new(shape: ShapeHandle<N>) -> ColliderDesc<N>[src]

Creates a new collider builder with the given shape.

pub fn default_margin() -> N[src]

The default margin surrounding a collider: 0.01

pub fn user_data(self, data: impl UserData) -> ColliderDesc<N>[src]

Sets a user-data to be attached to the object being built.

pub fn set_user_data(
    &mut self,
    data: Option<impl UserData>
) -> &mut ColliderDesc<N>
[src]

Sets the user-data to be attached to the object being built.

pub fn get_user_data(&self) -> Option<&(dyn Any + 'static + Sync + Send)>[src]

Reference to the user-data to be attached to the object being built.

pub fn rotation(self, angle: N) -> ColliderDesc<N>[src]

pub fn set_rotation(&mut self, angle: N) -> &mut ColliderDesc<N>[src]

pub fn translation(
    self,
    vector: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> ColliderDesc<N>
[src]

pub fn set_translation(
    &mut self,
    vector: Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> &mut ColliderDesc<N>
[src]

pub fn material(self, material: MaterialHandle<N>) -> ColliderDesc<N>[src]

pub fn set_material(
    &mut self,
    material: MaterialHandle<N>
) -> &mut ColliderDesc<N>
[src]

pub fn shape(self, shape: ShapeHandle<N>) -> ColliderDesc<N>[src]

pub fn set_shape(&mut self, shape: ShapeHandle<N>) -> &mut ColliderDesc<N>[src]

pub fn margin(self, margin: N) -> ColliderDesc<N>[src]

pub fn set_margin(&mut self, margin: N) -> &mut ColliderDesc<N>[src]

pub fn density(self, density: N) -> ColliderDesc<N>[src]

pub fn set_density(&mut self, density: N) -> &mut ColliderDesc<N>[src]

pub fn collision_groups(
    self,
    collision_groups: CollisionGroups
) -> ColliderDesc<N>
[src]

pub fn set_collision_groups(
    &mut self,
    collision_groups: CollisionGroups
) -> &mut ColliderDesc<N>
[src]

pub fn linear_prediction(self, linear_prediction: N) -> ColliderDesc<N>[src]

pub fn set_linear_prediction(
    &mut self,
    linear_prediction: N
) -> &mut ColliderDesc<N>
[src]

pub fn angular_prediction(self, angular_prediction: N) -> ColliderDesc<N>[src]

pub fn set_angular_prediction(
    &mut self,
    angular_prediction: N
) -> &mut ColliderDesc<N>
[src]

pub fn sensor(self, is_sensor: bool) -> ColliderDesc<N>[src]

pub fn set_is_sensor(&mut self, is_sensor: bool) -> &mut ColliderDesc<N>[src]

pub fn position(
    self,
    position: Isometry<N, U2, Unit<Complex<N>>>
) -> ColliderDesc<N>
[src]

pub fn set_position(
    &mut self,
    position: Isometry<N, U2, Unit<Complex<N>>>
) -> &mut ColliderDesc<N>
[src]

pub fn ccd_enabled(self, ccd_enabled: bool) -> ColliderDesc<N>[src]

pub fn set_ccd_enabled(&mut self, ccd_enabled: bool) -> &mut ColliderDesc<N>[src]

pub fn get_rotation(&self) -> N[src]

pub fn get_shape(&self) -> &(dyn Shape<N> + 'static)[src]

pub fn get_translation(
    &self
) -> &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
[src]

pub fn get_material(&self) -> Option<&(dyn Material<N> + 'static)>[src]

pub fn get_margin(&self) -> N[src]

pub fn get_density(&self) -> N[src]

pub fn get_collision_groups(&self) -> CollisionGroups[src]

pub fn get_linear_prediction(&self) -> N[src]

pub fn get_angular_prediction(&self) -> N[src]

pub fn is_sensor(&self) -> bool[src]

pub fn get_ccd_enabled(&self) -> bool[src]

pub fn get_position(&self) -> &Isometry<N, U2, Unit<Complex<N>>>[src]

pub fn build<Handle>(
    &self,
    parent_handle: BodyPartHandle<Handle>
) -> Collider<N, Handle> where
    Handle: BodyHandle
[src]

Build a collider and configure it to be attached to the given parent body part.

Auto Trait Implementations

impl<N> !RefUnwindSafe for ColliderDesc<N>

impl<N> Send for ColliderDesc<N> where
    N: Scalar

impl<N> Sync for ColliderDesc<N> where
    N: Scalar

impl<N> Unpin for ColliderDesc<N> where
    N: Scalar + Unpin

impl<N> !UnwindSafe for ColliderDesc<N>

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Event for T where
    T: Send + Sync + 'static, 

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

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

impl<T> Resource for T where
    T: Any, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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>,