Gems/PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -257,16 +257,16 @@ namespace PhysX
|
||||
|
||||
void ConfigStringLineEditHandler::WriteGUIValuesIntoProperty(size_t index, ConfigStringLineEditCtrl* GUI, property_t& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZStd::string val = GUI->Value();
|
||||
instance = static_cast<property_t>(val);
|
||||
}
|
||||
|
||||
bool ConfigStringLineEditHandler::ReadValuesIntoGUI(size_t index, ConfigStringLineEditCtrl* GUI, const property_t& instance, AzToolsFramework::InstanceDataNode* node)
|
||||
{
|
||||
(int)index;
|
||||
(void)node;
|
||||
AZ_UNUSED(index);
|
||||
AZ_UNUSED(node);
|
||||
AZStd::string val = instance;
|
||||
GUI->setValue(val);
|
||||
return false;
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace PhysX
|
||||
{
|
||||
// collision group id
|
||||
AzPhysics::CollisionGroups::Id collisionGroupId;
|
||||
const int baseColliderComponentIndex = classElement.FindElement(AZ_CRC("BaseClass1", 0xd4925735));
|
||||
FindElementRecursiveAndGetData(classElement, AZ_CRC("CollisionGroupId", 0x84fe4bbe), collisionGroupId);
|
||||
|
||||
// collider config
|
||||
|
||||
@@ -334,15 +334,13 @@ namespace PhysX
|
||||
}
|
||||
|
||||
void EditorSubComponentModeAngleCone::ConfigureLinearView(
|
||||
float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color,
|
||||
float axisLength, [[maybe_unused]] const AZ::Color& axis1Color, const AZ::Color& axis2Color,
|
||||
const AZ::Color& axis3Color)
|
||||
{
|
||||
const float coneLength = 0.28f;
|
||||
const float coneRadius = 0.07f;
|
||||
const float lineWidth = 0.05f;
|
||||
|
||||
const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color };
|
||||
|
||||
const auto configureLinearView = [lineWidth, coneLength, axisLength, coneRadius](
|
||||
AzToolsFramework::LinearManipulator* linearManipulator, const AZ::Color& color)
|
||||
{
|
||||
|
||||
@@ -99,7 +99,6 @@ namespace PhysX
|
||||
debugDisplay.PushMatrix(localTransform);
|
||||
|
||||
const float xAxisLineLength = 15.0f;
|
||||
const float yzAxisArrowLength = 1.0f;
|
||||
debugDisplay.SetColor(AZ::Color(1.0f, 0.0f, 0.0f, 1.0f));
|
||||
debugDisplay.DrawLine(AZ::Vector3(0.0f, 0.0f, 0.0f), AZ::Vector3(xAxisLineLength, 0.0f, 0.0f));
|
||||
|
||||
|
||||
@@ -237,7 +237,6 @@ namespace PhysX
|
||||
debugDisplay.PushMatrix(localTransform);
|
||||
|
||||
const float xAxisArrowLength = 2.0f;
|
||||
const float yzAxisArrowLength = 1.0f;
|
||||
debugDisplay.SetColor(AZ::Color(1.0f, 0.0f, 0.0f, 1.0f));
|
||||
debugDisplay.DrawArrow(AZ::Vector3(0.0f, 0.0f, 0.0f), AZ::Vector3(xAxisArrowLength, 0.0f, 0.0f));
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ namespace PhysX
|
||||
{
|
||||
if (m_shapeType == ShapeType::Cylinder)
|
||||
{
|
||||
return AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Show;
|
||||
return AZ::Edit::PropertyVisibility::Show;
|
||||
}
|
||||
|
||||
return AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::Hide;
|
||||
return AZ::Edit::PropertyVisibility::Hide;
|
||||
}
|
||||
|
||||
void EditorShapeColliderComponent::Reflect(AZ::ReflectContext* context)
|
||||
|
||||
@@ -175,7 +175,6 @@ namespace PhysX::Benchmarks
|
||||
const int numRigidBodies = static_cast<int>(state.range(0));
|
||||
|
||||
//common settings for each rigid body
|
||||
const float boxSize = 5.0f;
|
||||
const float boxSizeWithSpacing = RigidBodyConstants::RigidBodys::BoxSize + 2.0f;
|
||||
const int boxesPerCol = static_cast<const int>(RigidBodyConstants::TerrainSize / boxSizeWithSpacing) - 1;
|
||||
int spawnColIdx = 0;
|
||||
@@ -399,7 +398,7 @@ namespace PhysX::Benchmarks
|
||||
return rand.GetRandomFloat() * 25.0f + 5.0f;
|
||||
};
|
||||
|
||||
Utils::GenerateEntityIdFuncPtr entityIdGenerator = [&rand](int idx) -> AZ::EntityId {
|
||||
Utils::GenerateEntityIdFuncPtr entityIdGenerator = [](int idx) -> AZ::EntityId {
|
||||
return AZ::EntityId(static_cast<AZ::u64>(idx) + RigidBodyConstants::RigidBodys::RigidBodyEntityIdStart);
|
||||
};
|
||||
auto boxShapeConfiguration = AZStd::make_shared<Physics::BoxShapeConfiguration>(AZ::Vector3(RigidBodyConstants::RigidBodys::BoxSize));
|
||||
|
||||
@@ -299,7 +299,6 @@ namespace PhysXEditorTests
|
||||
|
||||
// the bounding box of the rigid body should reflect the dimensions of the cylinder set above
|
||||
AZ::Aabb aabb = staticBody->GetAabb();
|
||||
const float validDiameter = validRadius * 2.0f;
|
||||
|
||||
// Check that the z positions of the bounding box match that of the cylinder
|
||||
EXPECT_NEAR(aabb.GetMin().GetZ(), -0.5f * validHeight, AZ::Constants::Tolerance);
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace PhysXEditorTests
|
||||
|
||||
// Initialize new configs with some non-default values.
|
||||
const AZ::Vector3 newGravity(2.f, 5.f, 7.f);
|
||||
const float newFixedTimeStep = 0.008f;
|
||||
const float newMaxTimeStep = 0.034f;
|
||||
|
||||
AzPhysics::SceneConfiguration newConfiguration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user