MCPcopy Create free account
hub / github.com/axmolengine/axmol / afterSimulation

Method afterSimulation

core/physics/PhysicsWorld.cpp:1091–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089}
1090
1091void 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
1106void PhysicsWorld::setPostUpdateCallback(const std::function<void()>& callback)
1107{

Callers

nothing calls this directly

Calls 2

getRotationMethod · 0.45

Tested by

no test coverage detected