29#ifndef SC_TRIGGER_INTERACTION_H
30#define SC_TRIGGER_INTERACTION_H
32#include "ScElementSimInteraction.h"
33#include "ScShapeSim.h"
34#include "GuOverlapTests.h"
46 NEXT_FREE = ((PAIR_FLAGS_MASK << 1) & ~PAIR_FLAGS_MASK),
48 PROCESS_THIS_FRAME = (NEXT_FREE << 0),
53 LAST = (NEXT_FREE << 1)
63 PX_FORCE_INLINE bool lastFrameHadContacts()
const {
return mLastFrameHadContacts; }
64 PX_FORCE_INLINE void updateLastFrameHadContacts(
bool hasContact) { mLastFrameHadContacts = hasContact; }
71 PX_FORCE_INLINE PxIntBool readFlag(TriggerFlag flag)
const {
return PxIntBool(mFlags & flag); }
75 bool onActivate_(
void*);
80 bool mLastFrameHadContacts;
93 PX_WARN_ONCE(
"Trigger pairs do not support PxPairFlag::eNOTIFY_TOUCH_PERSISTS events any longer.");
97 PxU32 newFlags = mFlags;
99 newFlags &= (~PAIR_FLAGS_MASK);
105PX_FORCE_INLINE void Sc::TriggerInteraction::forceProcessingThisFrame(Sc::Scene& scene)
107 raiseFlag(PROCESS_THIS_FRAME);
109 if (!readInteractionFlag(InteractionFlag::eIS_ACTIVE))
111 raiseInteractionFlag(InteractionFlag::eIS_ACTIVE);
112 scene.notifyInteractionActivated(
this);
Definition ScElementSimInteraction.h:40
Definition ScShapeSimBase.h:54
Definition ScTriggerInteraction.h:41
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PxFlags< PxPairFlag::Enum, PxU16 > PxPairFlags
Bitfield that contains a set of raised flags defined in PxPairFlag.
Definition PxFiltering.h:277
Definition GuOverlapTests.h:59
@ eDETECT_CCD_CONTACT
This flag is used to indicate whether this pair generates CCD contacts.
Definition PxFiltering.h:216
@ eNOTIFY_TOUCH_LOST
Call contact report callback or trigger callback when this collision pair stops to be in contact.
Definition PxFiltering.h:125
@ eNOTIFY_TOUCH_FOUND
Call contact report callback or trigger callback when this collision pair starts to be in contact.
Definition PxFiltering.h:87
@ eNOTIFY_TOUCH_PERSISTS
Call contact report callback while this collision pair is in contact.
Definition PxFiltering.h:107