void LinkedPhysicsEntity::setEnvironment(Environment* env) { Entity::setEnvironment(env); if (!addedToSimulation) { initializeJoints(); Physics* physicsModule = (Physics*)SystemCore::getModuleByName("Physics"); assert(physicsModule); physicsModule->addPhysicsObject(this); addedToSimulation = true; } // if } // setEnvironment
void ArticulatedPhysicsEntity::setEnvironment(Environment* env) { Entity::setEnvironment(env); if (articulatedBody && !addedToSimulation) { Physics* physicsModule = (Physics*)SystemCore::getModuleByName("Physics"); assert(physicsModule); physicsModule->addPhysicsObject(this); addedToSimulation = true; } // if } // setEnvironment