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

Function readRoot

physx/samples/samplebase/AcclaimLoader.cpp:320–349  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

318
319///////////////////////////////////////////////////////////////////////////////
320static bool readRoot(SampleFileBuffer& buffer, Acclaim::ASFData& data)
321{
322 using namespace Acclaim;
323
324 char token[MAX_TOKEN_LENGTH];
325
326 while (buffer.getNextTokenButMarker(token) == true)
327 {
328 if (strcmp(token, "order") == 0)
329 buffer.skipUntilNextLine();
330 else if (strcmp(token, "axis") == 0)
331 buffer.skipUntilNextLine();
332 else if (strcmp(token, "position") == 0)
333 {
334 if (buffer.getNextVec3(data.mRoot.mPosition) == false)
335 return false;
336 }
337 else if (strcmp(token, "orientation") == 0)
338 {
339 if (buffer.getNextVec3(data.mRoot.mOrientation) == false)
340 return false;
341 }
342 else
343 {
344 buffer.skipUntilNextLine();
345 }
346 }
347
348 return true;
349}
350
351///////////////////////////////////////////////////////////////////////////////
352static bool readBone(SampleFileBuffer& buffer, Acclaim::Bone& bone)

Callers 1

readASFDataMethod · 0.85

Calls 4

strcmpFunction · 0.85
getNextTokenButMarkerMethod · 0.80
skipUntilNextLineMethod · 0.80
getNextVec3Method · 0.80

Tested by

no test coverage detected