more fixes for Gems
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ namespace AWSCore
|
||||
|
||||
// This will run the code fed to the macro, and then assign 0 to a static int (note the ,0 at the end)
|
||||
#define AWS_CORE_ONCE_PASTE(x) (x)
|
||||
#define AWS_CORE_ONCE(x) static [[maybe_unused]] int AZ_JOIN(init, __LINE__)((AWS_CORE_ONCE_PASTE(x), 0))
|
||||
#define AWS_CORE_ONCE(x) [[maybe_unused]] static int AZ_JOIN(init, __LINE__)((AWS_CORE_ONCE_PASTE(x), 0))
|
||||
|
||||
#define AWS_CORE_HTTP_METHOD_ENTRY(x) { HttpRequestJob::HttpMethod::HTTP_##x, HttpMethodInfo{ Aws::Http::HttpMethod::HTTP_##x, #x } }
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace AWSMetrics
|
||||
|
||||
for (int index = 0; index < MaxNumMetricsEvents; ++index)
|
||||
{
|
||||
producers.emplace_back(AZStd::thread([this, index]()
|
||||
producers.emplace_back(AZStd::thread([index]()
|
||||
{
|
||||
AZStd::vector<MetricsAttribute> metricsAttributes;
|
||||
metricsAttributes.emplace_back(AZStd::move(MetricsAttribute(AwsMetricsAttributeKeyEventName, AttrValue)));
|
||||
|
||||
@@ -257,8 +257,8 @@ namespace AZ
|
||||
|
||||
void CameraComponent::OnViewportResized(uint32_t width, uint32_t height)
|
||||
{
|
||||
AZ_UNUSED(width)
|
||||
AZ_UNUSED(height)
|
||||
AZ_UNUSED(width);
|
||||
AZ_UNUSED(height);
|
||||
UpdateAspectRatio();
|
||||
UpdateViewToClipMatrix();
|
||||
}
|
||||
|
||||
@@ -1779,8 +1779,8 @@ namespace Audio
|
||||
AK::MemoryMgr::CategoryStats categoryStats;
|
||||
AK::MemoryMgr::GetCategoryStats(memInfo.m_poolId, categoryStats);
|
||||
|
||||
memInfo.m_memoryUsed = categoryStats.uUsed;
|
||||
memInfo.m_peakUsed = categoryStats.uPeakUsed;
|
||||
memInfo.m_memoryUsed = static_cast<AZ::u32>(categoryStats.uUsed);
|
||||
memInfo.m_peakUsed = static_cast<AZ::u32>(categoryStats.uPeakUsed);
|
||||
memInfo.m_numAllocs = categoryStats.uAllocs;
|
||||
memInfo.m_numFrees = categoryStats.uFrees;
|
||||
}
|
||||
@@ -1789,9 +1789,9 @@ namespace Audio
|
||||
AK::MemoryMgr::GetGlobalStats(globalStats);
|
||||
|
||||
auto& memInfo = m_debugMemoryInfo.back();
|
||||
memInfo.m_memoryReserved = globalStats.uReserved;
|
||||
memInfo.m_memoryUsed = globalStats.uUsed;
|
||||
memInfo.m_peakUsed = globalStats.uMax;
|
||||
memInfo.m_memoryReserved = static_cast<AZ::u32>(globalStats.uReserved);
|
||||
memInfo.m_memoryUsed = static_cast<AZ::u32>(globalStats.uUsed);
|
||||
memInfo.m_peakUsed = static_cast<AZ::u32>(globalStats.uMax);
|
||||
|
||||
// return the memory infos...
|
||||
return m_debugMemoryInfo;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace EMotionFX
|
||||
* This can be implemented for say skin attachments, which copy over joint transforms from the actor instance they are attached to.
|
||||
* @param outPose The pose that will be modified.
|
||||
*/
|
||||
virtual void UpdateJointTransforms(Pose& outPose) { AZ_UNUSED(outPose) };
|
||||
virtual void UpdateJointTransforms(Pose& outPose) { AZ_UNUSED(outPose); };
|
||||
|
||||
/**
|
||||
* Get the actor instance object of the attachment.
|
||||
|
||||
@@ -433,7 +433,6 @@ namespace EMotionFX
|
||||
}
|
||||
|
||||
const EMotionFX::TransformData* transformData = m_actorInstance->GetTransformData();
|
||||
const size_t transformCount = transformData->GetNumTransforms();
|
||||
const EMotionFX::Skeleton* skeleton = m_actorInstance->GetActor()->GetSkeleton();
|
||||
const size_t jointCount = skeleton->GetNumNodes();
|
||||
|
||||
@@ -498,7 +497,6 @@ namespace EMotionFX
|
||||
const AZ::Vector3 currentPos = currentNodeState.m_position;
|
||||
const AZ::Vector3 currentParentPos = currentParentJointPose.m_position;
|
||||
|
||||
const Physics::RagdollNodeState& targetJointPose = ragdollTargetPose[ragdollJointIndex.GetValue()];
|
||||
const Physics::RagdollNodeState& targetParentJointPose = ragdollTargetPose[ragdollParentJointIndex.GetValue()];
|
||||
|
||||
if (targetParentJointPose.m_simulationType == Physics::SimulationType::Dynamic)
|
||||
|
||||
@@ -441,8 +441,8 @@ namespace EMotionFX
|
||||
|
||||
void SimulatedJointWidget::UpdateDetailsView(const QItemSelection& selected, const QItemSelection& deselected)
|
||||
{
|
||||
AZ_UNUSED(selected)
|
||||
AZ_UNUSED(deselected)
|
||||
AZ_UNUSED(selected);
|
||||
AZ_UNUSED(deselected);
|
||||
|
||||
const SimulatedObjectModel* model = m_plugin->GetSimulatedObjectModel();
|
||||
const QItemSelectionModel* selectionModel = model->GetSelectionModel();
|
||||
|
||||
@@ -184,7 +184,6 @@ namespace EMotionFX
|
||||
void VerifyAfterOperation()
|
||||
{
|
||||
const AZStd::vector<AZ::TypeId> conditionTypeIds = GetConditionTypeIds();
|
||||
const size_t numConditionTypes = conditionTypeIds.size();
|
||||
const bool cutMode = GetParam();
|
||||
if (cutMode)
|
||||
{
|
||||
@@ -419,7 +418,6 @@ namespace EMotionFX
|
||||
AZStd::string result;
|
||||
MCore::CommandGroup commandGroup;
|
||||
const bool cutMode = GetParam();
|
||||
const AnimGraphConnectionId oldtransitionId = m_transition->GetId();
|
||||
|
||||
// Add transition actions to the node.
|
||||
AnimGraphParameterAction* action1 = aznew AnimGraphParameterAction();
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace EMotionFX
|
||||
void SimulateTest(float simulationTime, float expectedFps, float fpsVariance)
|
||||
{
|
||||
Simulate(simulationTime, expectedFps, fpsVariance,
|
||||
/*preCallback*/[this](AnimGraphInstance*)
|
||||
/*preCallback*/[](AnimGraphInstance*)
|
||||
{
|
||||
},
|
||||
/*postCallback*/[this](AnimGraphInstance*)
|
||||
@@ -102,8 +102,8 @@ namespace EMotionFX
|
||||
EXPECT_EQ(this->m_eventHandler->m_numTransitionsStarted, numStates);
|
||||
EXPECT_EQ(this->m_eventHandler->m_numTransitionsEnded, numStates);
|
||||
},
|
||||
/*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {},
|
||||
/*postUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {});
|
||||
/*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {},
|
||||
/*postUpdateCallback*/[](AnimGraphInstance*, float, float, int) {});
|
||||
|
||||
const int numStates = GetParam().m_numStates;
|
||||
if (numStates > 1)
|
||||
|
||||
@@ -32,12 +32,10 @@ namespace EMotionFX
|
||||
this->m_animGraphInstance->SetAutoReleaseRefDatas(false);
|
||||
this->m_animGraphInstance->SetAutoReleasePoses(false);
|
||||
},
|
||||
/*postCallback*/[this](AnimGraphInstance*){},
|
||||
/*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int){},
|
||||
/*postCallback*/[](AnimGraphInstance*){},
|
||||
/*preUpdateCallback*/[](AnimGraphInstance*, float, float, int){},
|
||||
/*postUpdateCallback*/[this](AnimGraphInstance*, float, float, int)
|
||||
{
|
||||
const uint32 threadIndex = this->m_actorInstance->GetThreadIndex();
|
||||
|
||||
// Check if data and pose ref counts are back to 0 for all nodes.
|
||||
const size_t numNodes = this->m_animGraph->GetNumNodes();
|
||||
for (size_t i = 0; i < numNodes; ++i)
|
||||
|
||||
@@ -137,9 +137,9 @@ namespace EMotionFX
|
||||
m_eventHandler->m_numStatesEnded -= 1;
|
||||
|
||||
Simulate(20.0f/*simulationTime*/, 60.0f/*expectedFps*/, 0.0f/*fpsVariance*/,
|
||||
/*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {},
|
||||
/*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {},
|
||||
/*postUpdateCallback*/[this](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, int frame)
|
||||
{
|
||||
const std::vector<AnimGraphStateMachine_InterruptionTestData::ActiveObjectsAtFrame>& activeObjectsAtFrame = GetParam().m_activeObjectsAtFrame;
|
||||
@@ -457,14 +457,11 @@ namespace EMotionFX
|
||||
float prevBlendWeight = 0.0f;
|
||||
|
||||
Simulate(2.0f /*simulationTime*/, 10.0f /*expectedFps*/, 0.0f /*fpsVariance*/,
|
||||
/*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {},
|
||||
/*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {},
|
||||
/*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int) {},
|
||||
/*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {},
|
||||
/*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance) {},
|
||||
/*preUpdateCallback*/[](AnimGraphInstance*, float, float, int) {},
|
||||
/*postUpdateCallback*/[this, &prevGotInterrupted, &prevBlendWeight](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, [[maybe_unused]] int frame)
|
||||
{
|
||||
const AnimGraphStateMachine_InterruptionPropertiesTestData param = GetParam();
|
||||
|
||||
const AnimGraphStateTransition::EInterruptionMode interruptionMode = m_transitionLeft->GetInterruptionMode();
|
||||
const float maxInterruptionBlendWeight = m_transitionLeft->GetMaxInterruptionBlendWeight();
|
||||
const bool gotInterrupted = m_transitionLeft->GotInterrupted(animGraphInstance);
|
||||
const bool gotInterruptedThisFrame = gotInterrupted && !prevGotInterrupted;
|
||||
|
||||
@@ -100,13 +100,11 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(AnimGraphStateMachineSyncFixture, PlayspeedTests)
|
||||
{
|
||||
const AnimGraphStateMachineSyncParam param = GetParam();
|
||||
|
||||
bool transitioned = false;
|
||||
Simulate(2.0f/*simulationTime*/, 10.0f/*expectedFps*/, 0.0f/*fpsVariance*/,
|
||||
/*preCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*postCallback*/[this]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*preUpdateCallback*/[this](AnimGraphInstance*, float, float, int){},
|
||||
/*preCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*postCallback*/[]([[maybe_unused]] AnimGraphInstance* animGraphInstance){},
|
||||
/*preUpdateCallback*/[](AnimGraphInstance*, float, float, int){},
|
||||
/*postUpdateCallback*/[this, &transitioned](AnimGraphInstance* animGraphInstance, [[maybe_unused]] float time, [[maybe_unused]] float timeDelta, [[maybe_unused]] int frame)
|
||||
{
|
||||
if (m_rootStateMachine->IsTransitionActive(m_transition, animGraphInstance))
|
||||
|
||||
@@ -332,9 +332,7 @@ namespace EMotionFX
|
||||
EXPECT_NEAR(durationA, durationN, epsilon);
|
||||
|
||||
// Node B gets synced to the blend N node which got synced to node A.
|
||||
const float timeRatio = durationA / durationB;
|
||||
const float timeRatio2 = durationB / durationA;
|
||||
const float factorA = AZ::Lerp(1.0f, timeRatio, blendWeight);
|
||||
const float factorB = AZ::Lerp(timeRatio2, 1.0f, blendWeight);
|
||||
const float primaryMotionPlaySpeed = m_motionNodes[motionIndexA]->GetDefaultPlaySpeed();
|
||||
const float interpolatedSpeed = AZ::Lerp(playSpeedA, primaryMotionPlaySpeed, blendWeight);
|
||||
|
||||
@@ -115,7 +115,6 @@ namespace EMotionFX
|
||||
{
|
||||
AddRagdollNodeConfig(ragdollNodes, jointName.c_str());
|
||||
}
|
||||
const size_t numRagdollNodes = ragdollNodes.size();
|
||||
|
||||
// Create the ragdoll instance and check if the ragdoll root node is set correctly.
|
||||
TestRagdoll testRagdoll;
|
||||
|
||||
@@ -165,8 +165,6 @@ namespace EMotionFX
|
||||
if (weight)
|
||||
{
|
||||
const AZ::Vector3 expectedPosition(goalX, goalY, goalZ);
|
||||
const AZ::Vector3 dist = (expectedPosition - testJointNewPos).GetAbs();
|
||||
const float length = dist.GetLength();
|
||||
EXPECT_TRUE(PosePositionCompareClose(testJointNewPos, expectedPosition, 0.0001f))
|
||||
<< "Joint position should be similar to expected position.";
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace EMotionFX
|
||||
TEST_F(EntityComponentFixture, ActorComponent_ActivateRagdoll)
|
||||
{
|
||||
AZ::EntityId entityId(740216387);
|
||||
AZ::Crc32 worldId(174592);
|
||||
|
||||
AzPhysics::SceneEvents::OnSceneSimulationFinishEvent sceneFinishSimEvent;
|
||||
|
||||
|
||||
@@ -132,8 +132,6 @@ namespace EMotionFX
|
||||
|
||||
EXPECT_TRUE(hasCustomMotionExtractionController) << "MotionExtractionBus is not found.";
|
||||
|
||||
const float deltaTimeInv = (timeDelta > 0.0f) ? (1.0f / timeDelta) : 0.0f;
|
||||
|
||||
AZ::Transform currentTransform = AZ::Transform::CreateIdentity();
|
||||
AZ::TransformBus::EventResult(currentTransform, m_entityId, &AZ::TransformBus::Events::GetWorldTM);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace EMotionFX
|
||||
.WillRepeatedly(Return(nodeName));
|
||||
|
||||
AZ::u32 i = 0;
|
||||
std::initializer_list<int> {(([&]() {
|
||||
[[maybe_unused]] std::initializer_list<int> dummy = {(([&]() {
|
||||
EXPECT_CALL(*node, GetChildIndex(i))
|
||||
.WillRepeatedly(Return(children));
|
||||
++i;
|
||||
|
||||
@@ -406,7 +406,6 @@ namespace SimulatedObjectSetupTests
|
||||
const float newGravityFactor = 1.2f;
|
||||
const float newFriction = 0.3f;
|
||||
const bool newPinned = true;
|
||||
const bool newStretchable = true;
|
||||
|
||||
joint.SetConeAngleLimit(newConeAngleLimit);
|
||||
joint.SetMass(newMass);
|
||||
|
||||
@@ -1376,7 +1376,6 @@ namespace EditorPythonBindings
|
||||
class TypeConverterPair final
|
||||
: public PythonMarshalComponent::TypeConverter
|
||||
{
|
||||
AZ::GenericClassInfo* m_genericClassInfo = nullptr;
|
||||
const AZ::SerializeContext::ClassData* m_classData = nullptr;
|
||||
const AZ::TypeId m_typeId = {};
|
||||
|
||||
@@ -1403,9 +1402,8 @@ namespace EditorPythonBindings
|
||||
}
|
||||
|
||||
public:
|
||||
TypeConverterPair(AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId)
|
||||
: m_genericClassInfo(genericClassInfo)
|
||||
, m_classData(classData)
|
||||
TypeConverterPair([[maybe_unused]] AZ::GenericClassInfo* genericClassInfo, const AZ::SerializeContext::ClassData* classData, const AZ::TypeId& typeId)
|
||||
: m_classData(classData)
|
||||
, m_typeId(typeId)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ namespace LmbrCentral
|
||||
|
||||
PathFollowResult result;
|
||||
|
||||
const bool arrived = pathFollower->Update(
|
||||
[[maybe_unused]] const bool arrived = pathFollower->Update(
|
||||
result,
|
||||
AZVec3ToLYVec3(agentPosition),
|
||||
AZVec3ToLYVec3(agentVelocity),
|
||||
|
||||
@@ -138,7 +138,6 @@ namespace UnitTest
|
||||
// cache as test/bundle/staticdata.pak and should be loaded below
|
||||
// The Pak has a catalog describing the contents which should automatically update our central asset catalog
|
||||
const char testCSVAsset[] = "staticdata/csv/bundlingsystemtestgameproperties.csv";
|
||||
const char testCSVAssetPak[] = "test/bundle/staticdata.pak";
|
||||
|
||||
const char testMTLAsset[] = "materials/water_test.mtl";
|
||||
const char testMTLAssetPak[] = "test/TestMaterials.pak";
|
||||
@@ -167,7 +166,6 @@ namespace UnitTest
|
||||
const char testCSVAssetPak[] = "test/bundle/staticdata.pak";
|
||||
|
||||
// This asset lives only within LmbrCentral/Assets/Test/Bundle/ping.pak
|
||||
const char testDDSAsset[] = "textures/test/ping.dds";
|
||||
const char testDDSAssetPak[] = "test/bundle/ping.pak";
|
||||
|
||||
size_t bundleCount{ 0 };
|
||||
|
||||
@@ -56,16 +56,7 @@ namespace
|
||||
param.flags = (IUiAnimNode::ESupportedParamFlags)flags;
|
||||
nodeParams.push_back(param);
|
||||
}
|
||||
|
||||
// Quat::IsEquivalent has numerical problems with very similar values
|
||||
bool CompareRotation(const Quat& q1, const Quat& q2, float epsilon)
|
||||
{
|
||||
return (fabs_tpl(q1.v.x - q2.v.x) <= epsilon)
|
||||
&& (fabs_tpl(q1.v.y - q2.v.y) <= epsilon)
|
||||
&& (fabs_tpl(q1.v.z - q2.v.z) <= epsilon)
|
||||
&& (fabs_tpl(q1.w - q2.w) <= epsilon);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CUiAnimAzEntityNode::CUiAnimAzEntityNode(const int id)
|
||||
|
||||
@@ -124,10 +124,9 @@ AllocateConstIntCVar(CLyShine, CV_ui_RunUnitTestsOnStartup);
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
CLyShine::CLyShine(ISystem* system)
|
||||
CLyShine::CLyShine([[maybe_unused]] ISystem* system)
|
||||
: AzFramework::InputChannelEventListener(AzFramework::InputChannelEventListener::GetPriorityUI())
|
||||
, AzFramework::InputTextEventListener(AzFramework::InputTextEventListener::GetPriorityUI())
|
||||
, m_system(system)
|
||||
, m_draw2d(new CDraw2d)
|
||||
, m_uiRenderer(new UiRenderer)
|
||||
, m_uiCanvasManager(new UiCanvasManager)
|
||||
|
||||
@@ -155,8 +155,6 @@ private: // static member functions
|
||||
|
||||
private: // data
|
||||
|
||||
ISystem* m_system; // store a pointer to system rather than relying on env.pSystem
|
||||
|
||||
std::unique_ptr<CDraw2d> m_draw2d; // using a pointer rather than an instance to avoid including Draw2d.h
|
||||
std::unique_ptr<UiRenderer> m_uiRenderer; // using a pointer rather than an instance to avoid including UiRenderer.h
|
||||
AZStd::shared_ptr<UiRenderer> m_uiRendererForEditor;
|
||||
|
||||
@@ -342,8 +342,6 @@ namespace LyShine
|
||||
// Build a map of entity Ids to their parent Ids, for faster lookup during processing.
|
||||
for (AZ::Entity* exportParentEntity : exportSliceEntities)
|
||||
{
|
||||
AZ::EntityId exportParentId = exportParentEntity->GetId();
|
||||
|
||||
UiElementComponent* exportParentComponent = exportParentEntity->FindComponent<UiElementComponent>();
|
||||
if (!exportParentComponent)
|
||||
{
|
||||
|
||||
@@ -509,20 +509,16 @@ ISprite::Borders CSprite::GetTextureSpaceCellUvBorders(int cellIndex) const
|
||||
if (CellIndexWithinRange(cellIndex))
|
||||
{
|
||||
const float cellWidth = GetCellUvSize(cellIndex).GetX();
|
||||
const float cellMinUCoord = GetCellUvCoords(cellIndex).TopLeft().GetX();
|
||||
const float cellNormalizedLeftBorder = GetCellUvBorders(cellIndex).m_left * cellWidth;
|
||||
textureSpaceBorders.m_left = cellNormalizedLeftBorder;
|
||||
|
||||
const float cellMaxUCoord = GetCellUvCoords(cellIndex).TopRight().GetX();
|
||||
const float cellNormalizedRightBorder = GetCellUvBorders(cellIndex).m_right * cellWidth;
|
||||
textureSpaceBorders.m_right = cellNormalizedRightBorder;
|
||||
|
||||
const float cellHeight = GetCellUvSize(cellIndex).GetY();
|
||||
const float cellMinVCoord = GetCellUvCoords(cellIndex).TopLeft().GetY();
|
||||
const float cellNormalizedTopBorder = GetCellUvBorders(cellIndex).m_top * cellHeight;
|
||||
textureSpaceBorders.m_top = cellNormalizedTopBorder;
|
||||
|
||||
const float cellMaxVCoord = GetCellUvCoords(cellIndex).BottomLeft().GetY();
|
||||
const float cellNormalizedBottomBorder = GetCellUvBorders(cellIndex).m_bottom * cellHeight;
|
||||
textureSpaceBorders.m_bottom = cellNormalizedBottomBorder;
|
||||
}
|
||||
|
||||
@@ -904,7 +904,6 @@ namespace
|
||||
|
||||
AZ::EntityId testElemId = CreateElementWithTransform2dComponent(canvas, "UiTransfrom2DTestElement:Offsets");
|
||||
|
||||
AZ::Vector2 parentSize(canvas->GetCanvasSize());
|
||||
UiTransform2dInterface::Offsets expectedOffsets(-50, -50, 50, 50);
|
||||
UiTransform2dInterface::Offsets actualOffsets;
|
||||
|
||||
@@ -971,7 +970,6 @@ namespace
|
||||
|
||||
AZ::EntityId testElemId = CreateElementWithTransform2dComponent(canvas, "UiTransfrom2DTestElement:LocalSize");
|
||||
|
||||
AZ::Vector2 parentSize(canvas->GetCanvasSize());
|
||||
float expectedWidth = 100;
|
||||
float actualWidth = 1;
|
||||
float expectedHeight = 100;
|
||||
|
||||
@@ -1536,7 +1536,6 @@ void UiImageComponent::RenderSingleQuad(const AZ::Vector2* positions, const AZ::
|
||||
IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None;
|
||||
const uint32 numVertices = 4;
|
||||
SVF_P2F_C4B_T2F_F4B vertices[numVertices];
|
||||
const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane
|
||||
for (int i = 0; i < numVertices; ++i)
|
||||
{
|
||||
AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding);
|
||||
@@ -1596,7 +1595,6 @@ void UiImageComponent::RenderLinearFilledQuad(const AZ::Vector2* positions, cons
|
||||
IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None;
|
||||
const uint32 numVertices = 4;
|
||||
SVF_P2F_C4B_T2F_F4B vertices[numVertices];
|
||||
const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane
|
||||
|
||||
for (int i = 0; i < numVertices; ++i)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,6 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph)
|
||||
|
||||
if (m_isRenderCacheDirty)
|
||||
{
|
||||
const int defaultIndex = 0;
|
||||
uint32 packedColor = 0xffffffff;
|
||||
switch (m_imageType)
|
||||
{
|
||||
@@ -542,7 +541,6 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co
|
||||
IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None;
|
||||
const uint32 numVertices = 4;
|
||||
SVF_P2F_C4B_T2F_F4B vertices[numVertices];
|
||||
const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane
|
||||
for (int i = 0; i < numVertices; ++i)
|
||||
{
|
||||
AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding);
|
||||
|
||||
@@ -313,8 +313,6 @@ AZ::Vector2 UiRenderer::GetViewportSize()
|
||||
auto windowContext = viewportContext->GetWindowContext();
|
||||
|
||||
const AZ::RHI::Viewport& viewport = windowContext->GetViewport();
|
||||
const float viewX = viewport.m_minX;
|
||||
const float viewY = viewport.m_minY;
|
||||
const float viewWidth = viewport.m_maxX - viewport.m_minX;
|
||||
const float viewHeight = viewport.m_maxY - viewport.m_minY;
|
||||
return AZ::Vector2(viewWidth, viewHeight);
|
||||
|
||||
@@ -1500,7 +1500,6 @@ AZ::Vector2 UiScrollBoxComponent::ConstrainOffset(AZ::Vector2 proposedOffset, AZ
|
||||
|
||||
// add the requested scroll offset to the content rect to get the proposed position
|
||||
// The content has already need moved by the requested offset all but latestOffsetDelta
|
||||
UiTransformInterface::Rect origContentRect = contentRect;
|
||||
contentRect.MoveBy(latestOffsetDelta);
|
||||
|
||||
if (contentRect.GetWidth() <= parentRect.GetWidth())
|
||||
|
||||
@@ -2662,8 +2662,6 @@ void UiTextComponent::GetClickableTextRects(UiClickableTextInterface::ClickableT
|
||||
AZ::Vector2 pos = CalculateAlignedPositionWithYOffset(points);
|
||||
|
||||
const DrawBatchLines& drawBatchLines = GetDrawBatchLines();
|
||||
int requestFontSize = GetRequestFontSize();
|
||||
STextDrawContext fontContext(GetTextDrawContextPrototype(requestFontSize, drawBatchLines.fontSizeScale));
|
||||
float newlinePosYIncrement = 0.0f;
|
||||
|
||||
for (auto& drawBatchLine : drawBatchLines.batchLines)
|
||||
@@ -3344,7 +3342,6 @@ void UiTextComponent::GetTextRect(UiTransformInterface::RectPoints& rect, const
|
||||
// get the "no scale rotate" element box
|
||||
UiTransformInterface::RectPoints elemRect;
|
||||
EBUS_EVENT_ID(GetEntityId(), UiTransformBus, GetCanvasSpacePointsNoScaleRotate, elemRect);
|
||||
AZ::Vector2 elemSize = elemRect.GetAxisAlignedSize();
|
||||
|
||||
// given the text alignment work out the box of the actual text
|
||||
rect = elemRect;
|
||||
|
||||
@@ -1454,7 +1454,7 @@ AZ::EntityId UiTransform2dComponent::GetAncestorWithSameDimensionScaleToDevice(S
|
||||
LyShine::EntityArray UiTransform2dComponent::GetDescendantsWithSameDimensionScaleToDevice(ScaleToDeviceMode scaleToDeviceMode) const
|
||||
{
|
||||
// Check if any descendants have their scale to device mode set in the same dimension
|
||||
auto HasSameDimensionScaleToDevice = [this, scaleToDeviceMode](const AZ::Entity* entity)
|
||||
auto HasSameDimensionScaleToDevice = [scaleToDeviceMode](const AZ::Entity* entity)
|
||||
{
|
||||
ScaleToDeviceMode descendantScaleToDeviceMode = ScaleToDeviceMode::None;
|
||||
EBUS_EVENT_ID_RESULT(descendantScaleToDeviceMode, entity->GetId(), UiTransformBus, GetScaleToDeviceMode);
|
||||
|
||||
@@ -101,190 +101,6 @@ namespace
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool GetBarycentricCoordinates(const Vec3& a, const Vec3& b, const Vec3& c, const Vec3& p, float& u, float& v, float& w, float fBorder)
|
||||
{
|
||||
// Compute vectors
|
||||
Vec3 v0 = b - a;
|
||||
Vec3 v1 = c - a;
|
||||
Vec3 v2 = p - a;
|
||||
|
||||
// Compute dot products
|
||||
float dot00 = v0.Dot(v0);
|
||||
float dot01 = v0.Dot(v1);
|
||||
float dot02 = v0.Dot(v2);
|
||||
float dot11 = v1.Dot(v1);
|
||||
float dot12 = v1.Dot(v2);
|
||||
|
||||
// Compute barycentric coordinates
|
||||
float invDenom = 1.f / (dot00 * dot11 - dot01 * dot01);
|
||||
v = (dot11 * dot02 - dot01 * dot12) * invDenom;
|
||||
w = (dot00 * dot12 - dot01 * dot02) * invDenom;
|
||||
u = 1.f - v - w;
|
||||
|
||||
// Check if point is in triangle
|
||||
return (u >= -fBorder) && (v >= -fBorder) && (w >= -fBorder);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool SnapToPlaneAndGetBarycentricCoordinates(const Vec3& a, const Vec3& b, const Vec3& c, const Vec3& p, float& u, float& v, float& w)
|
||||
{
|
||||
// get face normal
|
||||
Vec3 uVec = b - a;
|
||||
Vec3 vVec = c - a;
|
||||
Vec3 faceNormal = uVec.cross(vVec);
|
||||
faceNormal.NormalizeSafe();
|
||||
Vec3 aToPt = p - a;
|
||||
float dist = aToPt.Dot(faceNormal);
|
||||
float distSq = dist * dist;
|
||||
float triLenSq = uVec.len2() + vVec.len2();
|
||||
|
||||
// Is the point "close enough" to the plane of the triangle?
|
||||
if (distSq < triLenSq * 0.1f)
|
||||
{
|
||||
// snap the point to the plane of the triangle
|
||||
Vec3 coplanarP = p - dist * faceNormal;
|
||||
|
||||
return GetBarycentricCoordinates(a, b, c, coplanarP, u, v, w, 0.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Vec2 ConvertBarycentricCoordsToUVCoords(float u, float v, float w, Vec2 uv0, Vec2 uv1, Vec2 uv2)
|
||||
{
|
||||
float arrVertWeight[3] = { max(0.f, u), max(0.f, v), max(0.f, w) };
|
||||
float fDiv = 1.f / (arrVertWeight[0] + arrVertWeight[1] + arrVertWeight[2]);
|
||||
arrVertWeight[0] *= fDiv;
|
||||
arrVertWeight[1] *= fDiv;
|
||||
arrVertWeight[2] *= fDiv;
|
||||
|
||||
Vec2 uvResult = uv0 * arrVertWeight[0] + uv1 * arrVertWeight[1] + uv2 * arrVertWeight[2];
|
||||
return uvResult;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
bool GetTexCoordFromRayHitOnIndexedMesh(
|
||||
int triIndex,
|
||||
Vec3 hitPoint,
|
||||
[[maybe_unused]] const IPhysicalEntity* collider,
|
||||
[[maybe_unused]] int partIndex,
|
||||
const Matrix34& slotWorldTM,
|
||||
const IIndexedMesh* indexedMesh,
|
||||
Vec2& texCoord)
|
||||
{
|
||||
IIndexedMesh::SMeshDescription meshDesc;
|
||||
indexedMesh->GetMeshDescription(meshDesc);
|
||||
|
||||
#if UI_CANVAS_ON_MESH_DEBUG
|
||||
DrawSphere(hitPoint, debugHitColor, debugDrawSphereSize);
|
||||
#endif
|
||||
|
||||
// triIndex is -1 if this is not a mesh collision (i.e. collided with a parametric primitive)
|
||||
if (triIndex >= 0 && triIndex * 3 <= meshDesc.m_nIndexCount)
|
||||
{
|
||||
// convert TriIndex into the indices into the index buffer
|
||||
int i0 = triIndex * 3;
|
||||
int i1 = i0 + 1;
|
||||
int i2 = i0 + 2;
|
||||
|
||||
// get the vertex indices from the index buffer
|
||||
int vIndex0 = meshDesc.m_pIndices[i0];
|
||||
int vIndex1 = meshDesc.m_pIndices[i1];
|
||||
int vIndex2 = meshDesc.m_pIndices[i2];
|
||||
|
||||
// get verts in local space
|
||||
Vec3 v0 = meshDesc.m_pVerts[vIndex0];
|
||||
Vec3 v1 = meshDesc.m_pVerts[vIndex1];
|
||||
Vec3 v2 = meshDesc.m_pVerts[vIndex2];
|
||||
|
||||
// get verts in world space
|
||||
Vec3 wv0 = slotWorldTM.TransformPoint(v0);
|
||||
Vec3 wv1 = slotWorldTM.TransformPoint(v1);
|
||||
Vec3 wv2 = slotWorldTM.TransformPoint(v2);
|
||||
|
||||
|
||||
#if UI_CANVAS_ON_MESH_DEBUG
|
||||
DrawCollisionMeshTrianglePoints(triIndex, collider, partIndex, slotWorldTM);
|
||||
#endif
|
||||
|
||||
float u, v, w;
|
||||
if (SnapToPlaneAndGetBarycentricCoordinates(wv0, wv1, wv2, hitPoint, u, v, w))
|
||||
{
|
||||
#if UI_CANVAS_ON_MESH_DEBUG
|
||||
DrawTrianglePoints(wv0, wv1, wv2, debugRenderMeshAttempt1Color, debugDrawSphereSize);
|
||||
#endif
|
||||
|
||||
// get the texcoord for each vert of the triangle
|
||||
Vec2 uv0 = meshDesc.m_pTexCoord[vIndex0].GetUV();
|
||||
Vec2 uv1 = meshDesc.m_pTexCoord[vIndex1].GetUV();
|
||||
Vec2 uv2 = meshDesc.m_pTexCoord[vIndex2].GetUV();
|
||||
|
||||
texCoord = ConvertBarycentricCoordsToUVCoords(u, v, w, uv0, uv1, uv2);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// If we got here then EITHER, the iPrim is 0xffffffff meaning that the collision
|
||||
// was a primitive rather than a mesh collision OR the iPrim is not the right
|
||||
// triangle index in the render mesh. This sometimes happens, presumably due to
|
||||
// some modifications that are made automatically to the collision mesh by the
|
||||
// physics system or something to do with how the IndexedMesh is generated on
|
||||
// demand in IStatObj:::GetIndexedMesh.
|
||||
// We do have the collision point though. So we go through all the triangles in
|
||||
// the render mesh and try to find the right triangle.
|
||||
// NOTE: This could be optimized by converting the hit point to local space.
|
||||
// NOTE: Currently we use the first triangle where the point is "close enough" to the plane
|
||||
// of the triangle and the barycentric calculation says that the point is within the
|
||||
// triangle. This "close enough" test is rather arbitrary and could get a false positive in
|
||||
// some edge cases.
|
||||
// Another approach would be to go through all the triangles doing the barycentric
|
||||
// test and keep track of which one that passes is closest to the plane of the triangle.
|
||||
int triCount = meshDesc.m_nIndexCount / 3;
|
||||
for (int i = 0; i < triCount; ++i)
|
||||
{
|
||||
// convert TriIndex into the indices into the index buffer
|
||||
int i0 = i * 3;
|
||||
int i1 = i0 + 1;
|
||||
int i2 = i0 + 2;
|
||||
|
||||
// get the vertex indices from the index buffer
|
||||
int vIndex0 = meshDesc.m_pIndices[i0];
|
||||
int vIndex1 = meshDesc.m_pIndices[i1];
|
||||
int vIndex2 = meshDesc.m_pIndices[i2];
|
||||
|
||||
// get verts in local space
|
||||
Vec3 v0 = meshDesc.m_pVerts[vIndex0];
|
||||
Vec3 v1 = meshDesc.m_pVerts[vIndex1];
|
||||
Vec3 v2 = meshDesc.m_pVerts[vIndex2];
|
||||
|
||||
// get verts in world space
|
||||
Vec3 wv0 = slotWorldTM.TransformPoint(v0);
|
||||
Vec3 wv1 = slotWorldTM.TransformPoint(v1);
|
||||
Vec3 wv2 = slotWorldTM.TransformPoint(v2);
|
||||
|
||||
float u, v, w;
|
||||
if (SnapToPlaneAndGetBarycentricCoordinates(wv0, wv1, wv2, hitPoint, u, v, w))
|
||||
{
|
||||
#if UI_CANVAS_ON_MESH_DEBUG
|
||||
DrawTrianglePoints(wv0, wv1, wv2, debugRenderMeshAttempt2Color, debugDrawSphereSize);
|
||||
#endif
|
||||
|
||||
// get the texcoord for each vert of the triangle
|
||||
Vec2 uv0 = meshDesc.m_pTexCoord[vIndex0].GetUV();
|
||||
Vec2 uv1 = meshDesc.m_pTexCoord[vIndex1].GetUV();
|
||||
Vec2 uv2 = meshDesc.m_pTexCoord[vIndex2].GetUV();
|
||||
|
||||
texCoord = ConvertBarycentricCoordsToUVCoords(u, v, w, uv0, uv1, uv2);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
} // Anonymous namespace
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -973,9 +973,6 @@ void CMovieSystem::StillUpdate()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CMovieSystem::ShowPlayedSequencesDebug()
|
||||
{
|
||||
f32 green[4] = {0, 1, 0, 1};
|
||||
f32 purple[4] = {1, 0, 1, 1};
|
||||
f32 white[4] = {1, 1, 1, 1};
|
||||
float y = 10.0f;
|
||||
std::vector<const char*> names;
|
||||
|
||||
|
||||
@@ -697,7 +697,6 @@ void CAnimSceneNode::InterpolateCameras(SCameraParams& retInterpolatedCameraPara
|
||||
return;
|
||||
}
|
||||
|
||||
static const float EPSILON_TIME = 0.01f; // consider times within EPSILON_TIME of beginning of blend time to be at the beginning of blend time
|
||||
float interpolatedFoV;
|
||||
|
||||
ISceneCamera* secondCamera = static_cast<ISceneCamera*>(new CComponentEntitySceneCamera(secondKey.cameraAzEntityId));
|
||||
|
||||
@@ -113,7 +113,6 @@ namespace EntityNodeTest
|
||||
TEST_F(CryMovie_CharacterTrackAnimator_Test, CryMovieUnitTest_CharacterTrackAnimator_ComputeAnimKeyNormalizedTime_Loop)
|
||||
{
|
||||
const float NORMALIZED_CLIP_START = .0f;
|
||||
const float NORMALIZED_CLIP_END = 1.0f;
|
||||
const float ERROR_TOLERANCE = 0.0001f;
|
||||
ICharacterKey key;
|
||||
m_dummyTrack.GetKey(EntityNodeTest::KEY_IDX, &key);
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace Multiplayer
|
||||
AzNetworking::StringifySerializer::ValueMap differences = clientMap;
|
||||
for (auto iter = server.GetValueMap().begin(); iter != server.GetValueMap().end(); ++iter)
|
||||
{
|
||||
auto serverValueIter = clientMap.find(iter->first);
|
||||
if (iter->second == differences[iter->first])
|
||||
{
|
||||
differences.erase(iter->first);
|
||||
@@ -492,7 +491,6 @@ namespace Multiplayer
|
||||
{
|
||||
const double deltaTime = static_cast<double>(deltaTimeMs) / 1000.0;
|
||||
const double clientInputRateSec = static_cast<double>(static_cast<AZ::TimeMs>(cl_InputRateMs)) / 1000.0;
|
||||
const double maxRewindHistory = static_cast<double>(static_cast<AZ::TimeMs>(cl_MaxRewindHistoryMs)) / 1000.0;
|
||||
|
||||
// Update banked time accumulator
|
||||
m_clientBankedTime -= deltaTime;
|
||||
|
||||
@@ -230,7 +230,6 @@ namespace Multiplayer
|
||||
void DrawNetworkingStats()
|
||||
{
|
||||
const float TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x;
|
||||
const float TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing();
|
||||
|
||||
const ImGuiTableFlags flags = ImGuiTableFlags_BordersV
|
||||
| ImGuiTableFlags_BordersOuterH
|
||||
@@ -383,7 +382,6 @@ namespace Multiplayer
|
||||
void DrawMultiplayerStats()
|
||||
{
|
||||
const float TEXT_BASE_WIDTH = ImGui::CalcTextSize("A").x;
|
||||
const float TEXT_BASE_HEIGHT = ImGui::GetTextLineHeightWithSpacing();
|
||||
|
||||
IMultiplayer* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
MultiplayerComponentRegistry* componentRegistry = GetMultiplayerComponentRegistry();
|
||||
|
||||
@@ -747,7 +747,6 @@ namespace Multiplayer
|
||||
{
|
||||
m_initEvent.Signal(m_networkInterface);
|
||||
|
||||
const AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-16384.0f), AZ::Vector3(16384.0f));
|
||||
//const AZ::Aabb worldBounds = AZ::Interface<IPhysics>.Get()->GetWorldBounds();
|
||||
AZStd::unique_ptr<IEntityDomain> newDomain = AZStd::make_unique<FullOwnershipEntityDomain>();
|
||||
m_networkEntityManager.Initialize(InvalidHostId, AZStd::move(newDomain));
|
||||
@@ -892,9 +891,8 @@ namespace Multiplayer
|
||||
|
||||
// Unfortunately necessary, as NotifyPreRender can update transforms and thus cause a deadlock inside the vis system
|
||||
AZStd::vector<NetBindComponent*> gatheredEntities;
|
||||
AzFramework::IEntityBoundsUnion* entityBoundsUnion = AZ::Interface<AzFramework::IEntityBoundsUnion>::Get();
|
||||
AZ::Interface<AzFramework::IVisibilitySystem>::Get()->GetDefaultVisibilityScene()->Enumerate(viewFrustum,
|
||||
[&gatheredEntities, entityBoundsUnion](const AzFramework::IVisibilityScene::NodeData& nodeData)
|
||||
[&gatheredEntities](const AzFramework::IVisibilityScene::NodeData& nodeData)
|
||||
{
|
||||
gatheredEntities.reserve(gatheredEntities.size() + nodeData.m_entries.size());
|
||||
for (AzFramework::VisibilityEntry* visEntry : nodeData.m_entries)
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace Multiplayer
|
||||
|
||||
// The last packet to have been received about this entity
|
||||
AzNetworking::PacketId m_lastReceivedPacketId = AzNetworking::InvalidPacketId;
|
||||
AZ::TimeMs m_lastRecievedTimeMs = AZ::TimeMs{ 0 };
|
||||
AZ::TimeMs m_markForRemovalTimeMs = AZ::TimeMs{ 0 };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -181,9 +181,9 @@ namespace Multiplayer
|
||||
|
||||
void ServerToClientReplicationWindow::DebugDraw() const
|
||||
{
|
||||
static const float BoundaryStripeHeight = 1.0f;
|
||||
static const float BoundaryStripeSpacing = 0.5f;
|
||||
static const int32_t BoundaryStripeCount = 10;
|
||||
//static const float BoundaryStripeHeight = 1.0f;
|
||||
//static const float BoundaryStripeSpacing = 0.5f;
|
||||
//static const int32_t BoundaryStripeCount = 10;
|
||||
|
||||
//if (auto localEnt = m_ControlledEntity.lock())
|
||||
//{
|
||||
@@ -289,7 +289,6 @@ namespace Multiplayer
|
||||
}
|
||||
|
||||
const bool isQueueFull = (m_candidateQueue.size() >= sv_MaxEntitiesToTrackReplication); // See if have the maximum number of entities in our set
|
||||
const bool isBetterChoice = !m_candidateQueue.empty() && (priority > m_candidateQueue.top().m_priority); // Check if the new thing we are adding is better than the worst item in our set
|
||||
const bool isInReplicationSet = m_replicationSet.find(entityHandle) != m_replicationSet.end();
|
||||
if (!isInReplicationSet)
|
||||
{
|
||||
|
||||
@@ -76,7 +76,6 @@ namespace Multiplayer
|
||||
//NetBindComponent* m_controlledNetBindComponent = nullptr;
|
||||
|
||||
const AzNetworking::IConnection* m_connection = nullptr;
|
||||
float m_minPriorityReplicated = 0.0f; ///< Lowest replicated entity priority in last update
|
||||
|
||||
// Cached values to detect a poor network connection
|
||||
uint32_t m_lastCheckedSentPackets = 0;
|
||||
|
||||
@@ -140,9 +140,6 @@ namespace UnitTest
|
||||
|
||||
TEST(NvClothSystem, FactoryCooker_CopyInternalCookedData_CopiedDataMatchesSource)
|
||||
{
|
||||
const AZ::u32 data[] = { 0, 2, 45, 64, 125 };
|
||||
const size_t numDataElements = sizeof(data) / sizeof(data[0]);
|
||||
|
||||
nv::cloth::CookedData nvCookedData;
|
||||
nvCookedData.mNumParticles = 0;
|
||||
|
||||
|
||||
@@ -654,10 +654,6 @@ namespace PhysX
|
||||
const AZ::Quaternion& colliderRelativeRotation,
|
||||
const AZ::Vector3& nonUniformScale)
|
||||
{
|
||||
AZ::Transform transform = GetColliderWorldTransform(worldTransform,
|
||||
colliderRelativePosition,
|
||||
colliderRelativeRotation);
|
||||
|
||||
for (AZ::Vector3& point : pointsInOut)
|
||||
{
|
||||
point = worldTransform.TransformPoint(nonUniformScale *
|
||||
|
||||
@@ -225,7 +225,6 @@ namespace PhysX::Benchmarks
|
||||
}
|
||||
|
||||
//enable and position the ragdolls
|
||||
const int ragdollsPerCol = static_cast<const int>(RagdollConstants::TerrainSize / 10.0f) - 1;
|
||||
int idx = 0;
|
||||
for (auto& ragdoll : ragdolls)
|
||||
{
|
||||
|
||||
@@ -247,7 +247,6 @@ namespace PhysX
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
basis.Update(desiredVelocity);
|
||||
AZ::Vector3 velocity = basis.m_controller->GetVelocity();
|
||||
EXPECT_TRUE(basis.m_controller->GetVelocity().IsClose(AZ::Vector3::CreateZero()));
|
||||
}
|
||||
|
||||
@@ -260,7 +259,6 @@ namespace PhysX
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
basis.Update(desiredVelocity);
|
||||
AZ::Vector3 velocity = basis.m_controller->GetVelocity();
|
||||
EXPECT_TRUE(basis.m_controller->GetVelocity().IsClose(desiredVelocity));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,11 +140,9 @@ namespace PhysX
|
||||
Log_Help(m_threadDesc.m_name, "Thread %d - sleeping for %dms\n", AZStd::this_thread::get_id(), m_waitTimeMilliseconds);
|
||||
AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(m_waitTimeMilliseconds));
|
||||
Log_Help(m_threadDesc.m_name, "Thread %d - running cast\n", AZStd::this_thread::get_id());
|
||||
AZStd::chrono::system_clock::time_point startTime = AZStd::chrono::system_clock::now();
|
||||
|
||||
RunRequest();
|
||||
|
||||
AZStd::chrono::microseconds exeTimeUS = AZStd::chrono::system_clock::now() - startTime;
|
||||
Log_Help(m_threadDesc.m_name, "Thread %d - complete - time %dus\n", AZStd::this_thread::get_id(), exeTimeUS.count());
|
||||
}
|
||||
|
||||
|
||||
@@ -737,11 +737,11 @@ namespace PhysX
|
||||
auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get();
|
||||
|
||||
//setup bodies
|
||||
AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f);
|
||||
AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f));
|
||||
AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f);
|
||||
|
||||
//Create request
|
||||
@@ -769,11 +769,11 @@ namespace PhysX
|
||||
auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get();
|
||||
|
||||
//setup bodies
|
||||
AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f);
|
||||
AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f));
|
||||
AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f);
|
||||
|
||||
//Box Overlap Request
|
||||
@@ -824,9 +824,9 @@ namespace PhysX
|
||||
auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get();
|
||||
|
||||
//setup bodies
|
||||
AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f);
|
||||
AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
AZ::Vector3(7.0f, 4.0f, 0.0f), AZ::Vector3(1.0f));
|
||||
AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
AZ::Vector3(15.0f, 0.0f, 0.0f), 3.0f, 1.0f);
|
||||
@@ -863,9 +863,9 @@ namespace PhysX
|
||||
//setup bodies
|
||||
AzPhysics::SimulatedBodyHandle sphereHandle = TestUtils::AddSphereToScene(m_testSceneHandle,
|
||||
AZ::Vector3(10.0f, 0.0f, 0.0f), 3.0f, AzPhysics::CollisionLayer(0));
|
||||
AzPhysics::SimulatedBodyHandle boxHandle = TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
TestUtils::AddBoxToScene(m_testSceneHandle,
|
||||
AZ::Vector3(12.0f, 0.0f, 0.0f), AZ::Vector3(1.0f), AzPhysics::CollisionLayer(1));
|
||||
AzPhysics::SimulatedBodyHandle capsuleHandle = TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
TestUtils::AddCapsuleToScene(m_testSceneHandle,
|
||||
AZ::Vector3(14.0f, 0.0f, 0.0f), 3.0f, 1.0f, AzPhysics::CollisionLayer(2));
|
||||
|
||||
//Create Request
|
||||
|
||||
@@ -558,7 +558,7 @@ namespace PhysX
|
||||
// add a static simulated body - this is not expected to be reported as an active actor
|
||||
AzPhysics::StaticRigidBodyConfiguration staticConfig;
|
||||
staticConfig.m_colliderAndShapeData = shapeColliderData;
|
||||
AzPhysics::SimulatedBodyHandle staticSphereHandle = sceneInterface->AddSimulatedBody(m_testSceneHandle, &staticConfig);
|
||||
sceneInterface->AddSimulatedBody(m_testSceneHandle, &staticConfig);
|
||||
|
||||
// add a rigid body - this is expect to be reported as an active actor
|
||||
AzPhysics::RigidBodyConfiguration rigidConfig;
|
||||
|
||||
@@ -1126,7 +1126,7 @@ namespace PhysX
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
auto RemoveRigidBody = [this](AzPhysics::RigidBody*& rigidBody)
|
||||
auto RemoveRigidBody = [](AzPhysics::RigidBody*& rigidBody)
|
||||
{
|
||||
auto* sceneInterface = AZ::Interface<AzPhysics::SceneInterface>::Get();
|
||||
if (rigidBody && sceneInterface)
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace ScriptCanvas
|
||||
{
|
||||
static int indices[] = { inputDatumIndices... };
|
||||
static_assert(sizeof...(Is) == AZ_ARRAY_SIZE(indices), "size of default values doesn't match input datum indices for them");
|
||||
std::initializer_list<int> { (MoreHelp(node, indices[Is], AZStd::forward<t_Args>(args)), 0)... };
|
||||
[[maybe_unused]] std::initializer_list<int> dummy = { (MoreHelp(node, indices[Is], AZStd::forward<t_Args>(args)), 0)... };
|
||||
}
|
||||
|
||||
template<typename ArgType>
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ namespace ScriptCanvas
|
||||
if (sourceType == SourceType::SourceInput)
|
||||
{
|
||||
ContractDescriptor supportsMethodContract;
|
||||
supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Erase"); };
|
||||
supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Erase"); };
|
||||
contractDescs.push_back(AZStd::move(supportsMethodContract));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ namespace ScriptCanvas
|
||||
if (sourceType == SourceType::SourceInput)
|
||||
{
|
||||
ContractDescriptor supportsMethodContract;
|
||||
supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Front"); };
|
||||
supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Front"); };
|
||||
contractDescs.push_back(AZStd::move(supportsMethodContract));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ namespace ScriptCanvas
|
||||
if (sourceType == SourceType::SourceInput)
|
||||
{
|
||||
ContractDescriptor supportsMethodContract;
|
||||
supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("Insert"); };
|
||||
supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("Insert"); };
|
||||
contractDescs.push_back(AZStd::move(supportsMethodContract));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ namespace ScriptCanvas
|
||||
if (sourceType == SourceType::SourceInput)
|
||||
{
|
||||
ContractDescriptor supportsMethodContract;
|
||||
supportsMethodContract.m_createFunc = [this]() -> SupportsMethodContract* { return aznew SupportsMethodContract("PushBack"); };
|
||||
supportsMethodContract.m_createFunc = []() -> SupportsMethodContract* { return aznew SupportsMethodContract("PushBack"); };
|
||||
contractDescs.push_back(AZStd::move(supportsMethodContract));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace ScriptCanvas::Nodeables::Spawning
|
||||
return;
|
||||
}
|
||||
|
||||
auto preSpawnCB = [this, translation, rotation, scale]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId,
|
||||
auto preSpawnCB = [translation, rotation, scale]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId,
|
||||
AzFramework::SpawnableEntityContainerView view)
|
||||
{
|
||||
AZ::Entity* rootEntity = *view.begin();
|
||||
|
||||
@@ -135,7 +135,6 @@ namespace ScriptEvents
|
||||
AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, m_asset.GetId());
|
||||
if (assetInfo.m_assetId.IsValid())
|
||||
{
|
||||
const AZ::Data::AssetType assetTypeId = azrtti_typeid<ScriptEventsAsset>();
|
||||
auto& assetManager = AZ::Data::AssetManager::Instance();
|
||||
m_asset = assetManager.GetAsset(m_asset.GetId(), azrtti_typeid<ScriptEventsAsset>(), m_asset.GetAutoLoadBehavior());
|
||||
|
||||
|
||||
@@ -406,26 +406,6 @@ namespace ScriptEventsTests
|
||||
|
||||
EXPECT_TRUE(behaviorEbus->m_destroyHandler->Invoke(handler));
|
||||
|
||||
auto onReady = [&assetData, &scriptEventName]() {
|
||||
const char* renamedMethod = "__METHOD__1__";
|
||||
|
||||
ScriptEvents::ScriptEventsAsset* loadedScriptAsset = assetData.GetAs<ScriptEvents::ScriptEventsAsset>();
|
||||
EXPECT_TRUE(loadedScriptAsset);
|
||||
|
||||
const ScriptEvents::ScriptEvent& loadedDefinition = loadedScriptAsset->m_definition;
|
||||
|
||||
EXPECT_EQ(loadedDefinition.GetVersion(), 0);
|
||||
EXPECT_STREQ(loadedDefinition.GetName().data(), scriptEventName.c_str());
|
||||
|
||||
|
||||
ScriptEvents::Method method;
|
||||
bool foundMethod = loadedDefinition.FindMethod(renamedMethod, method);
|
||||
EXPECT_TRUE(foundMethod);
|
||||
EXPECT_EQ(method.GetNameProperty().GetVersion(), 1);
|
||||
|
||||
assetData = {};
|
||||
};
|
||||
|
||||
AssetEventHandler assetHandler2(assetId, []() {}, []() {});
|
||||
assetHandler2.BusConnect(assetId);
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace UnitTest
|
||||
SurfaceData::SurfaceDataRegistryHandle GetEntryHandle(AZ::EntityId id, const AZStd::vector<SurfaceData::SurfaceDataRegistryEntry>& entryList)
|
||||
{
|
||||
// Look up the requested entity Id and see if we have a registered surface entry with that handle. If so, return the handle.
|
||||
auto result = AZStd::find_if(entryList.begin(), entryList.end(), [this, id](const SurfaceData::SurfaceDataRegistryEntry& entry) { return entry.m_entityId == id; });
|
||||
auto result = AZStd::find_if(entryList.begin(), entryList.end(), [id](const SurfaceData::SurfaceDataRegistryEntry& entry) { return entry.m_entityId == id; });
|
||||
if (result == entryList.end())
|
||||
{
|
||||
return SurfaceData::InvalidSurfaceDataRegistryHandle;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Twitch
|
||||
{
|
||||
AZStd::string url( BuildBaseURL("users", friendID) + "/friends/notifications");
|
||||
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt, this](const Aws::Utils::Json::JsonView& /*json*/, Aws::Http::HttpResponseCode httpCode)
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt](const Aws::Utils::Json::JsonView& /*json*/, Aws::Http::HttpResponseCode httpCode)
|
||||
{
|
||||
ResultCode rc(ResultCode::TwitchRESTError);
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Twitch
|
||||
{
|
||||
AZStd::string url(BuildBaseURL("users", friendID) + "/friends/notifications");
|
||||
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_GET, GetDefaultHeaders(), [receipt, this](const Aws::Utils::Json::JsonView& json, Aws::Http::HttpResponseCode httpCode)
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_GET, GetDefaultHeaders(), [receipt](const Aws::Utils::Json::JsonView& json, Aws::Http::HttpResponseCode httpCode)
|
||||
{
|
||||
ResultCode rc(ResultCode::TwitchRESTError);
|
||||
AZ::s64 count = 0;
|
||||
@@ -203,7 +203,7 @@ namespace Twitch
|
||||
{
|
||||
AZStd::string url(BuildBaseURL("users") + "/friends/relationships/" + friendID);
|
||||
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
{
|
||||
ResultCode rc(ResultCode::TwitchRESTError);
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace Twitch
|
||||
{
|
||||
AZStd::string url(BuildBaseURL("users") + "/friends/requests/" + friendID);
|
||||
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_PUT, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
{
|
||||
ResultCode rc(ResultCode::TwitchRESTError);
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace Twitch
|
||||
{
|
||||
AZStd::string url(BuildBaseURL("users") + "/friends/requests/" + friendID);
|
||||
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt, this]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
AddHTTPRequest(url, Aws::Http::HttpMethod::HTTP_DELETE, GetDefaultHeaders(), [receipt]([[maybe_unused]] const Aws::Utils::Json::JsonView& jsonDoc, Aws::Http::HttpResponseCode httpCode)
|
||||
{
|
||||
ResultCode rc(ResultCode::TwitchRESTError);
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace Vegetation
|
||||
for (const auto& id : processedIds)
|
||||
{
|
||||
bool accepted = true;
|
||||
FilterRequestBus::EnumerateHandlersId(id, [this, &instanceData, &accepted](FilterRequestBus::Events* handler) {
|
||||
FilterRequestBus::EnumerateHandlersId(id, [&instanceData, &accepted](FilterRequestBus::Events* handler) {
|
||||
accepted = handler->Evaluate(instanceData);
|
||||
return accepted;
|
||||
});
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace Vegetation
|
||||
for (const auto& id : processedIds)
|
||||
{
|
||||
bool accepted = true;
|
||||
FilterRequestBus::EnumerateHandlersId(id, [this, &instanceData, &accepted](FilterRequestBus::Events* handler) {
|
||||
FilterRequestBus::EnumerateHandlersId(id, [&instanceData, &accepted](FilterRequestBus::Events* handler) {
|
||||
accepted = handler->Evaluate(instanceData);
|
||||
return accepted;
|
||||
});
|
||||
|
||||
@@ -325,7 +325,7 @@ namespace Vegetation
|
||||
|
||||
// Create a callback for SpawnAllEntities that will set the transform of the root entity to the correct position / rotation / scale
|
||||
// for our spawned instance.
|
||||
auto preSpawnCB = [this, world](
|
||||
auto preSpawnCB = [world](
|
||||
[[maybe_unused]] AzFramework::EntitySpawnTicket::Id ticketId, AzFramework::SpawnableEntityContainerView view)
|
||||
{
|
||||
AZ::Entity* rootEntity = *view.begin();
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace UnitTest
|
||||
|
||||
claimContext.m_existedCallback = [this](const Vegetation::ClaimPoint&, const Vegetation::InstanceData&)
|
||||
{
|
||||
m_existedCallbackCount;
|
||||
return m_existedCallbackOutput;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user