Jelajahi Sumber

Remove legacy AABB and OBB class. (#19112)

* Remove legacy OBB class.

This class is displaced by AZ::Obb and no longer used in the code anymore.

Signed-off-by: Ross Charles C. <[email protected]>

* Remove legacy AABB class and replace it with AZ::Aabb.

Signed-off-by: Ross Charles C. <[email protected]>

---------

Signed-off-by: Ross Charles C. <[email protected]>
Ross Charles C. 1 Minggu lalu
induk
melakukan
7f3b2c2588

+ 0 - 1
Code/Editor/EditorDefs.h

@@ -89,7 +89,6 @@
 /////////////////////////////////////////////////////////////////////////////
 #include <platform.h>
 #include <Cry_Math.h>
-#include <Cry_Geo.h>
 #include <Range.h>
 #include <StlUtils.h>
 

+ 7 - 5
Code/Editor/EditorViewportWidget.cpp

@@ -1380,20 +1380,22 @@ bool EditorViewportWidget::HitTest(const QPoint& point, HitContext& hitInfo)
 }
 
 //////////////////////////////////////////////////////////////////////////
-bool EditorViewportWidget::IsBoundsVisible(const AABB&) const
+bool EditorViewportWidget::IsBoundsVisible(const AZ::Aabb&) const
 {
     AZ_Assert(false, "Not supported");
     return false;
 }
 
 //////////////////////////////////////////////////////////////////////////
-void EditorViewportWidget::CenterOnAABB(const AABB& aabb)
+void EditorViewportWidget::CenterOnAABB(const AZ::Aabb& aabb)
 {
-    Vec3 selectionCenter = aabb.GetCenter();
+    AZ::Vector3 selectionCenter;
+    float radius;
+    aabb.GetAsSphere(selectionCenter, radius);
 
     // Minimum center size is 40cm
     const float minSelectionRadius = 0.4f;
-    const float selectionSize = std::max(minSelectionRadius, aabb.GetRadius());
+    const float selectionSize = std::max(minSelectionRadius, radius);
 
     // Move camera 25% further back than required
     const float centerScale = 1.25f;
@@ -1413,7 +1415,7 @@ void EditorViewportWidget::CenterOnAABB(const AABB& aabb)
 
     // Compute new transform matrix
     const float distanceToTarget = selectionSize * fovScale * centerScale;
-    const Vec3 newPosition = selectionCenter - (viewDirection * distanceToTarget);
+    const Vec3 newPosition = AZVec3ToLYVec3(selectionCenter) - (viewDirection * distanceToTarget);
     Matrix34 newTM = Matrix34(rotationMatrix, newPosition);
 
     // Set new orbit distance

+ 2 - 2
Code/Editor/EditorViewportWidget.h

@@ -184,8 +184,8 @@ private:
     float GetScreenScaleFactor(const Vec3& worldPoint) const override;
     float GetAspectRatio() const override;
     bool HitTest(const QPoint& point, HitContext& hitInfo) override;
-    bool IsBoundsVisible(const AABB& box) const override;
-    void CenterOnAABB(const AABB& aabb) override;
+    bool IsBoundsVisible(const AZ::Aabb& box) const override;
+    void CenterOnAABB(const AZ::Aabb& aabb) override;
     void OnTitleMenu(QMenu* menu) override;
     void SetViewTM(const Matrix34& tm) override;
     const Matrix34& GetViewTM() const override;

+ 1 - 1
Code/Editor/GameEngine.cpp

@@ -814,7 +814,7 @@ void CGameEngine::OnEditorNotifyEvent(EEditorNotifyEvent event)
     }
 }
 
-void CGameEngine::OnAreaModified([[maybe_unused]] const AABB& modifiedArea)
+void CGameEngine::OnAreaModified([[maybe_unused]] const AZ::Aabb& modifiedArea)
 {
 }
 

+ 1 - 1
Code/Editor/GameEngine.h

@@ -105,7 +105,7 @@ public:
     //! Called every frame.
     void Update();
     virtual void OnEditorNotifyEvent(EEditorNotifyEvent event);
-    void OnAreaModified(const AABB& modifiedArea);
+    void OnAreaModified(const AZ::Aabb& modifiedArea);
 
     void ExecuteQueuedEvents();
 

+ 6 - 2
Code/Editor/IEditor.h

@@ -56,7 +56,6 @@ class IAWSResourceManager;
 
 struct ISystem;
 struct IRenderer;
-struct AABB;
 struct IErrorReport; // Vladimir@conffx
 struct IFileUtil;  // Vladimir@conffx
 struct IEditorLog;  // Vladimir@conffx
@@ -76,6 +75,11 @@ struct HWND__;
 typedef HWND__* HWND;
 #endif
 
+namespace AZ
+{
+    class Aabb;
+}
+
 namespace Editor
 {
     class EditorQtApplication;
@@ -444,7 +448,7 @@ struct IEditor
     //////////////////////////////////////////////////////////////////////////
     virtual class CLevelIndependentFileMan* GetLevelIndependentFileMan() = 0;
     //! Notify all views that data is changed.
-    virtual void UpdateViews(int flags = 0xFFFFFFFF, const AABB* updateRegion = nullptr) = 0;
+    virtual void UpdateViews(int flags = 0xFFFFFFFF, const AZ::Aabb* updateRegion = nullptr) = 0;
     virtual void ResetViews() = 0;
     //! Update information in track view dialog.
     virtual void ReloadTrackView() = 0;

+ 2 - 2
Code/Editor/IEditorImpl.cpp

@@ -539,9 +539,9 @@ void CEditorImpl::SetActiveView(CViewport* viewport)
     m_pViewManager->SelectViewport(viewport);
 }
 
-void CEditorImpl::UpdateViews(int flags, const AABB* updateRegion)
+void CEditorImpl::UpdateViews(int flags, const AZ::Aabb* updateRegion)
 {
-    AABB prevRegion = m_pViewManager->GetUpdateRegion();
+    AZ::Aabb prevRegion = m_pViewManager->GetUpdateRegion();
     if (updateRegion)
     {
         m_pViewManager->SetUpdateRegion(*updateRegion);

+ 1 - 1
Code/Editor/IEditorImpl.h

@@ -149,7 +149,7 @@ public:
 
     CLevelIndependentFileMan* GetLevelIndependentFileMan() override { return m_pLevelIndependentFileMan; }
 
-    void UpdateViews(int flags, const AABB* updateRegion) override;
+    void UpdateViews(int flags, const AZ::Aabb* updateRegion) override;
     void ResetViews() override;
     void ReloadTrackView() override;
     bool AddToolbarItem(uint8 iId, IUIEvent* pIHandler);

+ 5 - 2
Code/Editor/Include/HitContext.h

@@ -15,7 +15,10 @@
 #pragma once
 
 struct IDisplayViewport;
-struct AABB;
+namespace AZ
+{
+    class Aabb;
+}
 
 #include <QRect>
 #include <platform.h>
@@ -63,7 +66,7 @@ struct HitContext
     //! 2D Selection rectangle (Only when HitTestRect)
     QRect rect;
     //! Optional limiting bounding box for hit testing.
-    AABB* bounds;
+    AZ::Aabb* bounds;
 
     //! Testing performed in 2D viewport.
     bool b2DViewport;

+ 5 - 2
Code/Editor/Include/IDisplayViewport.h

@@ -9,7 +9,10 @@
 #pragma once
 
 class QPoint;
-struct AABB;
+namespace AZ
+{
+    class Aabb;
+}
 class CViewport;
 
 struct IDisplayViewport
@@ -45,7 +48,7 @@ struct IDisplayViewport
 
     virtual float GetAspectRatio() const = 0;
 
-    virtual bool IsBoundsVisible(const AABB& box) const = 0;
+    virtual bool IsBoundsVisible(const AZ::Aabb& box) const = 0;
 
     virtual void ScreenToClient(QPoint& pt) const = 0;
     virtual void GetDimensions(int* width, int* height) const = 0;

+ 1 - 1
Code/Editor/Lib/Tests/IEditorMock.h

@@ -82,7 +82,7 @@ public:
     MOCK_METHOD1(SetActiveView, void(CViewport*));
     MOCK_METHOD0(GetFileMonitor, struct IEditorFileMonitor* ());
     MOCK_METHOD0(GetLevelIndependentFileMan, class CLevelIndependentFileMan* ());
-    MOCK_METHOD2(UpdateViews, void(int , const AABB* ));
+    MOCK_METHOD2(UpdateViews, void(int , const AZ::Aabb* ));
     MOCK_METHOD0(ResetViews, void());
     MOCK_METHOD0(ReloadTrackView, void());
 

+ 2 - 2
Code/Editor/ViewManager.cpp

@@ -56,8 +56,8 @@ CViewManager::CViewManager()
     m_origin2D(0, 0, 0);
     m_zoom2D = 1.0f;
 
-    m_updateRegion.min = Vec3(-100000, -100000, -100000);
-    m_updateRegion.max = Vec3(100000, 100000, 100000);
+    m_updateRegion.SetMin(AZ::Vector3(-100000, -100000, -100000));
+    m_updateRegion.SetMax(AZ::Vector3(100000, 100000, 100000));
 
     m_pSelectedView = nullptr;
 

+ 4 - 4
Code/Editor/ViewManager.h

@@ -15,7 +15,7 @@
 
 #pragma once
 
-#include "Cry_Geo.h"
+#include <AzCore/Math/Aabb.h>
 #include "Viewport.h"
 #include "QtViewPaneManager.h"
 // forward declaration.
@@ -62,8 +62,8 @@ public:
     //! Update all views.
     void    UpdateViews(int flags = 0xFFFFFFFF);
 
-    void SetUpdateRegion(const AABB& updateRegion) { m_updateRegion = updateRegion; };
-    const AABB& GetUpdateRegion() { return m_updateRegion; };
+    void SetUpdateRegion(const AZ::Aabb& updateRegion) { m_updateRegion = updateRegion; };
+    const AZ::Aabb& GetUpdateRegion() { return m_updateRegion; };
 
     /** Get 2D viewports origin.
     */
@@ -123,7 +123,7 @@ private:
     float   m_zoomFactor;
 
     AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
-    AABB m_updateRegion;
+    AZ::Aabb m_updateRegion;
 
     //! Origin of 2d viewports.
     Vec3 m_origin2D;

+ 16 - 14
Code/Editor/Viewport.cpp

@@ -18,6 +18,7 @@
 #include <AzQtComponents/DragAndDrop/ViewportDragAndDrop.h>
 
 #include <AzCore/Math/IntersectSegment.h>
+#include <MathConversion.h>
 
 // AzToolsFramework
 #include <AzToolsFramework/API/ComponentEntitySelectionBus.h>
@@ -531,7 +532,6 @@ void QtViewport::OnSetCursor()
 //////////////////////////////////////////////////////////////////////////
 void QtViewport::ResetSelectionRegion()
 {
-    AABB box(Vec3(0, 0, 0), Vec3(0, 0, 0));
     m_selectedRect = QRect();
 }
 
@@ -544,8 +544,7 @@ void QtViewport::SetSelectionRectangle(const QRect& rect)
 void QtViewport::OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect)
 {
     Vec3 org;
-    AABB box;
-    box.Reset();
+    AZ::Aabb box = AZ::Aabb::CreateNull();
 
     //adjust QRect bottom and right corner once before extracting bottom/right coordinates
     const QRect correctedRect = rect.adjusted(0, 0, 1, 1);
@@ -555,24 +554,27 @@ void QtViewport::OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect)
     // Calculate selection volume.
     if (!bNormalizeRect)
     {
-        box.Add(p1);
-        box.Add(p2);
+        box.AddPoint(LYVec3ToAZVec3(p1));
+        box.AddPoint(LYVec3ToAZVec3(p2));
     }
     else
     {
         const QRect rc = correctedRect.normalized();
-        box.Add(ViewToWorld(rc.topLeft()));
-        box.Add(ViewToWorld(rc.topRight()));
-        box.Add(ViewToWorld(rc.bottomLeft()));
-        box.Add(ViewToWorld(rc.bottomRight()));
+        box.AddPoint(LYVec3ToAZVec3(ViewToWorld(rc.topLeft())));
+        box.AddPoint(LYVec3ToAZVec3(ViewToWorld(rc.topRight())));
+        box.AddPoint(LYVec3ToAZVec3(ViewToWorld(rc.bottomLeft())));
+        box.AddPoint(LYVec3ToAZVec3(ViewToWorld(rc.bottomRight())));
     }
 
-    box.min.z = -10000;
-    box.max.z = 10000;
+    AZ::Vector3 boxMin = box.GetMin();
+    AZ::Vector3 boxMax = box.GetMax();
+    boxMin.SetZ(-10000);
+    boxMax.SetZ(10000);
+    box.Set(boxMin, boxMax);
 
     // Show marker position in the status bar
-    float w = box.max.x - box.min.x;
-    float h = box.max.y - box.min.y;
+    float w = box.GetXExtent();
+    float h = box.GetYExtent();
     char szNewStatusText[512];
     sprintf_s(szNewStatusText, "X:%g Y:%g Z:%g  W:%g H:%g", org.x, org.y, org.z, w, h);
     GetIEditor()->SetStatusText(szNewStatusText);
@@ -779,7 +781,7 @@ QSize QtViewport::GetIdealSize() const
 }
 
 //////////////////////////////////////////////////////////////////////////
-bool QtViewport::IsBoundsVisible([[maybe_unused]] const AABB& box) const
+bool QtViewport::IsBoundsVisible([[maybe_unused]] const AZ::Aabb& box) const
 {
     // Always visible in standard implementation.
     return true;

+ 3 - 3
Code/Editor/Viewport.h

@@ -194,7 +194,7 @@ public:
 
     //! Center viewport on selection.
     virtual void CenterOnSelection() = 0;
-    virtual void CenterOnAABB(const AABB& aabb) = 0;
+    virtual void CenterOnAABB(const AZ::Aabb& aabb) = 0;
 
     /** Set ID of this viewport
     */
@@ -392,7 +392,7 @@ public:
     float GetSelectionTolerance() const override { return m_selectionTolerance; }
     //! Center viewport on selection.
     void CenterOnSelection() override {}
-    void CenterOnAABB([[maybe_unused]] const AABB& aabb) override {}
+    void CenterOnAABB([[maybe_unused]] const AZ::Aabb& aabb) override {}
 
     //! Performs hit testing of 2d point in view to find which object hit.
     bool HitTest(const QPoint& point, HitContext& hitInfo) override;
@@ -420,7 +420,7 @@ public:
     virtual QSize GetIdealSize() const;
 
     //! Check if world space bounding box is visible in this view.
-    bool IsBoundsVisible(const AABB& box) const override;
+    bool IsBoundsVisible(const AZ::Aabb& box) const override;
 
     //////////////////////////////////////////////////////////////////////////
 

+ 0 - 271
Code/Legacy/CryCommon/Cry_Geo.h

@@ -1,271 +0,0 @@
-/*
- * 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
- *
- */
-
-
-// Description : Common structures for geometry computations
-#pragma once
-
-#include "Cry_Math.h"
-///////////////////////////////////////////////////////////////////////////////
-// Forward declarations                                                      //
-///////////////////////////////////////////////////////////////////////////////
-
-struct AABB;
-template <typename F>
-struct OBB_tpl;
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// struct AABB
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-struct AABB
-{
-    Vec3 min;
-    Vec3 max;
-
-    /// default AABB constructor (without initialisation)
-    ILINE  AABB()
-    {}
-    enum type_reset
-    {
-        RESET
-    };
-    // AABB aabb(RESET) generates a reset aabb
-    ILINE  AABB(type_reset)
-    { Reset(); }
-    ILINE  explicit AABB(float radius)
-    { max = Vec3(radius); min = -max; }
-    ILINE  explicit AABB(const Vec3& v)
-    { min = max = v; }
-    ILINE  AABB(const Vec3& v, float radius)
-    { Vec3 ext(radius); min = v - ext; max = v + ext; }
-    ILINE  AABB(const Vec3& vmin, const Vec3& vmax)
-    { min = vmin; max = vmax; }
-    ILINE  AABB(const AABB& aabb)
-    {
-        min.x = aabb.min.x;
-        min.y = aabb.min.y;
-        min.z = aabb.min.z;
-        max.x = aabb.max.x;
-        max.y = aabb.max.y;
-        max.z = aabb.max.z;
-    }
-    inline AABB(const Vec3* points, int num)
-    {
-        Reset();
-        for (int i = 0; i < num; i++)
-        {
-            Add(points[i]);
-        }
-    }
-
-    //! Reset Bounding box before calculating bounds.
-    //! These values ensure that Add() functions work correctly for Reset bbs, without additional comparisons.
-    ILINE void Reset()
-    {   min = Vec3(1e15f);  max = Vec3(-1e15f); }
-
-    ILINE bool IsReset() const
-    { return min.x > max.x; }
-
-    ILINE float IsResetSel(float ifReset, float ifNotReset) const
-    { return (float)fsel(max.x - min.x, ifNotReset, ifReset); }
-
-    //! Check if bounding box is empty (Zero volume).
-    ILINE bool IsEmpty() const
-    { return min == max; }
-
-    //! Check if bounding box has valid, non zero volume
-    ILINE bool IsNonZero() const
-    { return min.x < max.x && min.y < max.y && min.z < max.z; }
-
-    ILINE Vec3 GetCenter() const
-    { return (min + max) * 0.5f; }
-
-    ILINE Vec3 GetSize() const
-    { return (max - min) * IsResetSel(0.0f, 1.0f); }
-
-    ILINE float GetRadius() const
-    { return IsResetSel(0.0f, (max - min).GetLengthFloat() * 0.5f); }
-
-    ILINE void Add(const Vec3& v)
-    {
-        min.CheckMin(v);
-        max.CheckMax(v);
-    }
-
-    inline void Add(const Vec3& v, float radius)
-    {
-        Vec3 ext(radius);
-        min.CheckMin(v - ext);
-        max.CheckMax(v + ext);
-    }
-
-    ILINE void Add(const AABB& bb)
-    {
-        min.CheckMin(bb.min);
-        max.CheckMax(bb.max);
-    }
-
-    //! Check if this bounding box contains a point within itself.
-    bool IsContainPoint(const Vec3& pos) const
-    {
-        assert(min.IsValid());
-        assert(max.IsValid());
-        assert(pos.IsValid());
-        if (pos.x < min.x)
-        {
-            return false;
-        }
-        if (pos.y < min.y)
-        {
-            return false;
-        }
-        if (pos.z < min.z)
-        {
-            return false;
-        }
-        if (pos.x > max.x)
-        {
-            return false;
-        }
-        if (pos.y > max.y)
-        {
-            return false;
-        }
-        if (pos.z > max.z)
-        {
-            return false;
-        }
-        return true;
-    }
-
-    float GetDistanceSqr(Vec3 const& v) const
-    {
-        Vec3 vNear = v;
-        vNear.CheckMax(min);
-        vNear.CheckMin(max);
-        return vNear.GetSquaredDistance(v);
-    }
-
-    float GetDistance(Vec3 const& v) const
-    {
-        return sqrt(GetDistanceSqr(v));
-    }
-
-    // Check two bounding boxes for intersection.
-    inline bool IsIntersectBox(const AABB& b) const
-    {
-        assert(min.IsValid());
-        assert(max.IsValid());
-        assert(b.min.IsValid());
-        assert(b.max.IsValid());
-        // Check for intersection on X axis.
-        if ((min.x > b.max.x) || (b.min.x > max.x))
-        {
-            return false;
-        }
-        // Check for intersection on Y axis.
-        if ((min.y > b.max.y) || (b.min.y > max.y))
-        {
-            return false;
-        }
-        // Check for intersection on Z axis.
-        if ((min.z > b.max.z) || (b.min.z > max.z))
-        {
-            return false;
-        }
-        // Boxes overlap in all 3 axises.
-        return true;
-    }
-
-    /*!
-    * calculate the new bounds of a transformed AABB
-    *
-    * Example:
-    * AABB aabb = AABB::CreateAABBfromOBB(m34,aabb);
-    *
-    * return values:
-    *  expanded AABB in world-space
-    */
-    ILINE void SetTransformedAABB(const Matrix34& m34, const AABB& aabb)
-    {
-        if (aabb.IsReset())
-        {
-            Reset();
-        }
-        else
-        {
-            Matrix33 m33;
-            m33.m00 = fabs_tpl(m34.m00);
-            m33.m01 = fabs_tpl(m34.m01);
-            m33.m02 = fabs_tpl(m34.m02);
-            m33.m10 = fabs_tpl(m34.m10);
-            m33.m11 = fabs_tpl(m34.m11);
-            m33.m12 = fabs_tpl(m34.m12);
-            m33.m20 = fabs_tpl(m34.m20);
-            m33.m21 = fabs_tpl(m34.m21);
-            m33.m22 = fabs_tpl(m34.m22);
-
-            Vec3 sz     =   m33 * ((aabb.max - aabb.min) * 0.5f);
-            Vec3 pos    = m34 * ((aabb.max + aabb.min) * 0.5f);
-            min = pos - sz;
-            max = pos + sz;
-        }
-    }
-};
-
-ILINE bool IsEquivalent(const AABB& a, const AABB& b, float epsilon = VEC_EPSILON)
-{
-    return IsEquivalent(a.min, b.min, epsilon) && IsEquivalent(a.max, b.max, epsilon);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-// struct OBB
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-template <typename F>
-struct OBB_tpl
-{
-    Matrix33 m33; //orientation vectors
-    Vec3 h;             //half-length-vector
-    Vec3 c;             //center of obb
-
-    //default OBB constructor (without initialisation)
-    inline OBB_tpl() {}
-
-    ILINE void SetOBB(const Matrix33& matrix, const Vec3& hlv, const Vec3& center) {  m33 = matrix; h = hlv; c = center;   }
-    ILINE static OBB_tpl<F> CreateOBB(const Matrix33& m33, const Vec3& hlv, const Vec3& center) {    OBB_tpl<f32> obb; obb.m33 = m33; obb.h = hlv; obb.c = center; return obb; }
-
-    ILINE void SetOBBfromAABB(const Matrix33& mat33, const AABB& aabb)
-    {
-        m33 =   mat33;
-        h       =   (aabb.max - aabb.min) * 0.5f;   //calculate the half-length-vectors
-        c       =   (aabb.max + aabb.min) * 0.5f;   //the center is relative to the PIVOT
-    }
-    ILINE void SetOBBfromAABB(const Quat& q, const AABB& aabb)
-    {
-        m33 =   Matrix33(q);
-        h       =   (aabb.max - aabb.min) * 0.5f;   //calculate the half-length-vectors
-        c       =   (aabb.max + aabb.min) * 0.5f;   //the center is relative to the PIVOT
-    }
-    ILINE static OBB_tpl<F> CreateOBBfromAABB(const Matrix33& m33, const AABB& aabb) { OBB_tpl<f32> obb; obb.SetOBBfromAABB(m33, aabb); return obb;    }
-    ILINE static OBB_tpl<F> CreateOBBfromAABB(const Quat& q, const AABB& aabb) { OBB_tpl<f32> obb; obb.SetOBBfromAABB(q, aabb); return obb;    }
-
-    ~OBB_tpl(void) {};
-};
-
-typedef OBB_tpl<f32>    OBB;
-

+ 0 - 32
Code/Legacy/CryCommon/MathConversion.h

@@ -8,8 +8,6 @@
 
 #pragma once
 
-#include <AzCore/Math/Aabb.h>
-#include <AzCore/Math/Obb.h>
 #include <AzCore/Math/Vector2.h>
 #include <AzCore/Math/Vector3.h>
 #include <AzCore/Math/Vector4.h>
@@ -21,7 +19,6 @@
 #include <AzCore/Component/EntityId.h>
 #include <AzCore/Math/Plane.h>
 #include <Cry_Math.h>
-#include <Cry_Geo.h>
 #include <Cry_Color.h>
 
 inline AZ::Vector2 LYVec2ToAZVec2(const Vec2& source)
@@ -153,35 +150,6 @@ inline AZ::Matrix3x4 LYTransformToAZMatrix3x4(const Matrix34& source)
     return AZ::Matrix3x4::CreateFromRowMajorFloat12(source.GetData());
 }
 
-inline AABB AZAabbToLyAABB(const AZ::Aabb& source)
-{
-    return AABB(AZVec3ToLYVec3(source.GetMin()), AZVec3ToLYVec3(source.GetMax()));
-}
-
-inline AZ::Aabb LyAABBToAZAabb(const AABB& source)
-{
-    return AZ::Aabb::CreateFromMinMax(LYVec3ToAZVec3(source.min), LYVec3ToAZVec3(source.max));
-}
-
-inline AZ::Obb LyOBBtoAZObb(const OBB& source)
-{
-    const AZ::Vector3 position = LYVec3ToAZVec3(source.c);
-    const AZ::Quaternion rotation = AZ::Quaternion::CreateFromMatrix3x3(LyMatrix3x3ToAzMatrix3x3(source.m33));
-    const AZ::Vector3 halfLengths(source.h.x, source.h.y, source.h.z);
-    return AZ::Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths);
-}
-
-inline OBB AZObbToLyOBB(const AZ::Obb& source)
-{
-    return OBB::CreateOBB(
-        Matrix33::CreateFromVectors(
-            AZVec3ToLYVec3(source.GetAxisX()),
-            AZVec3ToLYVec3(source.GetAxisY()),
-            AZVec3ToLYVec3(source.GetAxisZ())),
-        Vec3(source.GetHalfLengthX(), source.GetHalfLengthY(), source.GetHalfLengthZ()),
-        AZVec3ToLYVec3(source.GetPosition()));
-}
-
 inline AZ::Plane LyPlaneToAZPlane(const ::Plane& source)
 {
     return AZ::Plane::CreateFromNormalAndDistance(LYVec3ToAZVec3(source.n), source.d);

+ 0 - 1
Code/Legacy/CryCommon/crycommon_files.cmake

@@ -61,7 +61,6 @@ set(FILES
     Cry_Matrix44.h
     Cry_Vector4.h
     Cry_Color.h
-    Cry_Geo.h
     Cry_Math.h
     Cry_Quat.h
     Cry_ValidNumber.h

+ 0 - 1
Gems/LyShine/Code/Editor/EditorCommon.h

@@ -7,7 +7,6 @@
  */
 #pragma once
 
-#include <Cry_Geo.h>
 #include <Include/IPlugin.h>
 #include <QtWidgets/QMainWindow>
 #include <LyShine/IDraw2d.h>

+ 0 - 1
Gems/LyShine/Code/Source/World/UiCanvasOnMeshComponent.cpp

@@ -18,7 +18,6 @@
 #include <LyShine/Bus/World/UiCanvasRefBus.h>
 #include <LyShine/UiSerializeHelpers.h>
 
-#include <Cry_Geo.h>
 #include <IIndexedMesh.h>