MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / interpolate_batch

Method interpolate_batch

tools/Wires/Misc/BilinearInterpolation.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51MatrixFr 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

Callers 4

TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.36
TEST_FFunction · 0.36