Merge branch 'upstream/development' into LYN-8514_AutomatedReviewServerLogChecks

This commit is contained in:
Gene Walters
2021-11-30 14:34:42 -08:00
595 changed files with 16165 additions and 11658 deletions
@@ -46,11 +46,6 @@ namespace AZ::IO
"If set to 0, tells Archive to try to open the file on the file system first othewise check mounted paks.\n"
"If set to 1, tells Archive to try to open the file in pak first, then go to file system.\n"
"If set to 2, tells the Archive to only open files from the pak");
AZ_CVAR(int, sys_PakMessageInvalidFileAccess, ArchiveVars{}.nMessageInvalidFileAccess, nullptr, AZ::ConsoleFunctorFlags::Null,
"Message Box synchronous file access when in game");
AZ_CVAR(int, sys_PakWarnOnPakAccessFailures, ArchiveVars{}.nWarnOnPakAccessFails, nullptr, AZ::ConsoleFunctorFlags::Null,
"If 1, access failure for Paks is treated as a warning, if zero it is only a log message.");
AZ_CVAR(int, sys_report_files_not_found_in_paks, 0, nullptr, AZ::ConsoleFunctorFlags::Null,
"Reports when files are searched for in paks and not found. 1 = log, 2 = warning, 3 = error");
AZ_CVAR(int32_t, az_archive_verbosity, 0, nullptr, AZ::ConsoleFunctorFlags::Null,
@@ -9,8 +9,6 @@
#pragma once
#include <AzFramework/Archive/ArchiveVars_Platform.h>
namespace AZ::IO
{
enum class FileSearchPriority
@@ -39,25 +37,10 @@ namespace AZ::IO
#else
inline static constexpr bool IsReleaseConfig{};
#endif
int nReadSlice{};
int nSaveTotalResourceList{};
int nSaveFastloadResourceList{};
int nSaveMenuCommonResourceList{};
int nSaveLevelResourceList{};
int nValidateFileHashes{ IsReleaseConfig ? 0 : 1 };
int nUncachedStreamReads{ 1 };
int nInMemoryPerPakSizeLimit{ 6 }; // Limits in MB
int nTotalInMemoryPakSizeLimit{ 30 };
int nLoadCache{};
int nLoadModePaks{};
int nStreamCache{ STREAM_CACHE_DEFAULT };
FileSearchPriority m_fileSearchPriority{ GetDefaultFileSearchPriority()};
int nMessageInvalidFileAccess{};
int nLogInvalidFileAccess{ IsReleaseConfig ? 0 : 1 };
int nDisableNonLevelRelatedPaks{ 1 };
int nWarnOnPakAccessFails{ 1 }; // Whether to treat failed pak access as a warning or log message
int nSetLogLevel{ 3 };
int nLogAllFileAccess{};
};
}
@@ -26,10 +26,11 @@ namespace AzFramework::Terrain
->Event("GetSurfaceWeights", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeights)
->Event("GetSurfaceWeightsFromVector2",
&AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfaceWeightsFromVector2)
->Event("GetIsHole", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHole)
->Event("GetIsHoleFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetIsHoleFromFloats)
->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePoint)
->Event("GetSurfacePoint", &AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePoint)
->Event("GetSurfacePointFromVector2",
&AzFramework::Terrain::TerrainDataRequestBus::Events::GetSurfacePointFromVector2)
&AzFramework::Terrain::TerrainDataRequestBus::Events::BehaviorContextGetSurfacePointFromVector2)
->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb)
->Event("GetTerrainHeightQueryResolution",
&AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution)
@@ -52,8 +52,8 @@ namespace AzFramework
virtual void SetTerrainAabb(const AZ::Aabb& worldBounds) = 0;
//! Returns terrains height in meters at location x,y.
//! @terrainExistsPtr: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a terrain HOLE then *terrainExistsPtr will become false,
//! otherwise *terrainExistsPtr will become true.
//! @terrainExistsPtr: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside
//! a terrain HOLE then *terrainExistsPtr will become false, otherwise *terrainExistsPtr will become true.
virtual float GetHeight(const AZ::Vector3& position, Sampler sampler = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
virtual float GetHeightFromVector2(
const AZ::Vector2& position, Sampler sampler = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
@@ -68,8 +68,7 @@ namespace AzFramework
// Given an XY coordinate, return the surface normal.
//! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a
//! terrain HOLE then *terrainExistsPtr will be set to false,
//! otherwise *terrainExistsPtr will be set to true.
//! terrain HOLE then *terrainExistsPtr will be set to false, otherwise *terrainExistsPtr will be set to true.
virtual AZ::Vector3 GetNormal(
const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
virtual AZ::Vector3 GetNormalFromVector2(
@@ -78,8 +77,8 @@ namespace AzFramework
float x, float y, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
//! Given an XY coordinate, return the max surface type and weight.
//! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside a terrain HOLE then *terrainExistsPtr will be set to false,
//! otherwise *terrainExistsPtr will be set to true.
//! @terrainExists: Can be nullptr. If != nullptr then, if there's no terrain at location x,y or location x,y is inside
//! a terrain HOLE then *terrainExistsPtr will be set to false, otherwise *terrainExistsPtr will be set to true.
virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeight(
const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeightFromVector2(
@@ -87,8 +86,8 @@ namespace AzFramework
virtual SurfaceData::SurfaceTagWeight GetMaxSurfaceWeightFromFloats(
float x, float y, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
//! Given an XY coordinate, return the set of surface types and weights. The Vector3 input position version is defined to ignore
//! the input Z value.
//! Given an XY coordinate, return the set of surface types and weights. The Vector3 input position version is defined to
//! ignore the input Z value.
virtual void GetSurfaceWeights(
const AZ::Vector3& inPosition,
SurfaceData::SurfaceTagWeightList& outSurfaceWeights,
@@ -106,13 +105,14 @@ namespace AzFramework
Sampler sampleFilter = Sampler::DEFAULT,
bool* terrainExistsPtr = nullptr) const = 0;
//! Convenience function for low level systems that can't do a reverse lookup from Crc to string. Everyone else should use GetMaxSurfaceWeight or GetMaxSurfaceWeightFromFloats.
//! Convenience function for low level systems that can't do a reverse lookup from Crc to string. Everyone else should use
//! GetMaxSurfaceWeight or GetMaxSurfaceWeightFromFloats.
//! Not available in the behavior context.
//! Returns nullptr if the position is inside a hole or outside of the terrain boundaries.
virtual const char* GetMaxSurfaceName(
const AZ::Vector3& position, Sampler sampleFilter = Sampler::BILINEAR, bool* terrainExistsPtr = nullptr) const = 0;
//! Given an XY coordinate, return all terrain information at that location. The Vector3 input position version is defined
//! Given an XY coordinate, return all terrain information at that location. The Vector3 input position version is defined
//! to ignore the input Z value.
virtual void GetSurfacePoint(
const AZ::Vector3& inPosition,
@@ -130,6 +130,27 @@ namespace AzFramework
SurfaceData::SurfacePoint& outSurfacePoint,
Sampler sampleFilter = Sampler::DEFAULT,
bool* terrainExistsPtr = nullptr) const = 0;
private:
// Private variations of the GetSurfacePoint API exposed to BehaviorContext that returns a value instead of
// using an "out" parameter. The "out" parameter is useful for reusing memory allocated in SurfacePoint when
// using the public API, but can't easily be used from Script Canvas.
SurfaceData::SurfacePoint BehaviorContextGetSurfacePoint(
const AZ::Vector3& inPosition,
Sampler sampleFilter = Sampler::DEFAULT) const
{
SurfaceData::SurfacePoint result;
GetSurfacePoint(inPosition, result, sampleFilter);
return result;
}
SurfaceData::SurfacePoint BehaviorContextGetSurfacePointFromVector2(
const AZ::Vector2& inPosition,
Sampler sampleFilter = Sampler::DEFAULT) const
{
SurfaceData::SurfacePoint result;
GetSurfacePointFromVector2(inPosition, result, sampleFilter);
return result;
}
};
using TerrainDataRequestBus = AZ::EBus<TerrainDataRequests>;
@@ -15,6 +15,7 @@
namespace AZ
{
class Matrix4x4;
class Matrix3x4;
class Transform;
class ReflectContext;
} // namespace AZ
@@ -32,6 +33,8 @@ namespace AzFramework
//! Gets the current camera's world to view matrix.
virtual const AZ::Matrix4x4& GetCameraViewMatrix() const = 0;
//! Gets the current camera's world to view matrix as a Matrix3x4.
virtual AZ::Matrix3x4 GetCameraViewMatrixAsMatrix3x4() const = 0;
//! Sets the current camera's world to view matrix.
virtual void SetCameraViewMatrix(const AZ::Matrix4x4& matrix) = 0;
//! Gets the current camera's projection (view to clip) matrix.
@@ -31,34 +31,31 @@ namespace AzFramework
// multiplication which must be used (see CameraTransformFromCameraView and CameraViewFromCameraTransform)
// note: coordinate system convention is right handed
// see Matrix4x4::CreateProjection for more details
static AZ::Matrix4x4 ZYCoordinateSystemConversion()
static AZ::Matrix3x4 ZYCoordinateSystemConversion()
{
// note: the below matrix is the result of these combined transformations
// pitch = AZ::Matrix4x4::CreateRotationX(AZ::DegToRad(-90.0f));
// yaw = AZ::Matrix4x4::CreateRotationZ(AZ::DegToRad(180.0f));
// conversion = pitch * yaw
return AZ::Matrix4x4::CreateFromColumns(
AZ::Vector4(-1.0f, 0.0f, 0.0f, 0.0f), AZ::Vector4(0.0f, 0.0f, 1.0f, 0.0f), AZ::Vector4(0.0f, 1.0f, 0.0f, 0.0f),
AZ::Vector4(0.0f, 0.0f, 0.0f, 1.0f));
return AZ::Matrix3x4::CreateFromColumns(
AZ::Vector3(-1.0f, 0.0f, 0.0f), AZ::Vector3(0.0f, 0.0f, 1.0f), AZ::Vector3(0.0f, 1.0f, 0.0f), AZ::Vector3(0.0f, 0.0f, 0.0f));
}
AZ::Matrix4x4 CameraTransform(const CameraState& cameraState)
AZ::Matrix3x4 CameraTransform(const CameraState& cameraState)
{
return AZ::Matrix4x4::CreateFromColumns(
AZ::Vector3ToVector4(cameraState.m_side), AZ::Vector3ToVector4(cameraState.m_forward), AZ::Vector3ToVector4(cameraState.m_up),
AZ::Vector3ToVector4(cameraState.m_position, 1.0f));
return AZ::Matrix3x4::CreateFromColumns(cameraState.m_side, cameraState.m_forward, cameraState.m_up, cameraState.m_position);
}
AZ::Matrix4x4 CameraView(const CameraState& cameraState)
AZ::Matrix3x4 CameraView(const CameraState& cameraState)
{
// ensure the camera is looking down positive z with the x axis pointing left
return ZYCoordinateSystemConversion() * CameraTransform(cameraState).GetInverseTransform();
return ZYCoordinateSystemConversion() * CameraTransform(cameraState).GetInverseFast();
}
AZ::Matrix4x4 InverseCameraView(const CameraState& cameraState)
AZ::Matrix3x4 InverseCameraView(const CameraState& cameraState)
{
// ensure the camera is looking down positive z with the x axis pointing left
return CameraView(cameraState).GetInverseTransform();
return CameraView(cameraState).GetInverseFast();
}
AZ::Matrix4x4 CameraProjection(const CameraState& cameraState)
@@ -72,14 +69,14 @@ namespace AzFramework
return CameraProjection(cameraState).GetInverseFull();
}
AZ::Matrix4x4 CameraTransformFromCameraView(const AZ::Matrix4x4& cameraView)
AZ::Matrix3x4 CameraTransformFromCameraView(const AZ::Matrix3x4& cameraView)
{
return (ZYCoordinateSystemConversion() * cameraView).GetInverseTransform();
return (ZYCoordinateSystemConversion() * cameraView).GetInverseFast();
}
AZ::Matrix4x4 CameraViewFromCameraTransform(const AZ::Matrix4x4& cameraTransform)
AZ::Matrix3x4 CameraViewFromCameraTransform(const AZ::Matrix3x4& cameraTransform)
{
return ZYCoordinateSystemConversion() * cameraTransform.GetInverseTransform();
return ZYCoordinateSystemConversion() * cameraTransform.GetInverseFast();
}
AZ::Frustum FrustumFromCameraState(const CameraState& cameraState)
@@ -91,16 +88,17 @@ namespace AzFramework
{
const auto worldFromView = AzFramework::CameraTransform(cameraState);
const auto cameraWorldTransform = AZ::Transform::CreateFromMatrix3x3AndTranslation(
AZ::Matrix3x3::CreateFromMatrix4x4(worldFromView), worldFromView.GetTranslation());
AZ::Matrix3x3::CreateFromMatrix3x4(worldFromView), worldFromView.GetTranslation());
return AZ::ViewFrustumAttributes(
cameraWorldTransform, AspectRatio(cameraState.m_viewportSize), cameraState.m_fovOrZoom, cameraState.m_nearClip,
cameraState.m_farClip);
}
AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix4x4& cameraView, const AZ::Matrix4x4& cameraProjection)
AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection)
{
// transform the world space position to clip space
const auto clipSpacePosition = cameraProjection * cameraView * AZ::Vector3ToVector4(worldPosition, 1.0f);
const auto clipSpacePosition =
cameraProjection * AZ::Vector3ToVector4(cameraView.TransformPoint(worldPosition), 1.0f);
// transform the clip space position to ndc space (perspective divide)
const auto ndcPosition = clipSpacePosition / clipSpacePosition.GetW();
// transform ndc space from <-1,1> to <0, 1> range
@@ -109,7 +107,7 @@ namespace AzFramework
ScreenPoint WorldToScreen(
const AZ::Vector3& worldPosition,
const AZ::Matrix4x4& cameraView,
const AZ::Matrix3x4& cameraView,
const AZ::Matrix4x4& cameraProjection,
const AZ::Vector2& viewportSize)
{
@@ -123,7 +121,7 @@ namespace AzFramework
}
AZ::Vector3 ScreenNdcToWorld(
const AZ::Vector2& normalizedScreenPosition, const AZ::Matrix4x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection)
const AZ::Vector2& normalizedScreenPosition, const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection)
{
// convert screen space coordinates from <0, 1> to <-1,1> range
const auto ndcPosition = normalizedScreenPosition * 2.0f - AZ::Vector2::CreateOne();
@@ -140,7 +138,7 @@ namespace AzFramework
AZ::Vector3 ScreenToWorld(
const ScreenPoint& screenPosition,
const AZ::Matrix4x4& inverseCameraView,
const AZ::Matrix3x4& inverseCameraView,
const AZ::Matrix4x4& inverseCameraProjection,
const AZ::Vector2& viewportSize)
{
@@ -16,6 +16,7 @@
namespace AZ
{
class Frustum;
class Matrix3x4;
class Matrix4x4;
struct ViewFrustumAttributes;
} // namespace AZ
@@ -43,7 +44,7 @@ namespace AzFramework
}
//! Projects a position in world space to screen space normalized device coordinates for the given camera.
AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix4x4& cameraView, const AZ::Matrix4x4& cameraProjection);
AZ::Vector3 WorldToScreenNdc(const AZ::Vector3& worldPosition, const AZ::Matrix3x4& cameraView, const AZ::Matrix4x4& cameraProjection);
//! Projects a position in world space to screen space for the given camera.
ScreenPoint WorldToScreen(const AZ::Vector3& worldPosition, const CameraState& cameraState);
@@ -52,7 +53,7 @@ namespace AzFramework
//! is called many times in a loop.
ScreenPoint WorldToScreen(
const AZ::Vector3& worldPosition,
const AZ::Matrix4x4& cameraView,
const AZ::Matrix3x4& cameraView,
const AZ::Matrix4x4& cameraProjection,
const AZ::Vector2& viewportSize);
@@ -64,14 +65,14 @@ namespace AzFramework
//! is called many times in a loop.
AZ::Vector3 ScreenToWorld(
const ScreenPoint& screenPosition,
const AZ::Matrix4x4& inverseCameraView,
const AZ::Matrix3x4& inverseCameraView,
const AZ::Matrix4x4& inverseCameraProjection,
const AZ::Vector2& viewportSize);
//! Unprojects a position in screen space normalized device coordinates to world space.
//! Note: The position returned will be on the near clip plane of the camera in world space.
AZ::Vector3 ScreenNdcToWorld(
const AZ::Vector2& ndcPosition, const AZ::Matrix4x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection);
const AZ::Vector2& ndcPosition, const AZ::Matrix3x4& inverseCameraView, const AZ::Matrix4x4& inverseCameraProjection);
//! Returns the camera projection for the current camera state.
AZ::Matrix4x4 CameraProjection(const CameraState& cameraState);
@@ -81,27 +82,27 @@ namespace AzFramework
//! Returns the camera view for the current camera state.
//! @note This is the 'v' in the MVP transform going from world space to view space (viewFromWorld).
AZ::Matrix4x4 CameraView(const CameraState& cameraState);
AZ::Matrix3x4 CameraView(const CameraState& cameraState);
//! Returns the inverse of the camera view for the current camera state.
//! @note This is the same as the CameraTransform but corrected for Z up.
AZ::Matrix4x4 InverseCameraView(const CameraState& cameraState);
AZ::Matrix3x4 InverseCameraView(const CameraState& cameraState);
//! Returns the camera transform for the current camera state.
//! @note This is the inverse of 'v' in the MVP transform going from view space to world space (worldFromView).
AZ::Matrix4x4 CameraTransform(const CameraState& cameraState);
AZ::Matrix3x4 CameraTransform(const CameraState& cameraState);
//! Takes a camera view (the world to camera space transform) and returns the
//! corresponding camera transform (the world position and orientation of the camera).
//! @note The parameter is the viewFromWorld transform (the 'v' in MVP) going from world space
//! to view space. The return value is worldFromView transform going from view space to world space.
AZ::Matrix4x4 CameraTransformFromCameraView(const AZ::Matrix4x4& cameraView);
AZ::Matrix3x4 CameraTransformFromCameraView(const AZ::Matrix3x4& cameraView);
//! Takes a camera transform (the world position and orientation of the camera) and
//! returns the corresponding camera view (to be used to transform from world to camera space).
//! @note The parameter is the worldFromView transform going from view space to world space. The
//! return value is viewFromWorld transform (the 'v' in MVP) going from view space to world space.
AZ::Matrix4x4 CameraViewFromCameraTransform(const AZ::Matrix4x4& cameraTransform);
AZ::Matrix3x4 CameraViewFromCameraTransform(const AZ::Matrix3x4& cameraTransform);
//! Returns a frustum representing the camera transform and view volume in world space.
AZ::Frustum FrustumFromCameraState(const CameraState& cameraState);
@@ -143,6 +143,13 @@ namespace AzFramework
return vsync_interval;
}
bool NativeWindow::SetSyncInterval(uint32_t newSyncInterval)
{
vsync_interval = newSyncInterval;
return true;
}
/*static*/ bool NativeWindow::GetFullScreenStateOfDefaultWindow()
{
NativeWindowHandle defaultWindowHandle = nullptr;
@@ -132,6 +132,7 @@ namespace AzFramework
void ToggleFullScreenState() override;
float GetDpiScaleFactor() const override;
uint32_t GetSyncInterval() const override;
bool SetSyncInterval(uint32_t newSyncInterval) override;
uint32_t GetDisplayRefreshRate() const override;
//! Get the full screen state of the default window.
@@ -78,6 +78,10 @@ namespace AzFramework
//! Returns the sync interval which tells the drivers the number of v-blanks to synchronize with
virtual uint32_t GetSyncInterval() const = 0;
//! Sets the sync interval which tells the drivers the number of v-blanks to synchronize with
//! Returns if the sync interval was succesfully set
virtual bool SetSyncInterval(uint32_t newSyncInterval) = 0;
//! Returns the refresh rate of the main display
virtual uint32_t GetDisplayRefreshRate() const = 0;
};
@@ -52,6 +52,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
FILES_CMAKE
Tests/framework_shared_tests_files.cmake
AzFramework/Physics/physics_mock_files.cmake
Tests/terrain_mock_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Tests
@@ -1,11 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define STREAM_CACHE_DEFAULT 0
@@ -1,10 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzFramework/Archive/ArchiveVars_Android.h>
@@ -27,8 +27,6 @@ set(FILES
AzFramework/Input/User/LocalUserId_Platform.h
../Common/Default/AzFramework/Input/User/LocalUserId_Default.h
AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Android.cpp
AzFramework/Archive/ArchiveVars_Platform.h
AzFramework/Archive/ArchiveVars_Android.h
AzFramework/Process/ProcessCommon.h
AzFramework/Process/ProcessWatcher_Android.cpp
AzFramework/Process/ProcessCommunicator_Android.cpp
@@ -1,11 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define STREAM_CACHE_DEFAULT 0
@@ -1,10 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzFramework/Archive/ArchiveVars_Linux.h>
@@ -28,6 +28,4 @@ set(FILES
AzFramework/Input/User/LocalUserId_Platform.h
../Common/Default/AzFramework/Input/User/LocalUserId_Default.h
../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp
AzFramework/Archive/ArchiveVars_Platform.h
AzFramework/Archive/ArchiveVars_Linux.h
)
@@ -1,11 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define STREAM_CACHE_DEFAULT 0
@@ -1,10 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzFramework/Archive/ArchiveVars_Mac.h>
@@ -30,8 +30,6 @@ set(FILES
AzFramework/Input/User/LocalUserId_Platform.h
../Common/Default/AzFramework/Input/User/LocalUserId_Default.h
../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp
AzFramework/Archive/ArchiveVars_Platform.h
AzFramework/Archive/ArchiveVars_Mac.h
../Common/Apple/AzFramework/Utils/SystemUtilsApple.h
../Common/Apple/AzFramework/Utils/SystemUtilsApple.mm
)
@@ -1,10 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzFramework/Archive/ArchiveVars_Windows.h>
@@ -1,11 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define STREAM_CACHE_DEFAULT 0
@@ -32,6 +32,4 @@ set(FILES
AzFramework/Input/User/LocalUserId_Platform.h
../Common/Default/AzFramework/Input/User/LocalUserId_Default.h
../Common/Unimplemented/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Unimplemented.cpp
AzFramework/Archive/ArchiveVars_Platform.h
AzFramework/Archive/ArchiveVars_Windows.h
)
@@ -1,10 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzFramework/Archive/ArchiveVars_iOS.h>
@@ -1,11 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#define STREAM_CACHE_DEFAULT 0
@@ -27,8 +27,6 @@ set(FILES
AzFramework/Input/User/LocalUserId_Platform.h
../Common/Default/AzFramework/Input/User/LocalUserId_Default.h
../Common/Apple/AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard_Apple.mm
AzFramework/Archive/ArchiveVars_Platform.h
AzFramework/Archive/ArchiveVars_iOS.h
AzFramework/Process/ProcessCommon.h
AzFramework/Process/ProcessWatcher_iOS.cpp
AzFramework/Process/ProcessCommunicator_iOS.cpp
@@ -36,6 +36,7 @@ namespace UnitTest
MOCK_METHOD0(ToggleFullScreenState, void());
MOCK_CONST_METHOD0(GetDpiScaleFactor, float());
MOCK_CONST_METHOD0(GetSyncInterval, uint32_t());
MOCK_METHOD1(SetSyncInterval, bool(uint32_t));
MOCK_CONST_METHOD0(GetDisplayRefreshRate, uint32_t());
};
} // namespace UnitTest
@@ -0,0 +1,80 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <gmock/gmock.h>
#include <AzCore/Component/ComponentApplication.h>
#include <AzFramework/Physics/HeightfieldProviderBus.h>
#include <AzFramework/Terrain/TerrainDataRequestBus.h>
#include <TerrainSystem/TerrainSystemBus.h>
namespace UnitTest
{
class MockTerrainDataNotificationListener : public AzFramework::Terrain::TerrainDataNotificationBus::Handler
{
public:
MockTerrainDataNotificationListener()
{
AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusConnect();
}
~MockTerrainDataNotificationListener()
{
AzFramework::Terrain::TerrainDataNotificationBus::Handler::BusDisconnect();
}
MOCK_METHOD0(OnTerrainDataCreateBegin, void());
MOCK_METHOD0(OnTerrainDataCreateEnd, void());
MOCK_METHOD0(OnTerrainDataDestroyBegin, void());
MOCK_METHOD0(OnTerrainDataDestroyEnd, void());
MOCK_METHOD2(OnTerrainDataChanged, void(const AZ::Aabb& dirtyRegion, TerrainDataChangedMask dataChangedMask));
};
class MockTerrainDataRequests : public AzFramework::Terrain::TerrainDataRequestBus::Handler
{
public:
MockTerrainDataRequests()
{
AzFramework::Terrain::TerrainDataRequestBus::Handler::BusConnect();
}
~MockTerrainDataRequests()
{
AzFramework::Terrain::TerrainDataRequestBus::Handler::BusDisconnect();
}
MOCK_CONST_METHOD0(GetTerrainHeightQueryResolution, AZ::Vector2());
MOCK_METHOD1(SetTerrainHeightQueryResolution, void(AZ::Vector2));
MOCK_CONST_METHOD0(GetTerrainAabb, AZ::Aabb());
MOCK_METHOD1(SetTerrainAabb, void(const AZ::Aabb&));
MOCK_CONST_METHOD3(GetHeight, float(const AZ::Vector3&, Sampler, bool*));
MOCK_CONST_METHOD3(GetHeightFromVector2, float(const AZ::Vector2&, Sampler, bool*));
MOCK_CONST_METHOD4(GetHeightFromFloats, float(float, float, Sampler, bool*));
MOCK_CONST_METHOD2(GetIsHole, bool(const AZ::Vector3&, Sampler));
MOCK_CONST_METHOD2(GetIsHoleFromVector2, bool(const AZ::Vector2&, Sampler));
MOCK_CONST_METHOD3(GetIsHoleFromFloats, bool(float, float, Sampler));
MOCK_CONST_METHOD3(GetNormal, AZ::Vector3(const AZ::Vector3&, Sampler, bool*));
MOCK_CONST_METHOD3(GetNormalFromVector2, AZ::Vector3(const AZ::Vector2&, Sampler, bool*));
MOCK_CONST_METHOD4(GetNormalFromFloats, AZ::Vector3(float, float, Sampler, bool*));
MOCK_CONST_METHOD3(GetMaxSurfaceWeight, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector3&, Sampler, bool*));
MOCK_CONST_METHOD3(GetMaxSurfaceWeightFromVector2, AzFramework::SurfaceData::SurfaceTagWeight(const AZ::Vector2&, Sampler, bool*));
MOCK_CONST_METHOD4(GetMaxSurfaceWeightFromFloats, AzFramework::SurfaceData::SurfaceTagWeight(float, float, Sampler, bool*));
MOCK_CONST_METHOD4(GetSurfaceWeights, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*));
MOCK_CONST_METHOD4(
GetSurfaceWeightsFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*));
MOCK_CONST_METHOD5(
GetSurfaceWeightsFromFloats, void(float, float, AzFramework::SurfaceData::SurfaceTagWeightList&, Sampler, bool*));
MOCK_CONST_METHOD3(GetMaxSurfaceName, const char*(const AZ::Vector3&, Sampler, bool*));
MOCK_CONST_METHOD4(GetSurfacePoint, void(const AZ::Vector3&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*));
MOCK_CONST_METHOD4(
GetSurfacePointFromVector2, void(const AZ::Vector2&, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*));
MOCK_CONST_METHOD5(
GetSurfacePointFromFloats, void(float, float, AzFramework::SurfaceData::SurfacePoint&, Sampler, bool*));
};
} // namespace UnitTest
@@ -0,0 +1,11 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
set(FILES
Mocks/Terrain/MockTerrainDataRequestBus.h
)