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/Blast/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
..
Editor turning off editor.blast.tests due to AR failures on suite shutdown (#2837) 4 years ago
Mocks Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657) 4 years ago
ActorRenderManagerTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
BlastActorTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
BlastFamilyTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
BlastTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago
DamageManagerTest.cpp Merge branch 'development' into cmake/SPEC-7179 4 years ago