MCPcopy Create free account
hub / github.com/Kitware/VTK / iterateSimplex

Function iterateSimplex

Common/DataModel/vtkBezierInterpolation.cxx:142–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void iterateSimplex(int dim, int deg, std::function<void(vtkVector3i, int)> callback)
143{
144 switch (dim)
145 {
146 case 1:
147 {
148 for (int i = 0, nfuncs = deg + 1; i < nfuncs; ++i)
149 {
150 callback({ i, 0, 0 }, i);
151 }
152 }
153 break;
154 case 2:
155 {
156 for (int i = 0, nfuncs = ((deg + 1) * (deg + 2) / 2); i < nfuncs; ++i)
157 {
158 callback(vtkBezierInterpolation::UnFlattenSimplex(2, deg, i), i);
159 }
160 }
161 break;
162 case 3:
163 {
164 for (int i = 0, nfuncs = ((deg + 1) * (deg + 2) * (deg + 3) / 6); i < nfuncs; ++i)
165 {
166 callback(vtkBezierInterpolation::UnFlattenSimplex(3, deg, i), i);
167 }
168 }
169 break;
170 }
171}
172
173// FIXME this could be greatly optimized
174void vtkBezierInterpolation::DeCasteljauSimplex(

Callers 1

DeCasteljauSimplexMethod · 0.85

Calls 1

callbackClass · 0.50

Tested by

no test coverage detected