You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- graph structure is now persistent between frames - particles and constraints are now added/removed only when enabled/disabled - constraint sorting now performed in level assignment - no longer needs to build the islands for just-puty-to-sleep islands - more unit tests #rb cedric.caillaud, benn.gallagher, jaco.vandyk, vincent.robert #jira none #preflight 631a1780ec45fbf3d7387359 [CL 21908749 by chris caulfield in ue5-main branch]
35 lines
949 B
C++
35 lines
949 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "HeadlessChaosTestForces.h"
|
|
|
|
#include "HeadlessChaos.h"
|
|
#include "HeadlessChaosTestUtility.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Chaos/PBDRigidsEvolution.h"
|
|
#include "Chaos/PBDRigidParticles.h"
|
|
#include "Chaos/PBDRigidsEvolutionGBF.h"
|
|
#include "Chaos/Sphere.h"
|
|
#include "Chaos/Utilities.h"
|
|
|
|
namespace ChaosTest
|
|
{
|
|
template<typename TEvolution>
|
|
void Gravity()
|
|
{
|
|
FParticleUniqueIndicesMultithreaded UniqueIndices;
|
|
FPBDRigidsSOAs Particles(UniqueIndices);
|
|
THandleArray<FChaosPhysicsMaterial> PhysicalMaterials;
|
|
TEvolution Evolution(Particles, PhysicalMaterials);
|
|
|
|
TArray<FPBDRigidParticleHandle*> Dynamics = Evolution.CreateDynamicParticles(1);
|
|
Evolution.EnableParticle(Dynamics[0]);
|
|
Evolution.AdvanceOneTimeStep(0.1);
|
|
EXPECT_LT(Dynamics[0]->X()[2], 0);
|
|
}
|
|
|
|
GTEST_TEST(AllEvolutions,Forces)
|
|
{
|
|
ChaosTest::Gravity<FPBDRigidsEvolutionGBF>();
|
|
SUCCEED();
|
|
}
|
|
} |