Added terrain surface data notifications (#5067)

* Fix notifications for surface data changes.
Separated the notifications from the surface component and the height component to add a reason to a RefreshArea request.  This makes it possible to distinguish between surface changes and height changes and provide the appropriate OnTerrainDataChanged flags.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Reworked to use a changeMask instead of separate calls.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* PR Feedback
Judicious use of "using" to reduce a bunch of bulky namespaces.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
Mike Balfour
2021-10-28 16:17:38 -05:00
committed by GitHub
parent 00a49fa251
commit 86270339d8
9 changed files with 52 additions and 19 deletions
@@ -184,7 +184,9 @@ namespace Terrain
void TerrainSurfaceGradientListComponent::OnCompositionChanged()
{
TerrainSystemServiceRequestBus::Broadcast(&TerrainSystemServiceRequestBus::Events::RefreshArea, GetEntityId());
TerrainSystemServiceRequestBus::Broadcast(
&TerrainSystemServiceRequestBus::Events::RefreshArea, GetEntityId(),
AzFramework::Terrain::TerrainDataNotifications::SurfaceData);
}
} // namespace Terrain