Struct physx::cooking::PxCooking

source ·
pub struct PxCooking { /* private fields */ }
👎Deprecated since 0.15.0: The PxCooking interface has been deprecated, but for the initial upgrade to PhysX 5 we still support it
Expand description

A new-type wrapper around physx_sys::PxCooking.

Implementations§

source§

impl PxCooking

source

pub fn new( foundation: &mut impl Foundation, params: &PxCookingParams ) -> Option<Owner<Self>>

Create a new cooking instance.

source

pub fn create_bvh( &self, physics: &mut impl Physics, desc: &PxBVHDesc ) -> Option<Owner<Bvh>>

Cook a new BVH

source

pub fn create_convex_mesh( &self, physics: &mut impl Physics, desc: &PxConvexMeshDesc ) -> ConvexMeshCookingResult

Cook a new convex mesh using a mesh descriptor. The data provided in the mesh descriptor should be validated by PxCooking::validate_convex_mesh before being passed into this method.

source

pub fn create_height_field( &self, physics: &mut impl Physics, desc: &PxHeightFieldDesc ) -> Option<Owner<HeightField>>

Cook a new height field.

source

pub fn create_triangle_mesh( &self, physics: &mut impl Physics, desc: &PxTriangleMeshDesc ) -> TriangleMeshCookingResult

Cook a new triangle mesh using a mesh descriptor. The data provided in the mesh descriptor should be validated by PxCooking::validate_triangle_mesh before being passed into this method.

source

pub fn validate_convex_mesh(&self, desc: &PxConvexMeshDesc) -> bool

Validate a convex mesh descriptor.

source

pub fn validate_triangle_mesh(&self, desc: &PxTriangleMeshDesc) -> bool

Validate a triangle mesh descriptor.

Trait Implementations§

source§

impl Class<PxCooking> for PxCooking

source§

fn as_ptr(&self) -> *const PxCooking

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 PxCooking

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 Drop for PxCooking

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for PxCooking

source§

impl Sync for PxCooking

Auto Trait Implementations§

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