| 69 | } |
| 70 | |
| 71 | VEC PointWeights(void) // return point weights from LANDMARK_INFO_TAB |
| 72 | { |
| 73 | // default to all points have a weight of 1 |
| 74 | VEC pointweights(MAX(stasm_NLANDMARKS, NELEMS(LANDMARK_INFO_TAB)), 1, 1.); |
| 75 | |
| 76 | if (stasm_NLANDMARKS != NELEMS(LANDMARK_INFO_TAB)) |
| 77 | { |
| 78 | // It's safest to fix this problem and rebuild stasm and tasm. But this is |
| 79 | // a lprintf_always instead of Err to allow tasm to run, to avoid a catch-22 |
| 80 | // situation where we can't create a new model with tasm but don't want the |
| 81 | // old model. |
| 82 | lprintf_always( |
| 83 | "Warning: PointWeights: all points weighted as 1 because " |
| 84 | "stasm_NLANDMARKS %d does not match NELEMS(LANDMARK_INFO_TAB) %d\n", |
| 85 | stasm_NLANDMARKS, NELEMS(LANDMARK_INFO_TAB)); |
| 86 | } |
| 87 | else for (int i = 0; i < NELEMS(LANDMARK_INFO_TAB); i++) |
| 88 | pointweights(i) = LANDMARK_INFO_TAB[i].weight; |
| 89 | |
| 90 | return pointweights; |
| 91 | } |
| 92 | |
| 93 | // wrapper around ConformShapeToMod above |
| 94 |
no test coverage detected