MCPcopy Create free account
hub / github.com/assimp/assimp / ParseSkeletonSection

Method ParseSkeletonSection

code/AssetLib/SMD/SMDLoader.cpp:806–829  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------ Parse the skeleton section of the file

Source from the content-addressed store, hash-verified

804// ------------------------------------------------------------------------------------------------
805// Parse the skeleton section of the file
806void SMDImporter::ParseSkeletonSection(const char *szCurrent, const char **szCurrentOut, const char *end) {
807 int iTime = 0;
808 for ( ;; ) {
809 if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent, end)) {
810 break;
811 }
812
813 // "end\n" - Ends the skeleton section
814 if (TokenMatch(szCurrent,"end",3)) {
815 break;
816 } else if (TokenMatch(szCurrent,"time",4)) {
817 // "time <n>\n" - Specifies the current animation frame
818 if (!ParseSignedInt(szCurrent, &szCurrent, end, iTime)) {
819 break;
820 }
821
822 iSmallestFrame = std::min(iSmallestFrame,iTime);
823 SkipLine(szCurrent, &szCurrent, end);
824 } else {
825 ParseSkeletonElement(szCurrent, &szCurrent, end, iTime);
826 }
827 }
828 *szCurrentOut = szCurrent;
829}
830
831// ------------------------------------------------------------------------------------------------
832#define SMDI_PARSE_RETURN { \

Callers

nothing calls this directly

Calls 5

TokenMatchFunction · 0.85
ParseSignedIntFunction · 0.85
SkipSpacesAndLineEndFunction · 0.70
SkipLineFunction · 0.70
minFunction · 0.50

Tested by

no test coverage detected