Enum physx_sys::PxQueryHitType
source · #[repr(i32)]
pub enum PxQueryHitType {
None,
Touch,
Block,
}
Expand description
Classification of scene query hits (intersections).
- eNONE: Returning this hit type means that the hit should not be reported.
- eBLOCK: For all raycast, sweep and overlap queries the nearest eBLOCK type hit will always be returned in PxHitCallback::block member.
- eTOUCH: Whenever a raycast, sweep or overlap query was called with non-zero PxHitCallback::nbTouches and PxHitCallback::touches parameters, eTOUCH type hits that are closer or same distance (touchDistance < = blockDistance condition) as the globally nearest eBLOCK type hit, will be reported.
- For example, to record all hits from a raycast query, always return eTOUCH.
All hits in overlap() queries are treated as if the intersection distance were zero. This means the hits are unsorted and all eTOUCH hits are recorded by the callback even if an eBLOCK overlap hit was encountered. Even though all overlap() blocking hits have zero length, only one (arbitrary) eBLOCK overlap hit is recorded in PxHitCallback::block. All overlap() eTOUCH type hits are reported (zero touchDistance < = zero blockDistance condition).
For raycast/sweep/overlap calls with zero touch buffer or PxHitCallback::nbTouches member, only the closest hit of type eBLOCK is returned. All eTOUCH hits are discarded.
Variants§
None
the query should ignore this shape
Touch
a hit on the shape touches the intersection geometry of the query but does not block it
Block
a hit on the shape blocks the query (does not block overlap queries)
Trait Implementations§
source§impl Clone for PxQueryHitType
impl Clone for PxQueryHitType
source§fn clone(&self) -> PxQueryHitType
fn clone(&self) -> PxQueryHitType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PxQueryHitType
impl Debug for PxQueryHitType
source§impl PartialEq<PxQueryHitType> for PxQueryHitType
impl PartialEq<PxQueryHitType> for PxQueryHitType
source§fn eq(&self, other: &PxQueryHitType) -> bool
fn eq(&self, other: &PxQueryHitType) -> bool
self
and other
values to be equal, and is used
by ==
.