MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Blast / stressDamage

Method stressDamage

samples/SampleBase/blast/BlastController.cpp:267–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267bool BlastController::stressDamage(ExtPxActor* actor, physx::PxVec3 position, physx::PxVec3 force)
268{
269 if (actor->getTkActor().getGraphNodeCount() > 1)
270 {
271 void* userData = actor->getFamily().userData;
272 if (userData)
273 {
274 ExtPxStressSolver* solver = reinterpret_cast<ExtPxStressSolver*>(userData);
275 solver->getSolver().addForce(*actor->getTkActor().getActorLL(), reinterpret_cast<const NvcVec3&>(position),
276 reinterpret_cast<const NvcVec3&>(force * m_impactDamageToStressFactor));
277 return true;
278 }
279 }
280
281 return false;
282}
283
284void BlastController::refreshImpactDamageSettings()
285{

Callers 2

DamageToolControllerMethod · 0.80

Calls 4

getFamilyMethod · 0.80
addForceMethod · 0.80
getActorLLMethod · 0.80
getGraphNodeCountMethod · 0.45

Tested by

no test coverage detected