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

Method validateTriangleMesh

physx/source/physxcooking/src/Cooking.cpp:94–108  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

92
93///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
94bool Cooking::validateTriangleMesh(const PxTriangleMeshDesc& desc) const
95{
96 // cooking code does lots of float bitwise reinterpretation that generates exceptions
97 PX_FPU_GUARD;
98
99 if(!desc.isValid())
100 {
101 Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "Cooking::validateTriangleMesh: user-provided triangle mesh descriptor is invalid!");
102 return false;
103 }
104
105 // PT: validation code doesn't look at midphase data, so ideally we wouldn't build the midphase structure at all here.
106 BV4TriangleMeshBuilder builder(mParams);
107 return builder.loadFromDesc(desc, NULL, true /*doValidate*/);
108}
109
110///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
111

Callers 2

createBV33TriangleMeshFunction · 0.80
createBV34TriangleMeshFunction · 0.80

Calls 3

errorMethod · 0.80
isValidMethod · 0.45
loadFromDescMethod · 0.45

Tested by

no test coverage detected