MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ProcessGroupBitwise

Method ProcessGroupBitwise

Source/Engine/Visject/VisjectGraph.cpp:1164–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164void VisjectExecutor::ProcessGroupBitwise(Box* box, Node* node, Value& value)
1165{
1166 switch (node->TypeID)
1167 {
1168 // NOT
1169 case 1:
1170 {
1171 const int32 a = (int32)tryGetValue(node->GetBox(0), Value(0));
1172 value = !a;
1173 break;
1174 }
1175 // AND, OR, XOR
1176 case 2:
1177 case 3:
1178 case 4:
1179 {
1180 const int32 a = (int32)tryGetValue(node->GetBox(0), 0, node->Values[0]);
1181 const int32 b = (int32)tryGetValue(node->GetBox(1), 1, node->Values[1]);
1182 int32 result = 0;
1183 switch (node->TypeID)
1184 {
1185 // AND
1186 case 2:
1187 result = a & b;
1188 break;
1189 // OR
1190 case 3:
1191 result = a | b;
1192 break;
1193 // XOR
1194 case 4:
1195 result = a ^ b;
1196 break;
1197 }
1198 value = result;
1199 break;
1200 }
1201 default:
1202 break;
1203 }
1204}
1205
1206void VisjectExecutor::ProcessGroupComparisons(Box* box, Node* node, Value& value)
1207{

Callers

nothing calls this directly

Calls 2

ValueEnum · 0.85
GetBoxMethod · 0.45

Tested by

no test coverage detected