small updates following review feedback
Signed-off-by: hultonha <hultonha@amazon.co.uk>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
@@ -131,7 +131,7 @@ namespace LmbrCentral
|
||||
m_variableRadius.SetElement(vertIndex, radius);
|
||||
ValidateVariableRadius(vertIndex);
|
||||
}
|
||||
|
||||
|
||||
ShapeComponentNotificationsBus::Event(
|
||||
m_entityId, &ShapeComponentNotificationsBus::Events::OnShapeChanged,
|
||||
ShapeComponentNotifications::ShapeChangeReasons::ShapeChanged);
|
||||
@@ -379,9 +379,10 @@ namespace LmbrCentral
|
||||
const float radius, const AZ::u32 capSegments, const AZ::u32 sides,
|
||||
AZStd::vector<AZ::Vector3>& vertexBufferOut)
|
||||
{
|
||||
if (const size_t segmentCount = spline->GetSegmentCount(); segmentCount == 0)
|
||||
const size_t segmentCount = spline->GetSegmentCount();
|
||||
if (segmentCount == 0)
|
||||
{
|
||||
// clear the buffers so we no longer draw anything
|
||||
// clear the buffer so we no longer draw anything
|
||||
vertexBufferOut.clear();
|
||||
return;
|
||||
}
|
||||
@@ -400,7 +401,7 @@ namespace LmbrCentral
|
||||
// 2 verts for each segment
|
||||
// loops == sides
|
||||
// 2 loops per segment
|
||||
const AZ::u32 segments = spline->GetSegmentCount() * spline->GetSegmentGranularity();
|
||||
const AZ::u32 segments = segmentCount * spline->GetSegmentGranularity();
|
||||
const AZ::u32 totalEndSegments = capSegments * 2 * 2 * 2 * 2;
|
||||
const AZ::u32 totalSegments = segments * 2 * 2 * 2;
|
||||
const AZ::u32 totalLoops = 2 * sides * segments * 2;
|
||||
@@ -429,7 +430,7 @@ namespace LmbrCentral
|
||||
// body
|
||||
const float stepDelta = 1.0f / static_cast<float>(spline->GetSegmentGranularity());
|
||||
auto nextAddress = address;
|
||||
const auto endIndex = address.m_segmentIndex + spline->GetSegmentCount();
|
||||
const auto endIndex = address.m_segmentIndex + segmentCount;
|
||||
while (address.m_segmentIndex < endIndex)
|
||||
{
|
||||
address.m_segmentFraction = 0.f;
|
||||
|
||||
Reference in New Issue
Block a user