ShapeComponentConverters.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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 <AzCore/Serialization/SerializeContext.h>
  10. namespace LmbrCentral
  11. {
  12. namespace ClassConverters
  13. {
  14. /// Common convert function to move shape config to shape type.
  15. template <typename Shape, typename ShapeConfig>
  16. bool UpgradeShapeComponentConfigToShape(
  17. AZ::u32 version, const char* shapeName, AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
  18. /// ShapeComponent converters
  19. bool UpgradeBoxShapeComponent(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
  20. bool UpgradeSphereShapeComponent(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
  21. bool UpgradeCapsuleShapeComponent(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
  22. bool UpgradeCylinderShapeComponent(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement);
  23. } // namespace ClassConverters
  24. } // namespace LmbrCentral
  25. #include "ShapeComponentConverters.inl"