#[repr(i32)]
pub enum PxConvexFlag { E16BitIndices = 1, ComputeConvex = 2, CheckZeroAreaTriangles = 4, QuantizeInput = 8, DisableMeshValidation = 16, PlaneShifting = 32, FastInertiaComputation = 64, GpuCompatible = 128, ShiftVertices = 256, }
Expand description

Flags which describe the format and behavior of a convex mesh.

Variants§

§

E16BitIndices = 1

Denotes the use of 16-bit vertex indices in PxConvexMeshDesc::triangles or PxConvexMeshDesc::polygons. (otherwise, 32-bit indices are assumed)

§

ComputeConvex = 2

Automatically recomputes the hull from the vertices. If this flag is not set, you must provide the entire geometry manually.

There are two different algorithms for hull computation, please see PxConvexMeshCookingType.

§

CheckZeroAreaTriangles = 4

Checks and removes almost zero-area triangles during convex hull computation. The rejected area size is specified in PxCookingParams::areaTestEpsilon

This flag is only used in combination with eCOMPUTE_CONVEX.

§

QuantizeInput = 8

Quantizes the input vertices using the k-means clustering

The input vertices are quantized to PxConvexMeshDesc::quantizedCount see http://en.wikipedia.org/wiki/K-means_clustering

§

DisableMeshValidation = 16

Disables the convex mesh validation to speed-up hull creation. Please use separate validation function in checked/debug builds. Creating a convex mesh with invalid input data without prior validation may result in undefined behavior.

§

PlaneShifting = 32

Enables plane shifting vertex limit algorithm.

Plane shifting is an alternative algorithm for the case when the computed hull has more vertices than the specified vertex limit.

The default algorithm computes the full hull, and an OBB around the input vertices. This OBB is then sliced with the hull planes until the vertex limit is reached.The default algorithm requires the vertex limit to be set to at least 8, and typically produces results that are much better quality than are produced by plane shifting.

When plane shifting is enabled, the hull computation stops when vertex limit is reached. The hull planes are then shifted to contain all input vertices, and the new plane intersection points are then used to generate the final hull with the given vertex limit.Plane shifting may produce sharp edges to vertices very far away from the input cloud, and does not guarantee that all input vertices are inside the resulting hull.However, it can be used with a vertex limit as low as 4.

§

FastInertiaComputation = 64

Inertia tensor computation is faster using SIMD code, but the precision is lower, which may result in incorrect inertia for very thin hulls.

§

GpuCompatible = 128

Convex hulls are created with respect to GPU simulation limitations. Vertex limit and polygon limit is set to 64 and vertex limit per face is internally set to 32.

Can be used only with eCOMPUTE_CONVEX flag.

§

ShiftVertices = 256

Convex hull input vertices are shifted to be around origin to provide better computation stability. It is recommended to provide input vertices around the origin, otherwise use this flag to improve numerical stability.

Is used only with eCOMPUTE_CONVEX flag.

Trait Implementations§

source§

impl Clone for PxConvexFlag

source§

fn clone(&self) -> PxConvexFlag

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PxConvexFlag

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for PxConvexFlag

source§

fn eq(&self, other: &PxConvexFlag) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for PxConvexFlag

source§

impl Eq for PxConvexFlag

source§

impl StructuralEq for PxConvexFlag

source§

impl StructuralPartialEq for PxConvexFlag

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.