64 void removeFromAggregate(
PxActor& owner);
71 void removeConstraintsFromScene();
75 addConstraintsToSceneInternal();
78 PxU32 findConnector(NpConnectorType::Enum type,
PxBase*
object)
const;
79 void addConnector(NpConnectorType::Enum type,
PxBase*
object,
const char* errMsg);
80 void removeConnector(
PxActor& owner, NpConnectorType::Enum type,
PxBase*
object,
const char* errorMsg);
81 PxU32 getNbConnectors(NpConnectorType::Enum type)
const;
86 static NpActor& getFromPxActor(
PxActor& actor) {
return *PxPointerOffset<NpActor*>(&actor, ptrdiff_t(sOffsets.pxActorToNpActor[actor.getConcreteType()])); }
87 static const NpActor& getFromPxActor(
const PxActor& actor) {
return *PxPointerOffset<const NpActor*>(&actor, ptrdiff_t(sOffsets.pxActorToNpActor[actor.getConcreteType()])); }
89 const PxActor* getPxActor()
const;
93 return getFromPxActor(actor).getNpScene();
104 static void onActorRelease(
PxActor* actor);
106 template<
typename T> PxU32 getConnectors(NpConnectorType::Enum type, T** userBuffer, PxU32 bufferSize, PxU32 startIndex=0)
const
108 PxU32 nbConnectors = 0;
111 for(PxU32 i=0; i<mConnectorArray->
size(); i++)
114 if(c.mType == type && nbConnectors < bufferSize && i>=startIndex)
115 userBuffer[nbConnectors++] =
static_cast<T*
>(c.mObject);
127 PX_ASSERT(!isAPIWriteForbidden());
132 const NpType::Enum npType = getNpType();
134 (npType != NpType::eBODY) && (npType != NpType::eRIGID_STATIC))
137 "PxActor::setActorFlag: PxActorFlag::eDISABLE_SIMULATION is only supported by PxRigidDynamic and PxRigidStatic objects.");
140 getActorCore().setActorFlags(v);
147 return *
reinterpret_cast<const Sc::ActorCore*
>(size_t(
this) + sNpOffsets.npToSc[getNpType()]);
151 return *
reinterpret_cast<Sc::ActorCore*
>(size_t(
this) + sNpOffsets.npToSc[getNpType()]);
167 if(scene && (!scene->isAPIWriteForbidden()))
168 scene->scSwitchRigidToNoSim(*
this);
175 if(scene && (!scene->isAPIWriteForbidden()))
176 scene->scSwitchRigidFromNoSim(*
this);
185 void addConstraintsToSceneInternal();
186 void removeConnector(
PxActor& owner, PxU32 index);
189 size_t pxActorToNpActor[PxConcreteType::ePHYSX_CORE_COUNT];
193 static const Offsets sOffsets;
197 size_t npToSc[NpType::eTYPE_COUNT];
Binary deserialization context class.
Definition PxSerialFramework.h:174
Binary serialization context class.
Definition PxSerialFramework.h:99
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation &PX_CALL_CONV PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
Definition FdFoundation.cpp:279
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39