MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / setFlag

Method setFlag

physx/source/physx/src/NpConstraint.cpp:239–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237
238
239void NpConstraint::setFlag(PxConstraintFlag::Enum flag, bool value)
240{
241 NP_WRITE_CHECK(getNpScene());
242
243 // check for eBROKEN which is a read only flag
244 PX_CHECK_AND_RETURN(flag != PxConstraintFlag::eBROKEN, "PxConstraintFlag::eBROKEN is a read only flag");
245
246 PX_CHECK_AND_RETURN(flag != PxConstraintFlag::eGPU_COMPATIBLE, "PxConstraintFlag::eGPU_COMPATIBLE is an internal flag and is illegal to set via the API");
247
248 PX_SIMD_GUARD;
249
250 PxConstraintFlags f = mConstraint.getFlags();
251
252 mConstraint.setFlags(value ? f|flag : f&~flag);
253}
254
255
256void NpConstraint::getForce(PxVec3& linear, PxVec3& angular) const

Callers

nothing calls this directly

Calls 3

getNpSceneFunction · 0.85
getFlagsMethod · 0.45
setFlagsMethod · 0.45

Tested by

no test coverage detected