Merge branch 'development' into cmake/warn_virtual

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-07 08:26:37 -07:00
1829 changed files with 8816 additions and 19153 deletions
@@ -628,7 +628,7 @@ int AZ::Intersect::IntersectRayCappedCylinder(
int AZ::Intersect::IntersectRayCone(
const Vector3& rayOrigin, const Vector3& rayDir,
const Vector3& coneApex, const Vector3& coneDir, float coneHeight,
float coneBaseRaidus, float& t1, float& t2)
float coneBaseRadius, float& t1, float& t2)
{
// Q = rayOrgin, A = coneApex
Vector3 AQ = rayOrigin - coneApex;
@@ -646,7 +646,7 @@ int AZ::Intersect::IntersectRayCone(
return 0;
}
float r2 = coneBaseRaidus * coneBaseRaidus;
float r2 = coneBaseRadius * coneBaseRadius;
float h2 = coneHeight * coneHeight;
float m2 = m * m;
@@ -240,7 +240,7 @@ namespace AZ
//! @return The number of intersecting points.
int IntersectRayCone(
const Vector3& rayOrigin, const Vector3& rayDir,
const Vector3& coneApex, const Vector3& coneDir, float coneHeight, float coneBaseRaidus,
const Vector3& coneApex, const Vector3& coneDir, float coneHeight, float coneBaseRadius,
float& t1, float& t2);
//! Test intersection between a ray and a plane in 3D.
+6 -7
View File
@@ -12,10 +12,12 @@
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
if(PAL_TRAIT_PROF_PIX_SUPPORTED AND LY_PIX_ENABLED)
set(LY_PIX_PATH "${LY_3RDPARTY_PATH}/winpixeventruntime" CACHE PATH "Path to the Windows Pix Event Runtime.")
set(AZ_CORE_PIX_BUILD_DEPENDENCIES 3rdParty::pix)
set(AZ_CORE_PIX_BUILD_DEFINES "USE_PIX")
if(PAL_TRAIT_PROF_PIX_SUPPORTED)
set(LY_PIX_ENABLED OFF CACHE BOOL "Enables PIX profiler integration.")
if(LY_PIX_ENABLED)
message(STATUS "PIX found, enabling as profiler")
set(AZ_CORE_PIX_BUILD_DEPENDENCIES 3rdParty::pix)
endif()
endif()
ly_add_target(
@@ -41,9 +43,6 @@ ly_add_target(
3rdParty::zstd
3rdParty::cityhash
${AZ_CORE_PIX_BUILD_DEPENDENCIES}
COMPILE_DEFINITIONS
PUBLIC
${AZ_CORE_PIX_BUILD_DEFINES}
)
ly_add_source_properties(
SOURCES
@@ -609,6 +609,21 @@ namespace UnitTest
EXPECT_EQ(hits, 0);
}
// replicates a scenario in the Editor using a cone and a pick ray which should have failed but passed
// note: To replicate this, select an entity so the default translation manipulator appears, move very close to the
// entity, hover the mouse over one of the manipulator linear manipulator arrows (cone part) and move the mouse away
// notice the manipulator will remain highlighted as a successful intersection is still reported
TEST(MATH_IntersectRayConeTestEditor, DISABLED_RayConeEditorScenarioTest)
{
auto rayOrigin = Vector3(0.0f, -0.808944702f, 0.0f);
auto rayDir = Vector3(0.301363617f, 0.939044654f, 0.165454566f);
float t1 = 0.0f;
float t2 = 0.0f;
int hits = Intersect::IntersectRayCone(
rayOrigin, rayDir, AZ::Vector3(0.0f, 0.0f, 0.161788940f), AZ::Vector3(0.0f, 0.0f, -1.0f), 0.0453009047, 0.0113252262, t1, t2);
EXPECT_EQ(hits, 0);
}
class MATH_IntersectRayQuadTest
: public AllocatorsFixture
{