MockMeshFeatureProcessor.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <Atom/Feature/Mesh/MeshFeatureProcessorInterface.h>
  10. #include <gmock/gmock.h>
  11. namespace UnitTest
  12. {
  13. class MockMeshFeatureProcessor : public AZ::Render::MeshFeatureProcessorInterface
  14. {
  15. public:
  16. MOCK_CONST_METHOD1(GetObjectId, AZ::Render::TransformServiceFeatureProcessorInterface::ObjectId(const MeshHandle&));
  17. MOCK_METHOD1(ReleaseMesh, bool(MeshHandle&));
  18. MOCK_METHOD1(CloneMesh, MeshHandle(const MeshHandle&));
  19. MOCK_CONST_METHOD1(GetModel, AZStd::intrusive_ptr<AZ::RPI::Model>(const MeshHandle&));
  20. MOCK_CONST_METHOD1(GetModelAsset, AZ::Data::Asset<AZ::RPI::ModelAsset>(const MeshHandle&));
  21. MOCK_CONST_METHOD1(GetDrawPackets, const AZ::RPI::MeshDrawPacketLods&(const MeshHandle&));
  22. MOCK_CONST_METHOD1(GetObjectSrgs, const AZStd::vector<AZStd::intrusive_ptr<AZ::RPI::ShaderResourceGroup>>&(const MeshHandle&));
  23. MOCK_CONST_METHOD1(QueueObjectSrgForCompile, void(const MeshHandle&));
  24. MOCK_CONST_METHOD1(GetCustomMaterials, const AZ::Render::CustomMaterialMap&(const MeshHandle&));
  25. MOCK_METHOD2(ConnectModelChangeEventHandler, void(const MeshHandle&, ModelChangedEvent::Handler&));
  26. MOCK_METHOD3(SetTransform, void(const MeshHandle&, const AZ::Transform&, const AZ::Vector3&));
  27. MOCK_METHOD2(SetIsAlwaysDynamic, void(const MeshHandle&, bool));
  28. MOCK_CONST_METHOD1(GetIsAlwaysDynamic, bool(const MeshHandle&));
  29. MOCK_METHOD2(SetCustomMaterials, void(const MeshHandle&, const AZ::Data::Instance<AZ::RPI::Material>&));
  30. MOCK_METHOD2(SetCustomMaterials, void(const MeshHandle&, const AZ::Render::CustomMaterialMap&));
  31. MOCK_METHOD1(GetTransform, AZ::Transform(const MeshHandle&));
  32. MOCK_METHOD1(GetNonUniformScale, AZ::Vector3(const MeshHandle&));
  33. MOCK_METHOD2(SetLocalAabb, void(const MeshHandle&, const AZ::Aabb&));
  34. MOCK_CONST_METHOD1(GetLocalAabb, AZ::Aabb(const MeshHandle&));
  35. MOCK_METHOD2(SetSortKey, void (const MeshHandle&, AZ::RHI::DrawItemSortKey));
  36. MOCK_CONST_METHOD1(GetSortKey, AZ::RHI::DrawItemSortKey(const MeshHandle&));
  37. MOCK_METHOD2(SetMeshLodConfiguration, void(const MeshHandle&, const AZ::RPI::Cullable::LodConfiguration&));
  38. MOCK_CONST_METHOD1(GetMeshLodConfiguration, AZ::RPI::Cullable::LodConfiguration(const MeshHandle&));
  39. MOCK_METHOD1(AcquireMesh, MeshHandle (const AZ::Render::MeshHandleDescriptor&));
  40. MOCK_METHOD2(SetRayTracingEnabled, void (const MeshHandle&, bool));
  41. MOCK_CONST_METHOD1(GetRayTracingEnabled, bool(const MeshHandle&));
  42. MOCK_METHOD2(SetExcludeFromReflectionCubeMaps, void(const MeshHandle&, bool));
  43. MOCK_CONST_METHOD1(GetExcludeFromReflectionCubeMaps, bool(const MeshHandle&));
  44. MOCK_METHOD2(SetVisible, void (const MeshHandle&, bool));
  45. MOCK_CONST_METHOD1(GetVisible, bool(const MeshHandle&));
  46. MOCK_METHOD2(SetUseForwardPassIblSpecular, void(const MeshHandle&, bool));
  47. MOCK_METHOD1(SetRayTracingDirty, void(const MeshHandle&));
  48. };
  49. } // namespace UnitTest