----------------------------------- PlanetInit::OnComponentAdded Register planets in the render scene when they are added to the ECS
| 20 | // Register planets in the render scene when they are added to the ECS |
| 21 | // |
| 22 | void PlanetInit::OnComponentAdded(EcsController& controller, PlanetComponent& component, T_EntityId const entity) |
| 23 | { |
| 24 | TransformComponent& transf = controller.GetComponent<TransformComponent>(entity); |
| 25 | transf.SetRotation(transf.GetRotation() * quat(vec3(0.0f, 1.0f, 0.0f), math::radians(270.f))); |
| 26 | |
| 27 | component.m_PlanetId = UnifiedScene::Instance().GetRenderScene().AddPlanet(component.m_Params, transf.GetNodeId()); |
| 28 | } |
| 29 | |
| 30 | //------------------------------------- |
| 31 | // PlanetInit::OnComponentRemoved |
nothing calls this directly
no test coverage detected