Enum physx_sys::PxHitFlag

source ·
#[repr(i32)]
pub enum PxHitFlag { Position = 1, Normal = 2, Uv = 8, AssumeNoInitialOverlap = 16, AnyHit = 32, MeshMultiple = 64, MeshBothSides = 128, PreciseSweep = 256, Mtd = 512, FaceIndex = 1_024, Default = 1_027, ModifiableFlags = 464, }
Expand description

Scene query and geometry query behavior flags.

PxHitFlags are used for 3 different purposes:

  1. To request hit fields to be filled in by scene queries (such as hit position, normal, face index or UVs).
  2. Once query is completed, to indicate which fields are valid (note that a query may produce more valid fields than requested).
  3. To specify additional options for the narrow phase and mid-phase intersection routines.

All these flags apply to both scene queries and geometry queries (PxGeometryQuery).

Variants§

§

Position = 1

“position” member of PxQueryHit is valid

§

Normal = 2

“normal” member of PxQueryHit is valid

§

Uv = 8

“u” and “v” barycentric coordinates of PxQueryHit are valid. Not applicable to sweep queries.

§

AssumeNoInitialOverlap = 16

Performance hint flag for sweeps when it is known upfront there’s no initial overlap. NOTE: using this flag may cause undefined results if shapes are initially overlapping.

§

AnyHit = 32

Report any first hit. Used for geometries that contain more than one primitive. For meshes, if neither eMESH_MULTIPLE nor eANY_HIT is specified, a single closest hit will be reported.

§

MeshMultiple = 64

Report all hits for meshes rather than just the first. Not applicable to sweep queries.

§

MeshBothSides = 128

Report hits with back faces of mesh triangles. Also report hits for raycast originating on mesh surface and facing away from the surface normal. Not applicable to sweep queries. Please refer to the user guide for heightfield-specific differences.

§

PreciseSweep = 256

Use more accurate but slower narrow phase sweep tests. May provide better compatibility with PhysX 3.2 sweep behavior.

§

Mtd = 512

Report the minimum translation depth, normal and contact point.

§

FaceIndex = 1_024

“face index” member of PxQueryHit is valid

§

Default = 1_027

§

ModifiableFlags = 464

Only this subset of flags can be modified by pre-filter. Other modifications will be discarded.

Trait Implementations§

source§

impl Clone for PxHitFlag

source§

fn clone(&self) -> PxHitFlag

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 PxHitFlag

source§

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

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

impl PartialEq for PxHitFlag

source§

fn eq(&self, other: &PxHitFlag) -> 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 PxHitFlag

source§

impl Eq for PxHitFlag

source§

impl StructuralEq for PxHitFlag

source§

impl StructuralPartialEq for PxHitFlag

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.