| 1089 | } |
| 1090 | |
| 1091 | void PhysicsWorld::afterSimulation(Node* node, const Mat4& parentToWorldTransform, float parentRotation) |
| 1092 | { |
| 1093 | auto nodeToWorldTransform = parentToWorldTransform * node->getNodeToParentTransform(); |
| 1094 | auto nodeRotation = parentRotation + node->getRotation(); |
| 1095 | |
| 1096 | auto physicsBody = node->getPhysicsBody(); |
| 1097 | if (physicsBody) |
| 1098 | { |
| 1099 | physicsBody->afterSimulation(parentToWorldTransform, parentRotation); |
| 1100 | } |
| 1101 | |
| 1102 | for (auto&& child : node->getChildren()) |
| 1103 | afterSimulation(child, nodeToWorldTransform, nodeRotation); |
| 1104 | } |
| 1105 | |
| 1106 | void PhysicsWorld::setPostUpdateCallback(const std::function<void()>& callback) |
| 1107 | { |
nothing calls this directly
no test coverage detected