Updates to kd-tree ray intersection - ATOM-15673 (#1026)
* updates to kd-tree ray intersection * update tests for kd-tree * add one more test for kd-tree intersection * updates to ModelKdTree following review feedback * improve api doc comment for RayIntersection in ModelKdTree * updates following review feedback * update .clang-format to stack parameters if they do not all fit on one line
This commit is contained in:
committed by
GitHub
parent
0f699cfd47
commit
4a5b7edbfe
@@ -140,9 +140,16 @@ namespace AZ
|
||||
AZ::Vector3 nonUniformScale = AZ::Vector3::CreateOne();
|
||||
AZ::NonUniformScaleRequestBus::EventResult(nonUniformScale, GetEntityId(), &AZ::NonUniformScaleRequests::GetScale);
|
||||
|
||||
float t;
|
||||
AZ::Vector3 ignoreNormal;
|
||||
constexpr float rayLength = 1000.0f;
|
||||
if (m_controller.GetModel()->RayIntersection(transform, nonUniformScale, src, dir * rayLength, t, ignoreNormal))
|
||||
{
|
||||
distance = rayLength * t;
|
||||
return true;
|
||||
}
|
||||
|
||||
return m_controller.GetModel()->RayIntersection(transform, nonUniformScale, src, dir, distance, ignoreNormal);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditorMeshComponent::SupportsEditorRayIntersect()
|
||||
|
||||
Reference in New Issue
Block a user