| 861 | } |
| 862 | |
| 863 | void Terrain::OnEnable() |
| 864 | { |
| 865 | GetScene()->Navigation.Actors.Add(this); |
| 866 | GetSceneRendering()->AddActor(this, _sceneRenderingKey); |
| 867 | #if TERRAIN_USE_PHYSICS_DEBUG |
| 868 | GetSceneRendering()->AddPhysicsDebug(this); |
| 869 | #endif |
| 870 | void* scene = GetPhysicsScene()->GetPhysicsScene(); |
| 871 | for (int32 i = 0; i < _patches.Count(); i++) |
| 872 | { |
| 873 | auto patch = _patches[i]; |
| 874 | if (patch->_physicsActor) |
| 875 | PhysicsBackend::AddSceneActor(scene, patch->_physicsActor); |
| 876 | } |
| 877 | |
| 878 | // Base |
| 879 | Actor::OnEnable(); |
| 880 | } |
| 881 | |
| 882 | void Terrain::OnDisable() |
| 883 | { |
nothing calls this directly
no test coverage detected