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:
@@ -47,7 +47,8 @@ namespace Terrain
|
||||
|
||||
void RegisterArea(AZ::EntityId areaId) override;
|
||||
void UnregisterArea(AZ::EntityId areaId) override;
|
||||
void RefreshArea(AZ::EntityId areaId) override;
|
||||
void RefreshArea(
|
||||
AZ::EntityId areaId, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask changeMask) override;
|
||||
|
||||
///////////////////////////////////////////
|
||||
// TerrainDataRequestBus::Handler Impl
|
||||
@@ -164,6 +165,7 @@ namespace Terrain
|
||||
|
||||
bool m_terrainSettingsDirty = true;
|
||||
bool m_terrainHeightDirty = false;
|
||||
bool m_terrainSurfacesDirty = false;
|
||||
AZ::Aabb m_dirtyRegion;
|
||||
|
||||
mutable AZStd::shared_mutex m_areaMutex;
|
||||
|
||||
Reference in New Issue
Block a user