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

Method cookBVHStructure

physx/source/physxcooking/src/Cooking.cpp:494–514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
493
494bool Cooking::cookBVHStructure(const PxBVHStructureDesc& desc, PxOutputStream& stream) const
495{
496 PX_FPU_GUARD;
497
498 if(!desc.isValid())
499 {
500 #if PX_CHECKED
501 Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Cooking::createHeightField: user-provided heightfield descriptor is invalid!");
502 #endif
503 return false;
504 }
505
506 BVHStructureBuilder builder;
507 if(!builder.loadFromDesc(desc))
508 {
509 return false;
510 }
511
512 builder.save(stream, platformMismatch());
513 return true;
514}
515
516//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
517

Callers

nothing calls this directly

Calls 4

errorMethod · 0.80
isValidMethod · 0.45
loadFromDescMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected