Skip to content

Commit

Permalink
Finish internal restructure.
Browse files Browse the repository at this point in the history
HWRT back operational.
Support for poly groups
  • Loading branch information
Koderz committed Oct 24, 2023
1 parent fcd35eb commit a52adde
Show file tree
Hide file tree
Showing 75 changed files with 8,489 additions and 2,947 deletions.
9 changes: 8 additions & 1 deletion Config/DefaultRealtimeMeshComponent.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,11 @@
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionCastShadow",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionCastShadow_Blueprint")
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionVisibility",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionVisibility_Blueprint")
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionConfig",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionConfig_Blueprint")
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment_Blueprint")
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment_Blueprint")


+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.URealtimeMeshBlueprintFunctionLibrary.AppendBoxMesh",NewName="/Script/RealtimeMeshComponent.URealtimeMeshSimpleBasicShapeTools.AppendBoxMesh")
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.URealtimeMeshBlueprintFunctionLibrary.AppendMesh",NewName="/Script/RealtimeMeshComponent.URealtimeMeshSimpleBasicShapeTools.AppendMesh")
+PropertyRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshTrianglesSegment.MaterialIndex",NewName="/Script/RealtimeMeshComponent.RealtimeMeshPolygonGroupRange.PolygonGroupIndex")
+StructRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshTrianglesSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshPolygonGroupRange")
+ClassRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshStream",NewName="/Script/RealtimeMeshComponent.RealtimeMeshStreamOld")
Binary file not shown.
Binary file not shown.
69 changes: 37 additions & 32 deletions RealtimeMeshComponent.uplugin
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
{
"FileVersion": 3,
"Version": 50,
"VersionName": "5.0.5",
"FriendlyName": "Realtime Mesh Component",
"Description": "A component allowing for rendering and interacting with runtime generated geometry.",
"Category": "Rendering",
"CreatedBy": "Chris Conway (Koderz)",
"CreatedByURL": "hhttps://github.com/Koderz",
"DocsURL": "https://realtimemesh.koderz.io/",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/ad0b45a6a31e462aba7cf7c790a9c125",
"SupportURL": "https://github.com/TriAxis-Games/RealtimeMeshComponent/issues",
"EnabledByDefault": true,
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": false,
"Modules": [
{
"Name": "RealtimeMeshComponent",
"Type": "Runtime",
"LoadingPhase": "PostConfigInit"
},
{
"Name": "RealtimeMeshTests",
"Type": "Editor",
"LoadingPhase": "Default"
},
{
"Name": "RealtimeMeshEditor",
"Type": "Editor",
"LoadingPhase": "Default"
}
]
"FileVersion": 3,
"Version": 50,
"VersionName": "5.0.5",
"FriendlyName": "Realtime Mesh Component",
"Description": "A component allowing for rendering and interacting with runtime generated geometry.",
"Category": "Rendering",
"CreatedBy": "Chris Conway (Koderz)",
"CreatedByURL": "hhttps://github.com/Koderz",
"DocsURL": "https://realtimemesh.koderz.io/",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/ad0b45a6a31e462aba7cf7c790a9c125",
"SupportURL": "https://github.com/TriAxis-Games/RealtimeMeshComponent/issues",
"EnabledByDefault": true,
"CanContainContent": true,
"IsBetaVersion": false,
"Installed": false,
"Modules": [
{
"Name": "RealtimeMeshComponent",
"Type": "Runtime",
"LoadingPhase": "PostConfigInit"
},
{
"Name": "RealtimeMeshTests",
"Type": "Editor",
"LoadingPhase": "Default"
},
{
"Name": "RealtimeMeshEditor",
"Type": "Editor",
"LoadingPhase": "Default"
},
{
"Name": "RealtimeMeshComponentExtensions",
"Type": "Runtime",
"LoadingPhase": "Default"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Copyright TriAxis Games, L.L.C. All Rights Reserved.

#include "..\..\Public\Data\RealtimeMeshData.h"
#include "Data/RealtimeMeshData.h"

#include "Data/RealtimeMeshLOD.h"
#include "Data/RealtimeMeshSectionGroup.h"
#include "Data/RealtimeMeshStateUpdate.h"
#include "RenderProxy/RealtimeMeshProxy.h"
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
#if RMC_ENGINE_ABOVE_5_2
#include "Logging/MessageLog.h"
#endif

Expand Down
5 changes: 2 additions & 3 deletions Source/RealtimeMeshComponent/Private/Data/RealtimeMeshLOD.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// Copyright TriAxis Games, L.L.C. All Rights Reserved.

#include "Data/RealtimeMeshLOD.h"
#include "RealtimeMeshShared.h"
#include "Data/RealtimeMeshShared.h"
#include "Data/RealtimeMeshSectionGroup.h"
#include "Data/RealtimeMeshStateUpdate.h"
#include "RenderProxy/RealtimeMeshLODProxy.h"
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
#if RMC_ENGINE_ABOVE_5_2
#include "Logging/MessageLog.h"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Data/RealtimeMeshSection.h"
#include "RealtimeMeshGuard.h"
#include "RealtimeMeshShared.h"
#include "Data/RealtimeMeshShared.h"
#include "Data/RealtimeMeshData.h"
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
#include "RenderProxy/RealtimeMeshSectionProxy.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#include "Data/RealtimeMeshSectionGroup.h"
#include "RealtimeMeshGuard.h"
#include "RealtimeMeshShared.h"
#include "Data/RealtimeMeshShared.h"
#include "Data/RealtimeMeshSection.h"
#include "RenderProxy/RealtimeMeshGPUBuffer.h"
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
#include "RenderProxy/RealtimeMeshSectionGroupProxy.h"
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
#if RMC_ENGINE_ABOVE_5_2
#include "Logging/MessageLog.h"
#endif

Expand Down Expand Up @@ -65,6 +65,18 @@ namespace RealtimeMesh
return Sections.Num();
}

bool FRealtimeMeshSectionGroup::HasStreams() const
{
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
return Streams.Num() > 0;
}

TSet<FRealtimeMeshStreamKey> FRealtimeMeshSectionGroup::GetStreamKeys() const
{
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
return Streams;
}

FRealtimeMeshSectionPtr FRealtimeMeshSectionGroup::GetSection(const FRealtimeMeshSectionKey& SectionKey) const
{
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
Expand Down Expand Up @@ -134,14 +146,14 @@ namespace RealtimeMesh
SharedResources->BroadcastSectionGroupBoundsChanged(Key);
}

TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshDataStream&& Stream)
TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshStream&& Stream)
{
FRealtimeMeshProxyCommandBatch Commands(SharedResources->GetOwner());
CreateOrUpdateStream(Commands, MoveTemp(Stream));
return Commands.Commit();
}

void FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshProxyCommandBatch& Commands, FRealtimeMeshDataStream&& Stream)
void FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshProxyCommandBatch& Commands, FRealtimeMeshStream&& Stream)
{
FRealtimeMeshScopeGuardWrite ScopeGuard(SharedResources->GetGuard());

Expand Down Expand Up @@ -219,7 +231,7 @@ namespace RealtimeMesh
TSet<FRealtimeMeshStreamKey> ExistingStreamKeys = Streams;

// Remove all old streams
for (const auto& StreamKey : ExistingStreamKeys)
for (const FRealtimeMeshStreamKey& StreamKey : ExistingStreamKeys)
{
if (!InStreams.Contains(StreamKey))
{
Expand All @@ -228,10 +240,10 @@ namespace RealtimeMesh
}

// Create/Update streams
for (const auto& NewStream : InStreams)
InStreams.ForEach([&](FRealtimeMeshStream& Stream)
{
CreateOrUpdateStream(Commands, MoveTemp(NewStream.Get()));
}
CreateOrUpdateStream(Commands, MoveTemp(Stream));
});
}

TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateSection(const FRealtimeMeshSectionKey& SectionKey, const FRealtimeMeshSectionConfig& InConfig,
Expand Down Expand Up @@ -354,23 +366,6 @@ namespace RealtimeMesh
}
}

TSet<FRealtimeMeshStreamKey> FRealtimeMeshSectionGroup::GetStreamKeys() const
{
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
return Streams;
}

TSet<FRealtimeMeshSectionKey> FRealtimeMeshSectionGroup::GetSectionKeys() const
{
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
TSet<FRealtimeMeshSectionKey> SectionKeys;
for (const auto& Section : Sections)
{
SectionKeys.Add(Section->GetKey());
}
return SectionKeys;
}

void FRealtimeMeshSectionGroup::InvalidateBounds() const
{
Bounds.ClearCachedValue();
Expand All @@ -386,7 +381,7 @@ namespace RealtimeMesh
// Apply all stream updates
if (Update.HasStreamSet())
{
for (FRealtimeMeshDataStreamRef Stream : Update.GetUpdatedStreams())
for (FRealtimeMeshStreamRef Stream : Update.GetUpdatedStreams())
{
UpdatedStreams.Add(Stream->GetStreamKey());
Expand Down
Loading

0 comments on commit a52adde

Please sign in to comment.