MeshInstanceGroupKey.cpp 980 B

123456789101112131415161718192021222324252627282930313233343536
  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. #include <Mesh/MeshInstanceGroupKey.h>
  9. namespace AZ
  10. {
  11. namespace Render
  12. {
  13. auto MeshInstanceGroupKey::MakeTie() const
  14. {
  15. return AZStd::tie(m_modelId, m_lodIndex, m_meshIndex, m_materialId, m_forceInstancingOff, m_sortKey);
  16. }
  17. bool MeshInstanceGroupKey::operator<(const MeshInstanceGroupKey& rhs) const
  18. {
  19. return MakeTie() < rhs.MakeTie();
  20. }
  21. bool MeshInstanceGroupKey::operator==(const MeshInstanceGroupKey& rhs) const
  22. {
  23. return MakeTie() == rhs.MakeTie();
  24. }
  25. bool MeshInstanceGroupKey::operator!=(const MeshInstanceGroupKey& rhs) const
  26. {
  27. return !operator==(rhs);
  28. }
  29. } // namespace Render
  30. } // namespace AZ