You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/PhysX/Code/Tests
moraaar 3b9762142a
Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657)
Using triangle mesh with a kinematic rigid body is allowed, but the options "Compute COM", "Compute Mass" and "Compute Inertia" are not supported by PhysX and an error in logged that default values for COM, Mass and Inertia will be used. Now this situation is captured and an explanatory warning is used instead.

- Improved RigidBody::UpdateMassProperties function to apply the same logic in the treatment of shapes for all three parameters: COM, Mass and Inertia.
- Improved UpdateMassProperties function by using references for the override parameters instead of pointers.
- Improved function that computes the Center of Mass UpdateCenterOfMass (renamed from UpdateComputedCenterOfMass), to include the same shapes that the compute mass and inertia functions in physx updateMassAndInertia, which is to include all shapes if includeAllShapesInMassCalculation is true, else include only the shapes with eSIMULATION_SHAPE flag.
- Removed unused private function RigidBody::ComputeInertia.
- Added unit test to check when the warnings are fired correctly when COM, Mass or Inertia are asked to be computed on a rigid body with triangle mesh shapes.
- Improved MassComputeFixture tests by not only using Box shape, but also sphere and capture, plus improved the PossibleMassComputeFlags parameters to include all possible variations of the MassComputeFlags flags.

Fixes #3322
Fixes #3979

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
..
Benchmarks PR comments 4 years ago
CharacterControllerTests.cpp more fixes for Gems 4 years ago
ColliderScalingTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
DebugDrawTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
EditorCharacterControllerTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
EditorTestUtilities.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
EditorTestUtilities.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXColliderComponentModeTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXCollisionFilteringTest.cpp Remove touchbending references in PhysX Gem (#3320) 4 years ago
PhysXComponentBusTests.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXEditorTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXForceRegionTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXGenericTest.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXGenericTestFixture.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXGenericTestFixture.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXJointsTest.cpp Setting /permissive- to make MSVC more "standard" (#3701) 4 years ago
PhysXMultithreadingTest.cpp Archive Component - Rewrite and additional work on Archive and Asset Bundler (#4332) 4 years ago
PhysXSceneQueryTests.cpp more fixes for Gems 4 years ago
PhysXSceneTests.cpp Setting /permissive- to make MSVC more "standard" (#3701) 4 years ago
PhysXScriptTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXSpecificTest.cpp Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657) 4 years ago
PhysXSystemTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXTestCommon.cpp Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657) 4 years ago
PhysXTestCommon.h Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657) 4 years ago
PhysXTestCommon.inl Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXTestEnvironment.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXTestEnvironment.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXTestFixtures.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXTestFixtures.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXTestUtil.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXTestUtil.h Terrain/sphrose/surface gradient list component (#4409) 4 years ago
PhysXWindTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PolygonPrismMeshUtilsTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PrimitiveShapeFitterTestData.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
PrimitiveShapeFitterTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
RagdollConfiguration.xml Physics joints updated to the new API (#1361) 5 years ago
RagdollTestData.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
RagdollTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
RigidBodyComponentTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
ShapeColliderComponentTests.cpp Gems/PhysX 4 years ago
ShapeGeometryTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
StaticRigidBodyComponentTests.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
SystemComponentTest.cpp Gems/PhysX 4 years ago
TestColliderComponent.h Gems/PhysX 4 years ago