| 271 | } |
| 272 | |
| 273 | void Selection::Add(int vi, byte weigth) |
| 274 | { |
| 275 | bool weighted = _weights.Size() > 0; |
| 276 | |
| 277 | Buffer<VertexIndex> temp(_sel.Size() + 1); |
| 278 | Buffer<VertexIndex> tempW(_sel.Size() + 1); |
| 279 | int i = 0; |
| 280 | while (i < _sel.Size()) |
| 281 | { |
| 282 | if (_sel[i] > vi) |
| 283 | { |
| 284 | break; |
| 285 | } |
| 286 | temp[i] = _sel[i]; |
| 287 | if (weighted) |
| 288 | { |
| 289 | tempW[i] = _weights[i]; |
| 290 | } |
| 291 | i++; |
| 292 | } |
| 293 | temp[i] = vi; |
| 294 | while (i < _sel.Size()) |
| 295 | { |
| 296 | temp[i + 1] = _sel[i]; |
| 297 | if (weighted) |
| 298 | { |
| 299 | tempW[i + 1] = _weights[i]; |
| 300 | } |
| 301 | i++; |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | NamedSelection::NamedSelection(const char* name, const SelInfo* points, int nPoints, const VertexIndex* faces, |
| 306 | int nFaces) |
no test coverage detected