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

Function FlipPoint

jni/stasm/landmarks.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48static void FlipPoint(
49 Shape& shape, // io
50 const Shape& oldshape, // in
51 int inew, // in
52 int iold, // in
53 int imgwidth) // in
54{
55 if (!PointUsed(oldshape, iold))
56 shape(inew, IX) = shape(inew, IY) = 0;
57 else
58 {
59 shape(inew, IX) = imgwidth - oldshape(iold, IX) - 1;
60 shape(inew, IY) = oldshape(iold, IY);
61 if (!PointUsed(shape, inew)) // falsely marked unused after conversion?
62 shape(inew, IX) = XJITTER; // adjust so not marked as unused
63 }
64}
65
66// Flip shape horizontally.
67// Needed so we can use right facing models for left facing faces.

Callers 1

FlipShapeFunction · 0.85

Calls 1

PointUsedFunction · 0.85

Tested by

no test coverage detected