Making terrain query resolution a single float instead of a Vector2 (#7186)

* Making terrain query resolution a single float instead of a Vector2

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Keeping the concept of different x/y step sizes in region queries since that may be useful and is separate from query resolution. Also keeping the concept of different x/y step sizes in physics since that's independent of the terrain gem.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Formatting cleanups

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* A few more minor cleanups

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Added support to convert serialized Vector2 query resolution to a single float.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Switch ray intersection check back to using separate values for x and y resolution

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Fixing new unit tests added to use float query resolution.

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>

* Updating automated test

Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
This commit is contained in:
Ken Pruiksma
2022-01-31 16:10:03 -06:00
committed by GitHub
parent 0a5e61b834
commit b455b915a8
23 changed files with 167 additions and 109 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ namespace PhysX
{
physx::PxHeightField* heightfield = nullptr;
const AZ::Vector2 gridSpacing = heightfieldConfig.GetGridResolution();
const AZ::Vector2& gridSpacing = heightfieldConfig.GetGridResolution();
const int32_t numCols = heightfieldConfig.GetNumColumns();
const int32_t numRows = heightfieldConfig.GetNumRows();