EditorRotationModifierComponent.cpp 1.1 KB

123456789101112131415161718192021222324252627282930
  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 "EditorRotationModifierComponent.h"
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <AzCore/Serialization/EditContext.h>
  11. #include <LmbrCentral/Dependency/DependencyNotificationBus.h>
  12. namespace Vegetation
  13. {
  14. void EditorRotationModifierComponent::Reflect(AZ::ReflectContext* context)
  15. {
  16. ReflectSubClass<DerivedClassType, BaseClassType>(context, 1, &EditorVegetationComponentBaseVersionConverter<typename BaseClassType::WrappedComponentType, typename BaseClassType::WrappedConfigType>);
  17. }
  18. void EditorRotationModifierComponent::Activate()
  19. {
  20. m_configuration.m_gradientSamplerX.m_ownerEntityId = GetEntityId();
  21. m_configuration.m_gradientSamplerY.m_ownerEntityId = GetEntityId();
  22. m_configuration.m_gradientSamplerZ.m_ownerEntityId = GetEntityId();
  23. BaseClassType::Activate();
  24. }
  25. }