Files
UnrealEngineUWP/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/Private/GeometryCollection/GeometryCollectionSceneProxy.h

458 lines
15 KiB
C
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
#pragma once
#include "DynamicMeshBuilder.h"
#include "EngineGlobals.h"
2021-04-20 10:45:04 -04:00
#include "HAL/CriticalSection.h"
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
#include "PrimitiveViewRelevance.h"
#include "PrimitiveSceneProxy.h"
#include "StaticMeshResources.h"
#include "Rendering/SkinWeightVertexBuffer.h"
#include "GeometryCollectionRendering.h"
#include "GeometryCollection/GeometryCollectionEditorSelection.h"
#include "HitProxies.h"
#include "EngineUtils.h"
#include "NaniteSceneProxy.h"
#if GEOMETRYCOLLECTION_EDITOR_SELECTION
#include "GeometryCollection/GeometryCollectionHitProxy.h"
#endif
class UGeometryCollection;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
class UGeometryCollectionComponent;
struct FGeometryCollectionSection;
struct HGeometryCollection;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
namespace Nanite
{
struct FResources;
}
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Index Buffer */
class FGeometryCollectionIndexBuffer : public FIndexBuffer
{
public:
virtual void InitRHI() override
{
FRHIResourceCreateInfo CreateInfo(TEXT("FGeometryCollectionIndexBuffer"));
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
IndexBufferRHI = RHICreateIndexBuffer(sizeof(int32), NumIndices * sizeof(int32), BUF_Dynamic, CreateInfo);
}
int32 NumIndices;
};
/** Vertex Buffer for Bone Map*/
class FGeometryCollectionBoneMapBuffer : public FVertexBuffer
{
public:
virtual void InitRHI() override
{
FRHIResourceCreateInfo CreateInfo(TEXT("FGeometryCollectionBoneMapBuffer"));
// #note: Bone Map is stored in uint16, but shaders only support uint32
VertexBufferRHI = RHICreateVertexBuffer(NumVertices * sizeof(uint32), BUF_Static | BUF_ShaderResource, CreateInfo);
VertexBufferSRV = RHICreateShaderResourceView(VertexBufferRHI, sizeof(uint32), PF_R32_UINT);
}
int32 NumVertices;
FShaderResourceViewRHIRef VertexBufferSRV;
};
/** Vertex Buffer for transform data */
class FGeometryCollectionTransformBuffer : public FVertexBuffer
{
public:
virtual void InitRHI() override
{
FRHIResourceCreateInfo CreateInfo(TEXT("FGeometryCollectionTransformBuffer"));
// #note: This differs from instanced static mesh in that we are storing the entire transform in the buffer rather than
// splitting out the translation. This is to simplify transferring data at runtime as a memcopy
VertexBufferRHI = RHICreateVertexBuffer(NumTransforms * sizeof(FVector4f) * 4, BUF_Dynamic | BUF_ShaderResource, CreateInfo);
VertexBufferSRV = RHICreateShaderResourceView(VertexBufferRHI, 16, PF_A32B32G32R32F);
}
void UpdateDynamicData(const TArray<FMatrix44f>& Transforms, EResourceLockMode LockMode);
int32 NumTransforms;
FShaderResourceViewRHIRef VertexBufferSRV;
};
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
inline void CopyTransformsWithConversionWhenNeeded(TArray<FMatrix44f>& DstTransforms, const TArray<FMatrix>& SrcTransforms)
{
// LWC_TODO : we have no choice but to convert each element at this point to avoid changing GeometryCollectionAlgo::GlobalMatrices that is used all over the place
DstTransforms.SetNumUninitialized(SrcTransforms.Num());
for (int TransformIndex = 0; TransformIndex < SrcTransforms.Num(); ++TransformIndex)
{
DstTransforms[TransformIndex] = FMatrix44f(SrcTransforms[TransformIndex]); // LWC_TODO: Perf pessimization
}
}
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Immutable rendering data (kind of) */
struct FGeometryCollectionConstantData
{
TArray<FVector3f> Vertices;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
TArray<FIntVector> Indices;
TArray<FVector3f> Normals;
TArray<FVector3f> TangentU;
TArray<FVector3f> TangentV;
TArray<TArray<FVector2f>> UVs;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
TArray<FLinearColor> Colors;
TArray<int32> BoneMap;
TArray<FLinearColor> BoneColors;
TArray<FGeometryCollectionSection> Sections;
uint32 NumTransforms;
FBox LocalBounds;
TArray<FIntVector> OriginalMeshIndices;
TArray<FGeometryCollectionSection> OriginalMeshSections;
TArray<FMatrix44f> RestTransforms;
void SetRestTransforms(const TArray<FMatrix>& InTransforms)
{
// use for LWC as FMatrix and FMatrix44f are different when LWC is on
CopyTransformsWithConversionWhenNeeded(RestTransforms, InTransforms);
}
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
};
/** Mutable rendering data */
struct FGeometryCollectionDynamicData
{
TArray<FMatrix44f> Transforms;
TArray<FMatrix44f> PrevTransforms;
2021-04-20 10:45:04 -04:00
uint32 ChangedCount;
uint8 IsDynamic : 1;
uint8 IsLoading : 1;
2021-04-20 10:45:04 -04:00
FGeometryCollectionDynamicData()
{
Reset();
}
void Reset()
{
Transforms.Reset();
PrevTransforms.Reset();
IsDynamic = false;
IsLoading = false;
}
void SetTransforms(const TArray<FMatrix>& InTransforms)
{
// use for LWC as FMatrix and FMatrix44f are different when LWC is on
CopyTransformsWithConversionWhenNeeded(Transforms, InTransforms);
}
void SetPrevTransforms(const TArray<FMatrix>& InTransforms)
{
// use for LWC as FMatrix and FMatrix44f are different when LWC is on
CopyTransformsWithConversionWhenNeeded(PrevTransforms, InTransforms);
}
void SetAllTransforms(const TArray<FMatrix>& InTransforms)
{
SetTransforms(InTransforms);
PrevTransforms = Transforms;
ChangedCount = Transforms.Num();
}
2021-04-20 10:45:04 -04:00
void DetermineChanges()
{
// Check if previous transforms are the same as current
const float EqualTolerance = 1e-6;
check(Transforms.Num() == PrevTransforms.Num());
if (Transforms.Num() != PrevTransforms.Num())
{
ChangedCount = Transforms.Num();
}
else
{
ChangedCount = 0;
for (int32 TransformIndex = 0; TransformIndex < Transforms.Num(); ++TransformIndex)
{
if (!PrevTransforms[TransformIndex].Equals(Transforms[TransformIndex], EqualTolerance))
{
++ChangedCount;
}
}
}
}
};
class FGeometryCollectionDynamicDataPool
{
public:
FGeometryCollectionDynamicDataPool();
~FGeometryCollectionDynamicDataPool();
FGeometryCollectionDynamicData* Allocate();
void Release(FGeometryCollectionDynamicData* DynamicData);
private:
TArray<FGeometryCollectionDynamicData*> UsedList;
TArray<FGeometryCollectionDynamicData*> FreeList;
FCriticalSection ListLock;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
};
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/***
* FGeometryCollectionSceneProxy
*
* The FGeometryCollectionSceneProxy manages the interaction between the GeometryCollectionComponent
* on the game thread and the vertex buffers on the render thread.
*
* NOTE : This class is still in flux, and has a few pending todos. Your comments and
* thoughts are appreciated though. The remaining items to address involve:
* - @todo double buffer - The double buffering of the FGeometryCollectionDynamicData.
* - @todo previous state - Saving the previous FGeometryCollectionDynamicData for rendering motion blur.
* - @todo shared memory model - The Asset(or Actor?) should hold the Vertex buffer, and pass the reference to the SceneProxy
* - @todo GPU skin : Make the skinning use the GpuVertexShader
*/
class FGeometryCollectionSceneProxy final : public FPrimitiveSceneProxy
{
TArray<UMaterialInterface*> Materials;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
FMaterialRelevance MaterialRelevance;
int32 NumVertices;
int32 NumIndices;
FGeometryCollectionVertexFactory VertexFactory;
bool bSupportsManualVertexFetch;
const bool bSupportsTripleBufferVertexUpload;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
FStaticMeshVertexBuffers VertexBuffers;
FGeometryCollectionIndexBuffer IndexBuffer;
FGeometryCollectionIndexBuffer OriginalMeshIndexBuffer;
FGeometryCollectionBoneMapBuffer BoneMapBuffer;
TArray<FGeometryCollectionTransformBuffer, TInlineAllocator<3>> TransformBuffers;
TArray<FGeometryCollectionTransformBuffer, TInlineAllocator<3>> PrevTransformBuffers;
int32 CurrentTransformBufferIndex = 0;
FBoxSphereBounds PreSkinnedBounds;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
TArray<FGeometryCollectionSection> Sections;
#if GEOMETRYCOLLECTION_EDITOR_SELECTION
FColorVertexBuffer HitProxyIdBuffer;
TArray<FGeometryCollectionSection> SubSections;
TArray<TRefCountPtr<HGeometryCollection>> SubSectionHitProxies;
TMap<int32, int32> SubSectionHitProxyIndexMap;
// @todo FractureTools - Reconcile with SubSectionHitProxies. Currently subsection hit proxies dont work for per-vertex submission
TArray<TRefCountPtr<HGeometryCollectionBone>> PerBoneHitProxies;
bool bUsesSubSections;
#endif
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
FGeometryCollectionDynamicData* DynamicData;
FGeometryCollectionConstantData* ConstantData;
bool bShowBoneColors;
bool bEnableBoneSelection;
bool bSuppressSelectionMaterial;
int BoneSelectionMaterialID;
bool bUseFullPrecisionUVs = false;
bool TransformVertexBuffersContainsOriginalMesh;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
public:
SIZE_T GetTypeHash() const override
{
static size_t UniquePointer;
return reinterpret_cast<size_t>(&UniquePointer);
}
FGeometryCollectionSceneProxy(UGeometryCollectionComponent* Component);
/** virtual destructor */
virtual ~FGeometryCollectionSceneProxy();
void DestroyRenderThreadResources()override;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Current number of vertices to render */
int32 GetRequiredVertexCount() const { return NumVertices; }
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Current number of indices to connect */
int32 GetRequiredIndexCount() const { return NumIndices; }
/** Called on render thread to setup static geometry for rendering */
void SetConstantData_RenderThread(FGeometryCollectionConstantData* NewConstantData, bool ForceInit = false);
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Called on render thread to setup dynamic geometry for rendering */
void SetDynamicData_RenderThread(FGeometryCollectionDynamicData* NewDynamicData);
/** Called on render thread to construct the vertex definitions */
void BuildGeometry(const FGeometryCollectionConstantData* ConstantDataIn, TArray<FDynamicMeshVertex>& OutVertices, TArray<int32>& OutIndices, TArray<int32> &OutOriginalMeshIndices);
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Called on render thread to setup dynamic geometry for rendering */
virtual void GetDynamicMeshElements(const TArray<const FSceneView*>& Views, const FSceneViewFamily& ViewFamily, uint32 VisibilityMap, FMeshElementCollector& Collector) const override;
#if RHI_RAYTRACING
virtual bool IsRayTracingRelevant() const { return true; }
virtual bool IsRayTracingStaticRelevant() const { return false; }
virtual void GetDynamicRayTracingInstances(FRayTracingMaterialGatheringContext& Context, TArray<struct FRayTracingInstance>& OutRayTracingInstances) override;
void UpdatingRayTracingGeometry_RenderingThread(FGeometryCollectionIndexBuffer* IndexBuffer);
#endif
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
/** Manage the view assignment */
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
// @todo allocated size : make this reflect internally allocated memory.
virtual uint32 GetMemoryFootprint(void) const override { return(sizeof(*this) + GetAllocatedSize()); }
/** Size of the base class */
uint32 GetAllocatedSize(void) const { return(FPrimitiveSceneProxy::GetAllocatedSize()); }
// FPrimitiveSceneProxy interface.
#if WITH_EDITOR
virtual HHitProxy* CreateHitProxies(UPrimitiveComponent* Component, TArray<TRefCountPtr<HHitProxy> >& OutHitProxies) override;
virtual const FColorVertexBuffer* GetCustomHitProxyIdBuffer() const override { return bEnableBoneSelection ? &HitProxyIdBuffer : nullptr; }
#endif // WITH_EDITOR
#if GEOMETRYCOLLECTION_EDITOR_SELECTION
/** Enable/disable the per transform selection mode.
* This forces more sections/mesh batches to be sent to the renderer while also allowing the editor
* to return a special HitProxy containing the transform index of the section that has been clicked on.
*/
void UseSubSections(bool bInUsesSubSections, bool bForceInit);
#endif
void GetPreSkinnedLocalBounds(FBoxSphereBounds& OutBounds) const override;
void SetupVertexFactory(FGeometryCollectionVertexFactory& GeometryCollectionVertexFactory) const;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
protected:
/** Create the rendering buffer resources */
void InitResources();
/** Return the rendering buffer resources */
void ReleaseResources();
/** Get material proxy from material ID */
FMaterialRenderProxy* GetMaterial(FMeshElementCollector& Collector, int32 MaterialIndex) const;
Copying //UE4/Dev-Physics to //UE4/Dev-Main (Source: //UE4/Dev-Physics @ 4242698) #rb none #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 4023283 by Michael.Lentine Fix memory leak. Change 4024243 by Michael.Lentine Add debugging output code from github #4533. #jira ue-55764 Change 4026362 by Michael.Lentine Merged github #3704. #jira ue-463394 Change 4026545 by Michael.Lentine Fix ordering of collision settings changed callback #jira ue-50475 Change 4026609 by Michael.Lentine Fix crash in destruction for when world is not valid #jira ue-53989 Change 4026786 by Michael.Lentine Merging github #4632 to fix memory leak. #jira ue-57255 Change 4027293 by Michael.Lentine Integrate github #4338. #jira ue-53497 Change 4033517 by Michael.Lentine Fix collision body creation for spline merging. #jira ue-53956 Change 4039750 by Michael.Lentine Add basic error message if cooking fails. Change 4040210 by Michael.Lentine Check for nullptr Change 4098887 by Michael.Lentine Fix warnings. Change 4103511 by Michael.Lentine Prevent crash when BodyInstance is invalid. Change 4117826 by Michael.Lentine Fix check for body being fixed. Change 4122307 by Benn.Gallagher PS4/clang build fixes Change 4124479 by Benn.Gallagher Fix non-portable filename used as an include (Linux editor build CIS error) Change 4125450 by Benn.Gallagher Fixup Ocean Change 4127210 by Michael.Lentine Update the PreviousBoneTransforms array when setting transforms in DestructibleComponent #jira ue-58813 Change 4127309 by Benn.Gallagher Fix Win32 shipping builds Change 4134570 by Michael.Lentine Missed fixes for WITH_UEPHYSICS. Change 4134585 by Michael.Lentine Missed a few more files. Change 4134670 by Michael.Lentine Update formatting. Change 4134671 by Michael.Lentine More formatting. Change 4150615 by Benn.Gallagher Moved immediate mode into engine, as it is now depended on by the physics engine. Change 4150680 by Benn.Gallagher Missed file Change 4150980 by Benn.Gallagher Rename kinematic target for immediate mode to avoid ambiguous symbols in engine Change 4151400 by Brice.Criswell Apeiron Levelset initilization issue. ---- Change 4157880 by Benn.Gallagher More fixing unresolved template specialisations for FN editor. Change 4159128 by Michael.Lentine Compile fixes Change 4159786 by Brice.Criswell Apeiron Levelset curvature initialization fix, clamps out of bounds phi values to phi[i]. ------ Change 4160382 by Michael.Lentine Fix node initialization Change 4160463 by Brice.Criswell Apeiron Levelset index fix. ---- Change 4161425 by Benn.Gallagher Added package, class and struct redirects for moving immediate physics into engine. Change 4164195 by Brice.Criswell GeometryCollection : Code review updates - Removed typedef for GeometryCollection::ManagedArray<T> - Renamed Enumerations to begin with E prefix, retyped to be uint8. - Removed EArrayScoipe::FScopeNone, now defautls to FScopeShared - Formatted type modifiers to follow UE4 coding standard. - Derived the ManagedArrayBase from FNonCopyable - Disabled TManagedArrays copy constructor and assignment operator. - Converted most accessors on GeometryCollection to TSharedRef. - Added .inl style definitions to simplify the management of the ManagedArrayTypes ----- Change 4164235 by Brice.Criswell GeometryCollection : Added New Files - Added the ManagedArrayTypes files. ---- Change 4164309 by Brice.Criswell GeometryCollection : Moved the initialization of the RigidBodyIdArray and CenterOfMassArray into the WITH_APEIRON definition. ----- Change 4166133 by Brice.Criswell GeometryCollection Added GeometryCollectionEdit class to protect access to the rest and dynamic collections. ----- Change 4171540 by Michael.Lentine Fix reset #robomerge destruction Change 4171912 by Michael.Lentine Rename BVHParticles #robomerge destruction Change 4172445 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4172623 by Brice.Criswell GeometryCollection Debugging ToString to inspect the GeometryCollection ---- Change 4172711 by Michael.Lentine Add Immediate Path to Geometry Collection Change 4172778 by Michael.Lentine Update LL Interface to use Simulation type. #robomerge destruction Change 4172780 by Michael.Lentine Missed files #robomerge destruction Change 4173238 by Benn.Gallagher Missed file from last checkin Change 4173554 by Benn.Gallagher Few extra changes for const correctness and actor counts Change 4174153 by Benn.Gallagher Fixed non-unity build issue from Geom Collection. Change 4175355 by Brice.Criswell GeometryCollection Separated the GeometryCollection from USE_APEIRON flag. ----- Change 4175533 by Brice.Criswell GeometryCollection Defaulting Aperion to off. ----- Change 4175761 by Michael.Lentine Fix collisions. Change 4177105 by Benn.Gallagher Another geom collection CIS fix when running without PCHs Change 4177796 by Brice.Criswell GeometryCollection - Added parenting function to manage the BoneHierarchy Array - Split collection along yz-plane. ----- Change 4177989 by Brice.Criswell GeometryCollection - Moved Hierarchy and Transform array elements into base class TransformCollection - Renamed ParticleGroup to TransformGroup. ----- Change 4178826 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ---- Change 4178840 by Brice.Criswell Geometry Collection Removed FORCEINLINE from GeometryCollectionEdit.GetRestCollection ---- Change 4179493 by Brice.Criswell GeometryCollection New icons. ----- Change 4182428 by Brice.Criswell Build Configuration Apeiron configuration. - Modified bCompileApeiron to enable the compilation of the Apeiron plugin. - Added bUseApeiron to enable Apeiron in the physics interfaces. Changed PhysScene_Apeiron to enable when bCompileApeiron is enabled. Disabled the GeometryCollection* Plugins in the build. ------- Change 4185886 by Brice.Criswell GeometryCollection Renaming TransformGroup. --- Change 4186389 by michael.lentine Don't create in parallel for immediate mode. Change 4186457 by michael.lentine Hack to prevent crashing when Visible is nullptr. Change 4198872 by Brice.Criswell Apeiron Clustering changes - Clustering based on hierarchy's defined within the Geometry Collection ----- Change 4199861 by Brice.Criswell GeometryCollection Disable Apeiron in the Collection. ------ Change 4200089 by Brice.Criswell GeometryCollection Updated to enable Apeiron in the GeometryCollection when the bCompileAperion flag is enabled in the UnrealBuildTool. --- Change 4200333 by Brice.Criswell Copying //UE4/Dev-Destruction to Dev-Physics (//UE4/Dev-Physics) ----- Change 4202231 by Michael.Lentine Disable collisions between adjacent bodies connected by a joint. This typically would be specified by an artist but classic PhysX always does this uncondintionally so our clients are used to this. Change 4202748 by Michael.Lentine Fix 2015 compile. Change 4204528 by Michael.Lentine Disable Apeiron. Change 4206396 by Michael.Lentine Fix 2015 build. Static cast apparently is not an accetible conversion from uint32 to bool. #robomerge destruction Change 4206604 by Michael.Lentine Fix for using ccd and kinematic. #jira UE-61694 #robomerge destruction Change 4206711 by mason.seay Refreshed Set Angular Drive nodes to clear out orphan pins Change 4207286 by Brice.Criswell GeometryCollection Transform hierarchy evaluation within BoneHierarchy of the Collection. Parenting operations are implemented on an updated morphology using : ParentTransforms(UGeometryCollection* GeometryCollection, const int32 InsertAtIndex, const TArray<int32>& SelectedBones); To parent a new transform: int32 RootIndex << within len( TransformGroup ) or -1 for a non-parented node. int32 BoneIndex = Collection->AddElements(1, UGeometryCollection::TransformGroup); GeometryCollectionAlgo::ParentTransform(Collection, RootIndex, BoneIndex); Transform[BoneIndex] = <some transform within local space of the RootIndex> Default collections have all geometry not parented. The function EnsureSingleRoot was added to guarantee that the collection has at least one parent node. FGeometryCollectionCommands::EnsureSinglRoot(UGeometryCollection* RestCollection) Then matrices relative to the collections root are calculated using: GlobalMatrices(UGeometryCollection* GeometryCollection, TArray<FTransform> & Transforms); Added Damage Threshold to GeometryCollectionActor ------ Change 4208039 by Brice.Criswell GeometryCollection Fix for static include failure. --- Change 4208170 by Brice.Criswell GeometryCache SplitAlongYZ to support multiple levels and orientations. --- Change 4208174 by Michael.Lentine Avoid shadow warnings and switch logs to verbose instead of warnings. #robomerge destruction Change 4210255 by Benn.Gallagher Static analysis fixes Change 4210394 by Michael.Lentine Use correct particle type for updateconstraints. Change 4211153 by Brice.Criswell Apeiron Exposing friction and coefficient of restitution to the actor. ----- Change 4213034 by michael.lentine Rename bounding volume Change 4216783 by Michael.Lentine Committing cooking fix to Dev-Physics in order to get smoke tests running. Change 4218078 by Benn.Gallagher Fixed memory and TLS slot leak caused by previous change to physics scene cleanup while cooking #jira UE-61633 Change 4219206 by Michael.Lentine Use the adaptor to get the rotation. #jira ue-61748 Change 4220469 by Benn.Gallagher Fixed overlaps re-triggering on movement due to bad transform chaining from component to phys actor to shape #jira UE-61703 Change 4220538 by Benn.Gallagher Fixed PhysX errors when setting global transforms of kinematic and static objects. #jira none Change 4222138 by Michael.Lentine Update use of Vulkan on android. Change 4222139 by Michael.Lentine Update OculusHMD plugin to use correct vulkan search path. Change 4225740 by Michael.Lentine Integrate changes to update rotation and mass. Change 4225928 by michael.lentine Use more accurate collision point. Change 4226560 by michael.lentine Enable contact graph Change 4227397 by Michael.Lentine If we don't have a global scene we need to not detect collisions. #robomerge destruction Change 4227410 by Michael.Lentine Missing include #robomerge destruction Change 4228107 by Michael.Lentine Integrate static contact changes. Change 4228612 by michael.lentine Use more correct thresholding. Change 4228734 by Benn.Gallagher Getting LLImmediate high level stood up and simulating Implementation is incomplete, only what is required to get simple scenes simulating under immediate mode Change 4228748 by Benn.Gallagher Missed file from checkin Change 4228885 by Ori.Cohen Added base physics interface class to help provide default behavior and easily chain functionality together Change 4228992 by Ori.Cohen Fix cis Change 4229921 by Benn.Gallagher Fixed contact pre-filter performance regression Change 4230825 by Benn.Gallagher Moved WIP physics interfaces to Experimental/ folders Change 4230853 by Benn.Gallagher Fixup includes after moving WIP physics interfaces Change 4231414 by Michael.Lentine Use global namespace to avoid mac compile errors. #jira ue-62137 [CL 4242847 by Michael Lentine in Main branch]
2018-07-31 02:23:26 -04:00
FGeometryCollectionTransformBuffer& GetCurrentTransformBuffer()
{
return TransformBuffers[CurrentTransformBufferIndex];
}
FGeometryCollectionTransformBuffer& GetCurrentPrevTransformBuffer()
{
return PrevTransformBuffers[CurrentTransformBufferIndex];
}
void CycleTransformBuffers(bool bCycle)
{
if (bCycle)
{
CurrentTransformBufferIndex = (CurrentTransformBufferIndex + 1) % TransformBuffers.Num();
}
}
private:
#if GEOMETRYCOLLECTION_EDITOR_SELECTION
/** Create transform index based subsections for all current sections. */
void InitializeSubSections_RenderThread();
/** Release subsections by emptying the associated arrays. */
void ReleaseSubSections_RenderThread();
#endif
#if RHI_RAYTRACING
bool bGeometryResourceUpdated = false;
FRayTracingGeometry RayTracingGeometry;
FRWBuffer RayTracingDynamicVertexBuffer;
#endif
};
class FNaniteGeometryCollectionSceneProxy : public Nanite::FSceneProxyBase
{
public:
using Super = Nanite::FSceneProxyBase;
FNaniteGeometryCollectionSceneProxy(UGeometryCollectionComponent* Component);
virtual ~FNaniteGeometryCollectionSceneProxy() = default;
public:
// FPrimitiveSceneProxy interface.
virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) const override;
#if WITH_EDITOR
virtual HHitProxy* CreateHitProxies(UPrimitiveComponent* Component, TArray<TRefCountPtr<HHitProxy> >& OutHitProxies) override;
#endif
virtual void DrawStaticElements(FStaticPrimitiveDrawInterface* PDI) override;
virtual uint32 GetMemoryFootprint() const override;
virtual void OnTransformChanged() override;
More instance data memory and CPU optimizations, and general refactoring. * Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it). * Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive. * Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded. * Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies. * Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy * Removed expensive per-instance checks() in a few spots * Stubbed out upcoming per instance payload allocator offset * Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path * Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions. * Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing. * Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites * Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues() * Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency #rb jason.nadro, krzysztof.narkowicz [FYI] rune.stubbe, brian.karis #ROBOMERGE-OWNER: graham.wihlidal #ROBOMERGE-AUTHOR: graham.wihlidal #ROBOMERGE-SOURCE: CL 16583156 #ROBOMERGE-BOT: (v828-16531559) #ROBOMERGE-CONFLICT from-shelf [CL 16583193 by graham wihlidal in ue5-main branch]
2021-06-07 23:55:28 -04:00
// FSceneProxyBase interface.
virtual void GetNaniteResourceInfo(uint32& ResourceID, uint32& HierarchyOffset, uint32& ImposterIndex) const override;
More instance data memory and CPU optimizations, and general refactoring. * Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it). * Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive. * Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded. * Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies. * Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy * Removed expensive per-instance checks() in a few spots * Stubbed out upcoming per instance payload allocator offset * Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path * Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions. * Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing. * Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites * Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues() * Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency #rb jason.nadro, krzysztof.narkowicz [FYI] rune.stubbe, brian.karis #ROBOMERGE-OWNER: graham.wihlidal #ROBOMERGE-AUTHOR: graham.wihlidal #ROBOMERGE-SOURCE: CL 16583156 #ROBOMERGE-BOT: (v828-16531559) #ROBOMERGE-CONFLICT from-shelf [CL 16583193 by graham wihlidal in ue5-main branch]
2021-06-07 23:55:28 -04:00
/** Called on render thread to setup static geometry for rendering */
void SetConstantData_RenderThread(FGeometryCollectionConstantData* NewConstantData, bool ForceInit = false);
/** Called on render thread to setup dynamic geometry for rendering */
void SetDynamicData_RenderThread(FGeometryCollectionDynamicData* NewDynamicData);
void ResetPreviousTransforms_RenderThread();
void FlushGPUSceneUpdate_GameThread();
FORCEINLINE void SetRequiresGPUSceneUpdate_RenderThread(bool bRequireUpdate)
{
bRequiresGPUSceneUpdate = bRequireUpdate;
}
FORCEINLINE bool GetRequiresGPUSceneUpdate_RenderThread() const
{
return bRequiresGPUSceneUpdate;
}
void OnMotionBegin();
void OnMotionEnd();
protected:
More instance data memory and CPU optimizations, and general refactoring. * Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it). * Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive. * Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded. * Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies. * Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy * Removed expensive per-instance checks() in a few spots * Stubbed out upcoming per instance payload allocator offset * Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path * Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions. * Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing. * Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites * Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues() * Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency #rb jason.nadro, krzysztof.narkowicz [FYI] rune.stubbe, brian.karis #ROBOMERGE-OWNER: graham.wihlidal #ROBOMERGE-AUTHOR: graham.wihlidal #ROBOMERGE-SOURCE: CL 16583156 #ROBOMERGE-BOT: (v828-16531559) #ROBOMERGE-CONFLICT from-shelf [CL 16583193 by graham wihlidal in ue5-main branch]
2021-06-07 23:55:28 -04:00
const UGeometryCollection* GeometryCollection = nullptr;
struct FGeometryNaniteData
{
FBoxSphereBounds LocalBounds;
More instance data memory and CPU optimizations, and general refactoring. * Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it). * Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive. * Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded. * Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies. * Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy * Removed expensive per-instance checks() in a few spots * Stubbed out upcoming per instance payload allocator offset * Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path * Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions. * Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing. * Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites * Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues() * Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency #rb jason.nadro, krzysztof.narkowicz [FYI] rune.stubbe, brian.karis #ROBOMERGE-OWNER: graham.wihlidal #ROBOMERGE-AUTHOR: graham.wihlidal #ROBOMERGE-SOURCE: CL 16583156 #ROBOMERGE-BOT: (v828-16531559) #ROBOMERGE-CONFLICT from-shelf [CL 16583193 by graham wihlidal in ue5-main branch]
2021-06-07 23:55:28 -04:00
uint32 HierarchyOffset;
};
TArray<FGeometryNaniteData> GeometryNaniteData;
uint32 NaniteResourceID = INDEX_NONE;
uint32 NaniteHierarchyOffset = INDEX_NONE;
// TODO: Should probably calculate this on the materials array above instead of on the component
// Null and !Opaque are assigned default material unlike the component material relevance.
FMaterialRelevance MaterialRelevance;
uint32 bCastShadow : 1;
uint32 bReverseCulling : 1;
uint32 bHasMaterialErrors : 1;
uint32 bCurrentlyInMotion : 1;
uint32 bRequiresGPUSceneUpdate : 1;
};
// Support ISPC enable/disable in non-shipping builds
#if !INTEL_ISPC
const bool bGeometryCollection_SetDynamicData_ISPC_Enabled = false;
#elif UE_BUILD_SHIPPING
const bool bGeometryCollection_SetDynamicData_ISPC_Enabled = true;
#else
extern bool bGeometryCollection_SetDynamicData_ISPC_Enabled;
#endif