/* * 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 * */ #include "AxisAlignedBoxShape.h" #include #include #include #include #include #include #include #include #include #include #include #include #include namespace LmbrCentral { AxisAlignedBoxShape::AxisAlignedBoxShape() : BoxShape() { } void AxisAlignedBoxShape::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { serializeContext->Class() ->Version(1) ; if (AZ::EditContext* editContext = serializeContext->GetEditContext()) { editContext->Class("Axis Aligned Box Shape", "Axis Aligned Box shape configuration parameters") ; } } } void AxisAlignedBoxShape::Activate(AZ::EntityId entityId) { BoxShape::Activate(entityId); m_currentTransform.SetRotation(AZ::Quaternion::CreateIdentity()); } void AxisAlignedBoxShape::OnTransformChanged(const AZ::Transform& local, const AZ::Transform& world) { AZ::Transform worldNoRotation(world.GetTranslation(), AZ::Quaternion::CreateIdentity(), world.GetUniformScale()); BoxShape::OnTransformChanged(local, worldNoRotation); } } // namespace LmbrCentral