Commit Graph

7 Commits (9aece3e84bcc5cc48c5af5177942b4f274c5d558)

Author SHA1 Message Date
Sergey Pereslavtsev 9aece3e84b LYN-8403 Prevent the same Surface Tag from getting reused
Signed-off-by: Sergey Pereslavtsev <pereslav@amazon.com>
4 years ago
Mike Balfour 95c0186d1b
Add GetHeights() and GetSurfaceWeightsFromList() APIs. (#7121)
These perform bulk queries of the underlying gradients which is much faster than performing a lot of individual queries.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
sphrose 93d6a0ef24 Move to development and add review fixes.
Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
4 years ago
Mike Balfour 86270339d8
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>
4 years ago
Mike Balfour 2fe4524458
Terrain API cleanups (#4914)
* Terrain API fixups
Moved SurfaceData definitions in AzFramework out of terrain into separate files.
Added some missing API calls: Get*FromVector2, GetSurfacePoint*
Changed OrderedSurfaceTagWeightSet to SurfaceTagWeightList

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

* PR feedback - remove IsClose check.

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

* Fixed PhysX test compile failures by redcoding a bunch of "dummy terrain" implementation that's unused.
It was originally added for the PhysX Terrain component, but that component is long gone and has been superceded by the more generic PhysX Heightfield Collider.

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

* Fixed up failing terrain unit tests.
Added API changes, and changed the assumption on where the surface weight sort is taking place.  The component is no longer expected to provide the sorted list, it only needs to be sorted at the end coming out of the terrain system, so the unit tests have been modified to reflect that.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Mike Balfour 4b6c93f289
Bugfixes for terrain surface data. (#4508)
* Bugfixes for terrain surface data.
1. Changed the TerrainSurfaceDataSystem component to query for all the surface types, now that we have them.
2. Added dependency tracking to the TerrainSurfaceGradientList component so that it will refresh terrain data when any of its data changes.

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

* Addressed PR feedback

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
sphrose 4a4c93f866
Terrain/sphrose/surface gradient list component (#4409)
* cherry-pick conflict fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* Missed include file

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* review changes.

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* cherry-pick merge fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* review changes.

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* bug fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* review changes.

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* compile fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* compile fix

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
4 years ago