| 94 | } |
| 95 | |
| 96 | Selection::Selection(const SelInfo* sel, int nSel) |
| 97 | { |
| 98 | if (nSel > 0) |
| 99 | { |
| 100 | _sel.Init(nSel); |
| 101 | // check if weight is singular |
| 102 | bool singular = true; |
| 103 | for (int i = 0; i < nSel; i++) |
| 104 | { |
| 105 | if (sel[i].weight < 254) |
| 106 | { |
| 107 | singular = false; |
| 108 | } |
| 109 | } |
| 110 | if (singular) |
| 111 | { |
| 112 | for (int i = 0; i < nSel; i++) |
| 113 | { |
| 114 | _sel[i] = sel[i].index; |
| 115 | } |
| 116 | } |
| 117 | else |
| 118 | { |
| 119 | _weights.Init(nSel); |
| 120 | for (int i = 0; i < nSel; i++) |
| 121 | { |
| 122 | _sel[i] = sel[i].index; |
| 123 | _weights[i] = sel[i].weight; |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | FaceSelection::FaceSelection() |
| 130 | { |