MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / stasm_convert_shape

Function stasm_convert_shape

jni/stasm/stasm_lib.cpp:306–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void stasm_convert_shape( // convert stasm_NLANDMARKS points to given number of points
307 float* landmarks, // io: return all points zero if can't do conversion
308 int nlandmarks) // in: see ConvertShape
309{
310 Shape newshape = ConvertShape(LandmarksAsShape(landmarks), nlandmarks);
311 if (newshape.rows)
312 ShapeToLandmarks(landmarks, newshape);
313 else // cannot convert, set all points to 0,0
314 for (int i = 0; i < stasm_NLANDMARKS; i++)
315 landmarks[i * 2] = landmarks[i * 2 + 1] = 0;
316}
317
318void stasm_printf( // print to stdout and to the stasm.log file if it is open
319 const char* format, // args like printf

Callers

nothing calls this directly

Calls 3

ConvertShapeFunction · 0.85
LandmarksAsShapeFunction · 0.85
ShapeToLandmarksFunction · 0.85

Tested by

no test coverage detected