SurfaceData cleanups to prepare for bulk APIs (#7166)

* Initial cleanup of GetSurfacePointsFromRegion in prep for bulk API support.
* Removed the generated lookup point from the output structure. Nothing was using it, and by keeping it separate, I can pass it in as a list of points that can be passed throughout the terrain, gradient, and surface data APIs.
* Clarified on the SurfaceProvider bus that GetSurfacePoints() only gets valid XY values on the inPosition.
* Simplified the TerrainSurfaceDataSystemComponent implementation a bit.  The EnumerateHandlers() and the terrain Aabb checks were overkill. Also, the terrain Aabb check assumed that the Z value on the inPosition was valid, which it isn't always.

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

* Remove CryCommon dependency.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
Mike Balfour
2022-01-27 15:22:47 -06:00
committed by GitHub
parent 09ff46b445
commit c36b2fbbd6
11 changed files with 87 additions and 118 deletions
@@ -39,7 +39,9 @@ namespace SurfaceData
////////////////////////////////////////////////////////////////////////
// SurfaceDataSystemRequestBus implementation
void GetSurfacePoints(const AZ::Vector3& inPosition, const SurfaceTagVector& desiredTags, SurfacePointList& surfacePointList) const override;
void GetSurfacePointsFromRegion(const AZ::Aabb& inRegion, const AZ::Vector2 stepSize, const SurfaceTagVector& desiredTags, SurfacePointListPerPosition& surfacePointListPerPosition) const override;
void GetSurfacePointsFromRegion(
const AZ::Aabb& inRegion, const AZ::Vector2 stepSize, const SurfaceTagVector& desiredTags,
SurfacePointLists& surfacePointListPerPosition) const override;
SurfaceDataRegistryHandle RegisterSurfaceDataProvider(const SurfaceDataRegistryEntry& entry) override;
void UnregisterSurfaceDataProvider(const SurfaceDataRegistryHandle& handle) override;