| 49 | } |
| 50 | |
| 51 | MatrixFr BilinearInterpolation::interpolate_batch(const MatrixFr& pts) const { |
| 52 | const size_t num_pts = pts.rows(); |
| 53 | MatrixFr bilinear_coordinates(num_pts, 4); |
| 54 | for (size_t i=0; i<num_pts; i++) { |
| 55 | const VectorF& p = pts.row(i); |
| 56 | bilinear_coordinates.row(i) << |
| 57 | m_shape_functions[0](p), |
| 58 | m_shape_functions[1](p), |
| 59 | m_shape_functions[2](p), |
| 60 | m_shape_functions[3](p); |
| 61 | } |
| 62 | |
| 63 | return bilinear_coordinates * m_control_pts; |
| 64 | } |
| 65 |
no outgoing calls