| 152 | } |
| 153 | |
| 154 | void VisjectExecutor::ProcessGroupMath(Box* box, Node* node, Value& value) |
| 155 | { |
| 156 | switch (node->TypeID) |
| 157 | { |
| 158 | // Add, Subtract, Multiply, Divide, Modulo, Max, Min, Pow, Fmod, Atan2 |
| 159 | case 1: |
| 160 | case 2: |
| 161 | case 3: |
| 162 | case 4: |
| 163 | case 5: |
| 164 | case 21: |
| 165 | case 22: |
| 166 | case 23: |
| 167 | case 40: |
| 168 | case 41: |
| 169 | { |
| 170 | auto b1 = node->GetBox(0); |
| 171 | Value v1 = tryGetValue(b1, 0, Value::Zero); |
| 172 | Value v2 = tryGetValue(node->GetBox(1), 1, Value::Zero); |
| 173 | if (b1->HasConnection()) |
| 174 | v2 = v2.Cast(v1.Type); |
| 175 | else |
| 176 | v1 = v1.Cast(v2.Type); |
| 177 | GraphUtilities::ApplySomeMathHere(node->TypeID, value, v1, v2); |
| 178 | break; |
| 179 | } |
| 180 | // Absolute Value, Ceil, Cosine, Floor, Round, Saturate, Sine, Sqrt, Tangent, Negate, 1 - Value, Asine, Acosine, Atan, Trunc, Frac, Degrees, Radians |
| 181 | case 7: |
| 182 | case 8: |
| 183 | case 9: |
| 184 | case 10: |
| 185 | case 13: |
| 186 | case 14: |
| 187 | case 15: |
| 188 | case 16: |
| 189 | case 17: |
| 190 | case 27: |
| 191 | case 28: |
| 192 | case 33: |
| 193 | case 34: |
| 194 | case 35: |
| 195 | case 38: |
| 196 | case 39: |
| 197 | case 43: |
| 198 | case 44: |
| 199 | { |
| 200 | Value v1 = tryGetValue(node->GetBox(0), Value::Zero); |
| 201 | GraphUtilities::ApplySomeMathHere(node->TypeID, value, v1); |
| 202 | break; |
| 203 | } |
| 204 | // Length, Normalize |
| 205 | case 11: |
| 206 | case 12: |
| 207 | { |
| 208 | Value v1 = tryGetValue(node->GetBox(0), Value::Zero); |
| 209 | switch (node->TypeID) |
| 210 | { |
| 211 | case 11: |
nothing calls this directly
no test coverage detected