| 492 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 493 | |
| 494 | bool 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 |
nothing calls this directly
no test coverage detected