From 898c88e7874f61fb04038da739afe507a3f25032 Mon Sep 17 00:00:00 2001 From: JulioJerez Date: Sun, 27 Oct 2024 10:16:54 -0700 Subject: [PATCH] plugin update (wip) --- .../Public/dCollision/ndBodySphFluid.cpp | 12 +- .../Public/dCollision/ndBodySphFluid_New.cpp | 4 +- .../Public/dCollision/ndShapeCompound.cpp | 3 - .../Public/dCore/ndConvexHull2d.cpp | 1 - .../Public/dCore/ndConvexHull2d.h | 4 +- .../Public/dCore/ndTriangulatePolygon.h | 2 +- .../Public/dNewton/dModels/ndUrdfFile.cpp | 1 + .../Public/dNewton/ndDynamicsUpdate.cpp | 2 +- .../newtonLibrary/Public/dNewton/ndWorld.cpp | 21 +- .../newton/Private/NewtonWorldActor.cpp | 189 ++++++++---------- .../Source/newton/Private/NewtonWorldActor.h | 8 +- 11 files changed, 110 insertions(+), 137 deletions(-) diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid.cpp index 6d174ecbf2..ded4a1e8ae 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid.cpp @@ -322,7 +322,7 @@ void ndBodySphFluid::SortBuckets(ndThreadPool* const threadPool) #ifdef _DEBUG const ndArray& point = GetPositions(); - for (int i = 1; i < data.m_hashGridMap.GetCount(); ++i) + for (ndInt32 i = 1; i < data.m_hashGridMap.GetCount(); ++i) { ndGridHash cell0(data.m_hashGridMap[i - 1]); ndGridHash cell1(data.m_hashGridMap[i + 0]); @@ -426,7 +426,7 @@ void ndBodySphFluid::SortCellBuckects(ndThreadPool* const threadPool) } #ifdef _DEBUG - for (int i = 1; i < data.m_hashGridMap.GetCount(); ++i) + for (ndInt32 i = 1; i < data.m_hashGridMap.GetCount(); ++i) { ndGridHash cell0(data.m_hashGridMap[i - 1]); ndGridHash cell1(data.m_hashGridMap[i + 0]); @@ -1159,7 +1159,7 @@ bool ndBodySphFluid::TraceHashes() const #if 0 ndWorkingBuffers& data = *m_workingBuffers; ndGridHash* xxxx = &data.m_hashGridMap[0]; - for (int i = 0; i < data.m_hashGridMap.GetCount(); i++) + for (ndInt32 i = 0; i < data.m_hashGridMap.GetCount(); i++) { ndTrace(("id(%d)\tx(%d)\tz(%d)\n", xxxx[i].m_particleIndex, xxxx[i].m_x, xxxx[i].m_z)); } @@ -1488,7 +1488,7 @@ void ndBodySphFluid::SortBuckets(ndThreadPool* const threadPool) #ifdef _DEBUG const ndArray& point = GetPositions(); - for (int i = 1; i < data.m_hashGridMap.GetCount(); ++i) + for (ndInt32 i = 1; i < data.m_hashGridMap.GetCount(); ++i) { ndGridHash cell0(data.m_hashGridMap[i - 1]); ndGridHash cell1(data.m_hashGridMap[i + 0]); @@ -1591,7 +1591,7 @@ void ndBodySphFluid::SortCellBuckects(ndThreadPool* const threadPool) } #ifdef _DEBUG - for (int i = 1; i < data.m_hashGridMap.GetCount(); ++i) + for (ndInt32 i = 1; i < data.m_hashGridMap.GetCount(); ++i) { ndGridHash cell0(data.m_hashGridMap[i - 1]); ndGridHash cell1(data.m_hashGridMap[i + 0]); @@ -2335,7 +2335,7 @@ bool ndBodySphFluid::TraceHashes() const #if 0 ndWorkingBuffers& data = *m_workingBuffers; ndGridHash* xxxx = &data.m_hashGridMap[0]; - for (int i = 0; i < data.m_hashGridMap.GetCount(); i++) + for (ndInt32 i = 0; i < data.m_hashGridMap.GetCount(); i++) { ndTrace(("id(%d)\tx(%d)\tz(%d)\n", xxxx[i].m_particleIndex, xxxx[i].m_x, xxxx[i].m_z)); } diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid_New.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid_New.cpp index 3e9c3a9b9a..66425026fc 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid_New.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndBodySphFluid_New.cpp @@ -333,7 +333,7 @@ void ndBodySphFluid::SortGrids(ndThreadPool* const threadPool) } #ifdef _DEBUG - for (int i = 1; i < data.m_hashGridMap.GetCount(); ++i) + for (ndInt32 i = 1; i < data.m_hashGridMap.GetCount(); ++i) { ndGridHash cell0(data.m_hashGridMap[i - 1]); ndGridHash cell1(data.m_hashGridMap[i + 0]); @@ -732,7 +732,7 @@ bool ndBodySphFluid::TraceHashes() const #if 0 ndWorkingBuffers& data = *m_workingBuffers; ndGridHash* xxxx = &data.m_hashGridMap[0]; - for (int i = 0; i < data.m_hashGridMap.GetCount(); i++) + for (ndInt32 i = 0; i < data.m_hashGridMap.GetCount(); i++) { ndTrace(("id(%d)\tx(%d)\tz(%d)\n", xxxx[i].m_particleIndex, xxxx[i].m_x, xxxx[i].m_z)); } diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndShapeCompound.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndShapeCompound.cpp index de34d631d4..1dab21edf3 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndShapeCompound.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCollision/ndShapeCompound.cpp @@ -249,7 +249,6 @@ void ndShapeCompound::ndTreeArray::AddNode(ndNodeBase* const node, ndInt32 index { ndTreeArray::ndNode* const myNode = Insert(node, index); node->m_myNode = myNode; - //node->m_shapeInstance->m_parent____ = parent; node->m_shapeInstance->m_subCollisionHandle = myNode; } @@ -260,7 +259,6 @@ ndShapeCompound::ndShapeCompound() ,m_boxMinRadius(ndFloat32(0.0f)) ,m_boxMaxRadius(ndFloat32(0.0f)) ,m_root(nullptr) - //,m_ownerInstance(nullptr) ,m_idIndex(0) { } @@ -272,7 +270,6 @@ ndShapeCompound::ndShapeCompound(const ndShapeCompound& source) ,m_boxMinRadius(ndFloat32(0.0f)) ,m_boxMaxRadius(ndFloat32(0.0f)) ,m_root(nullptr) - //,m_ownerInstance(m_ownerInstance) ,m_idIndex(0) { ndTreeArray::Iterator iter(source.m_array); diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.cpp index bdaaa97276..b1f3c88745 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.cpp @@ -110,6 +110,5 @@ ndInt32 ndConvexHull2d(ndVector* const vertexCloud2d, ndInt32 count) { vertexCloud2d[i] = hull[i]; } - //return k - 1; return k; } diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.h b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.h index dadb1e7c06..8d251c77fc 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.h +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndConvexHull2d.h @@ -19,8 +19,8 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#ifndef __NDG_CONVEXHULL_2D__ -#define __NDG_CONVEXHULL_2D__ +#ifndef __ND_CONVEXHULL_2D_H__ +#define __ND_CONVEXHULL_2D_H__ #include "ndCoreStdafx.h" #include "ndVector.h" diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndTriangulatePolygon.h b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndTriangulatePolygon.h index 27f8e933e2..f7e84673c7 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndTriangulatePolygon.h +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dCore/ndTriangulatePolygon.h @@ -26,6 +26,6 @@ #include "ndArray.h" #include "ndVector.h" -D_CORE_API void ndTriangulatePolygon(ndVector* const vertexCloud2d, ndInt32 count, ndArray& triangles); +D_CORE_API void ndTriangulatePolygon(ndVector* const points, ndInt32 count, ndArray& triangles); #endif diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/dModels/ndUrdfFile.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/dModels/ndUrdfFile.cpp index 607446650c..f61e418a35 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/dModels/ndUrdfFile.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/dModels/ndUrdfFile.cpp @@ -1115,6 +1115,7 @@ ndJointBilateralConstraint* ndUrdfFile::ImportJoint(const nd::TiXmlNode* const j pivotMatrix = matrix * pivotMatrix; } + ndAssert(0); const nd::TiXmlElement* const newtonEx = (nd::TiXmlElement*)jointNode->FirstChild("newton"); if (newtonEx) { diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndDynamicsUpdate.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndDynamicsUpdate.cpp index fbc6e38d25..1695fc02e7 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndDynamicsUpdate.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndDynamicsUpdate.cpp @@ -147,7 +147,7 @@ void ndDynamicsUpdate::SortBodyJointScan() ndCountingSort(*scene, tempBuffer, &bodyJointPairs[0], ndInt32 (bodyJointPairs.GetCount()), nullptr, nullptr); #ifdef _DEBUG - for (int i = 1; i < bodyJointPairs.GetCount(); ++i) + for (ndInt32 i = 1; i < bodyJointPairs.GetCount(); ++i) { ndInt32 key0 = bodyJointPairs[i - 1].m_body; ndInt32 key1 = bodyJointPairs[i + 0].m_body; diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndWorld.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndWorld.cpp index 69de99e0ac..e3efb4936c 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndWorld.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/ThirdParty/newtonLibrary/Public/dNewton/ndWorld.cpp @@ -154,6 +154,7 @@ ndWorld::ndWorld() ndWorld::~ndWorld() { + DeleteDeferredObjects(); CleanUp(); delete m_scene; @@ -428,15 +429,9 @@ ndInt32 ndWorld::CompareJointByInvMass(const ndJointBilateralConstraint* const j return 0; } -void ndWorld::ThreadFunction() +void ndWorld::DeleteDeferredObjects() { - D_TRACKTIME(); - ndUnsigned64 timeAcc = ndGetTimeInMicroseconds(); - - m_inUpdate = true; - m_scene->Begin(); - - // clean up all batched deletd objects, before update + // clean up all batched deleted objects, before update while (m_deletedModels.GetCount()) { D_TRACKTIME(); @@ -486,6 +481,16 @@ void ndWorld::ThreadFunction() ndSharedPtr sharedBody(GetBody(body)); RemoveBody(sharedBody); } +} + +void ndWorld::ThreadFunction() +{ + D_TRACKTIME(); + ndUnsigned64 timeAcc = ndGetTimeInMicroseconds(); + + m_inUpdate = true; + m_scene->Begin(); + DeleteDeferredObjects(); //m_inUpdate = true; //m_scene->Begin(); diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.cpp b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.cpp index 6c8debbf07..0c0dc015b9 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.cpp +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.cpp @@ -67,7 +67,6 @@ ANewtonWorldActor::ANewtonWorldActor() ClearDebug = false; AutoSleepMode = true; - ConcurrentUpdate = false; SolverMode = SolverModeTypes::scalar; } @@ -95,25 +94,26 @@ void ANewtonWorldActor::EndPlay(const EEndPlayReason::Type EndPlayReason) if (m_world) { Cleanup(); - switch (EndPlayReason) - { - case EEndPlayReason::Destroyed: - ndAssert(0); - break; - case EEndPlayReason::LevelTransition: - ndAssert(0); - break; - case EEndPlayReason::EndPlayInEditor: - ndAssert(0); - break; - case EEndPlayReason::RemovedFromWorld: - ndAssert(0); - break; - case EEndPlayReason::Quit: - m_world->Sync(); - delete m_world; - break; - } + delete m_world; + //switch (EndPlayReason) + //{ + // case EEndPlayReason::Destroyed: + // ndAssert(0); + // break; + // case EEndPlayReason::LevelTransition: + // ndAssert(0); + // break; + // case EEndPlayReason::EndPlayInEditor: + // ndAssert(0); + // break; + // case EEndPlayReason::RemovedFromWorld: + // ndAssert(0); + // break; + // case EEndPlayReason::Quit: + // m_world->Sync(); + // delete m_world; + // break; + //} } } @@ -162,11 +162,8 @@ void ANewtonWorldActor::StartGame() void ANewtonWorldActor::Cleanup() { m_world->Sync(); - UWorld* const world = GetWorld(); - m_world->Sync(); - // remove all joints body actors. for (TActorIterator actorItr(world); actorItr; ++actorItr) { @@ -204,17 +201,6 @@ void ANewtonWorldActor::Cleanup() } } -void ANewtonWorldActor::Destroyed() -{ - Super::Destroyed(); - - if (m_world) - { - m_world->Sync(); - delete m_world; - } -} - void ANewtonWorldActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) { AActor::PostEditChangeProperty(PropertyChangedEvent); @@ -257,7 +243,7 @@ void ANewtonWorldActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyCh float ANewtonWorldActor::GetSimTime() const { - return float (m_world->GetAverageUpdateTime()); + return float (m_world ? m_world->GetAverageUpdateTime(): 0.0f); } void ANewtonWorldActor::ApplySettings() @@ -288,105 +274,92 @@ void ANewtonWorldActor::ApplySettings() } } -// Called every frame -void ANewtonWorldActor::Tick(float DeltaTime) +void ANewtonWorldActor::PhysicsTick() { - Super::Tick(DeltaTime); -} + const ndFloat32 descreteStep = ndFloat32(1.0f) / UpdateRate; -// tick surugate -void ANewtonWorldActor::Update(float timestep) -{ - if (m_world) + if (m_timeAccumulator > descreteStep * ndFloat32(2.0f)) { - const ndFloat32 descreteStep = (1.0f / UpdateRate); - m_timeAccumulator += timestep; - - if (m_timeAccumulator > descreteStep * ndFloat32 (2.0f)) - { - // truncate slow frame updates - m_timeAccumulator = m_timeAccumulator - descreteStep * ndFloor(m_timeAccumulator / descreteStep) + descreteStep; - } + // truncate slow frame updates + m_timeAccumulator = m_timeAccumulator - descreteStep * ndFloor(m_timeAccumulator / descreteStep) + descreteStep; + } - UWorld* const world = GetWorld(); - while (m_timeAccumulator > descreteStep) - { - m_world->Update(descreteStep); - for (TActorIterator actorItr(world); actorItr; ++actorItr) - { - AActor* const actor = *actorItr; - if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) - { - const TSet& components = actor->GetComponents(); - for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) - { - UNewtonRigidBody* const rigidBody = Cast(*it); - if (rigidBody) - { - rigidBody->InterpolateTransform(m_interpolationParam); - } - } - } - } + UWorld* const world = GetWorld(); + while (m_timeAccumulator > descreteStep) + { + m_world->Update(descreteStep); + m_world->Sync(); + m_timeAccumulator -= descreteStep; - m_timeAccumulator -= descreteStep; - if (!ConcurrentUpdate) - { - m_world->Sync(); - } - } + //UE_LOG(LogTemp, Display, TEXT("loop time step %f(ms) ticks %d"), ndFloat32(microSecondStep) * 1.0e-3f, thicks1 - thicks0); + } +} - m_interpolationParam = ndClamp(m_timeAccumulator / descreteStep, ndFloat32(0.0f), ndFloat32(1.0f)); +void ANewtonWorldActor::VisualTick() +{ + const ndFloat32 descreteStep = (1.0f / UpdateRate); + m_interpolationParam = ndClamp(m_timeAccumulator / descreteStep, ndFloat32(0.0f), ndFloat32(1.0f)); - for (TActorIterator actorItr(world); actorItr; ++actorItr) + UWorld* const world = GetWorld(); + for (TActorIterator actorItr(world); actorItr; ++actorItr) + { + AActor* const actor = *actorItr; + if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) { - AActor* const actor = *actorItr; - if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) + const TSet& components = actor->GetComponents(); + for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) { - const TSet& components = actor->GetComponents(); - for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) + UNewtonRigidBody* const rigidBody = Cast(*it); + if (rigidBody) { - UNewtonRigidBody* const rigidBody = Cast(*it); - if (rigidBody) - { - rigidBody->InterpolateTransform(m_interpolationParam); - } + rigidBody->InterpolateTransform(m_interpolationParam); } } } + } - for (TActorIterator actorItr(world); actorItr; ++actorItr) + for (TActorIterator actorItr(world); actorItr; ++actorItr) + { + AActor* const actor = *actorItr; + if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) { - AActor* const actor = *actorItr; - if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) + const TSet& components = actor->GetComponents(); + for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) { - const TSet& components = actor->GetComponents(); - for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) + UNewtonRigidBody* const meshComp = Cast(*it); + if (meshComp) { - UNewtonRigidBody* const meshComp = Cast(*it); - if (meshComp) - { - meshComp->CalculateLocalTransform(); - } + meshComp->CalculateLocalTransform(); } } } + } - for (TActorIterator actorItr(world); actorItr; ++actorItr) + for (TActorIterator actorItr(world); actorItr; ++actorItr) + { + AActor* const actor = *actorItr; + if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) { - AActor* const actor = *actorItr; - if (actor->FindComponentByClass(UNewtonRigidBody::StaticClass())) + const TSet& components = actor->GetComponents(); + for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) { - const TSet& components = actor->GetComponents(); - for (TSet::TConstIterator it(components.CreateConstIterator()); it; ++it) + UNewtonJoint* const joint = Cast(*it); + if (joint) { - UNewtonJoint* const joint = Cast(*it); - if (joint) - { - joint->UpdateTransform(); - } + joint->UpdateTransform(); } } } } } + +// surrogate tick function +void ANewtonWorldActor::Update(float timestep) +{ + if (m_world) + { + m_timeAccumulator += timestep; + PhysicsTick(); + VisualTick(); + } +} diff --git a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.h b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.h index 0d7a9899bc..e6bb17d9e6 100644 --- a/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.h +++ b/newton-4.00/applications/toolsAndWrapers/newtonUnreal/newton/Source/newton/Private/NewtonWorldActor.h @@ -33,8 +33,6 @@ class ANewtonWorldActor : public AActor // Called when the game starts or when spawned virtual void BeginPlay() override; virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override; - virtual void Destroyed(); - virtual void Tick(float DeltaTime) override; virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; void ApplySettings(); @@ -59,9 +57,6 @@ class ANewtonWorldActor : public AActor UPROPERTY(EditAnywhere, Category = Newton) bool AutoSleepMode; - UPROPERTY(EditAnywhere, Category=Newton) - bool ConcurrentUpdate; - UPROPERTY(EditAnywhere, Category=Newton) bool ClearDebug; @@ -72,6 +67,9 @@ class ANewtonWorldActor : public AActor void Cleanup(); void StartGame(); + void VisualTick(); + void PhysicsTick(); + NewtonWorld* m_world; float m_timeAccumulator; float m_interpolationParam;