Struct physx::shape::PxShape

source ·
#[repr(transparent)]
pub struct PxShape<U, M: Material> { /* private fields */ }
Expand description

A new type wrapper for PxShape. Parametrized by it’s user data type, and the type of it’s Material.

Trait Implementations§

source§

impl<S, U, M: Material> Class<S> for PxShape<U, M>where PxShape: Class<S>,

source§

fn as_ptr(&self) -> *const S

Returns a raw const pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

fn as_mut_ptr(&mut self) -> *mut S

Returns a raw mut pointer to the wrapped type. Retrieving a raw pointer is safe. However, pretty much any use of a raw pointer is unsafe. In particular: this pointer should not be used to construct a second owning wrapper around the pointer.
source§

impl<U, M: Material> Drop for PxShape<U, M>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<U, M: Material> Shape for PxShape<U, M>

§

type Material = M

source§

unsafe fn from_raw( ptr: *mut PxShape, user_data: Self::UserData ) -> Option<Owner<Self>>

Safety Read more
source§

fn get_user_data(&self) -> &Self::UserData

Get a reference to the user data.
source§

fn get_user_data_mut(&mut self) -> &mut Self::UserData

Get a mutable reference to the user data.
source§

fn set_simulation_filter_data( &mut self, this_layers: CollisionLayers, other_layers: CollisionLayers, word3: u32, word4: u32 )

Set the simulation (collision) filter of this shape
source§

fn get_simulation_filter_data(&self) -> PxFilterData

Read the collision filter data of this shape
source§

fn set_query_filter_data(&mut self, this_layers: CollisionLayers)

Set the query filter of this shape
source§

fn get_query_filter_data(&self) -> PxFilterData

Read the query filter data of this shape
source§

fn get_nb_materials(&self) -> u16

Get the number of materials associated with this shape
source§

fn get_materials(&self) -> Vec<&Self::Material>

Get a vector of all materials associated with this shape
source§

fn get_materials_mut(&mut self) -> Vec<&mut Self::Material>

Get a mut vector of all materials associated with this shape
source§

fn set_flag(&mut self, flag: ShapeFlag, enable: bool)

Toggle a flag on this shape
source§

fn set_flags(&mut self, flags: ShapeFlags)

Sets the flags on this shape to the specified bitset
source§

impl<U: Send, M: Material + Send> Send for PxShape<U, M>

source§

impl<U: Sync, M: Material + Send> Sync for PxShape<U, M>

Auto Trait Implementations§

§

impl<U, M> RefUnwindSafe for PxShape<U, M>where M: RefUnwindSafe, U: RefUnwindSafe,

§

impl<U, M> Unpin for PxShape<U, M>where M: Unpin, U: Unpin,

§

impl<U, M> UnwindSafe for PxShape<U, M>where M: UnwindSafe, U: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Base for Twhere T: Class<PxBase>,

source§

fn get_concrete_type_name(&self) -> Option<&str>

Get the name of the real type referenced by this pointer, or None if the returned string is not valid
source§

fn get_concrete_type(&self) -> ConcreteType

Returns an enumerated value identifying the type. Read more
source§

fn set_base_flag(&mut self, flag: BaseFlag, value: bool)

Set or unset the specified flag on this object.
source§

fn set_base_flags(&mut self, in_flags: BaseFlags)

Set the BaseFlags of this object. Note that replaces all flags currently on the object. Use set_base_flag to set individual flags.
source§

fn get_base_flags(&self) -> BaseFlags

Read the BaseFlags of this object
source§

fn is_releasable(&self) -> bool

Returns true if this object can be released, i.e., it is not subordinate.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> RefCounted for Twhere T: Class<PxRefCounted>,

source§

fn release(&mut self)

Decrements the reference count of the object and releases it if the new reference count is zero.
source§

fn get_reference_count(&self) -> u32

Returns the reference count of the object. Read more
source§

fn acquire_reference(&mut self)

Acquires a counted reference to this object. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.