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
impl PxCooking
sourcepub fn new(
foundation: &mut impl Foundation,
params: &PxCookingParams
) -> Option<Owner<Self>>
pub fn new( foundation: &mut impl Foundation, params: &PxCookingParams ) -> Option<Owner<Self>>
Create a new cooking instance.
sourcepub fn create_bvh(
&self,
physics: &mut impl Physics,
desc: &PxBVHDesc
) -> Option<Owner<Bvh>>
pub fn create_bvh( &self, physics: &mut impl Physics, desc: &PxBVHDesc ) -> Option<Owner<Bvh>>
Cook a new BVH
sourcepub fn create_convex_mesh(
&self,
physics: &mut impl Physics,
desc: &PxConvexMeshDesc
) -> ConvexMeshCookingResult
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.
sourcepub fn create_height_field(
&self,
physics: &mut impl Physics,
desc: &PxHeightFieldDesc
) -> Option<Owner<HeightField>>
pub fn create_height_field( &self, physics: &mut impl Physics, desc: &PxHeightFieldDesc ) -> Option<Owner<HeightField>>
Cook a new height field.
sourcepub fn create_triangle_mesh(
&self,
physics: &mut impl Physics,
desc: &PxTriangleMeshDesc
) -> TriangleMeshCookingResult
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.
sourcepub fn validate_convex_mesh(&self, desc: &PxConvexMeshDesc) -> bool
pub fn validate_convex_mesh(&self, desc: &PxConvexMeshDesc) -> bool
Validate a convex mesh descriptor.
sourcepub fn validate_triangle_mesh(&self, desc: &PxTriangleMeshDesc) -> bool
pub fn validate_triangle_mesh(&self, desc: &PxTriangleMeshDesc) -> bool
Validate a triangle mesh descriptor.
Trait Implementations§
source§impl Class<PxCooking> for PxCooking
impl Class<PxCooking> for PxCooking
source§fn as_ptr(&self) -> *const PxCooking
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
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.