Skip to content

Commit a52adde

Browse files
committed
Finish internal restructure.
HWRT back operational. Support for poly groups
1 parent fcd35eb commit a52adde

75 files changed

Lines changed: 8489 additions & 2947 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Config/DefaultRealtimeMeshComponent.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,11 @@
3636
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionCastShadow",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionCastShadow_Blueprint")
3737
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionVisibility",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.SetSectionVisibility_Blueprint")
3838
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionConfig",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionConfig_Blueprint")
39-
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment_Blueprint")
39+
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshSimple.UpdateSectionSegment_Blueprint")
40+
41+
42+
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.URealtimeMeshBlueprintFunctionLibrary.AppendBoxMesh",NewName="/Script/RealtimeMeshComponent.URealtimeMeshSimpleBasicShapeTools.AppendBoxMesh")
43+
+FunctionRedirects=(OldName="/Script/RealtimeMeshComponent.URealtimeMeshBlueprintFunctionLibrary.AppendMesh",NewName="/Script/RealtimeMeshComponent.URealtimeMeshSimpleBasicShapeTools.AppendMesh")
44+
+PropertyRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshTrianglesSegment.MaterialIndex",NewName="/Script/RealtimeMeshComponent.RealtimeMeshPolygonGroupRange.PolygonGroupIndex")
45+
+StructRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshTrianglesSegment",NewName="/Script/RealtimeMeshComponent.RealtimeMeshPolygonGroupRange")
46+
+ClassRedirects=(OldName="/Script/RealtimeMeshComponent.RealtimeMeshStream",NewName="/Script/RealtimeMeshComponent.RealtimeMeshStreamOld")
94.4 KB
Binary file not shown.
Binary file not shown.

RealtimeMeshComponent.uplugin

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,39 @@
11
{
2-
"FileVersion": 3,
3-
"Version": 50,
4-
"VersionName": "5.0.5",
5-
"FriendlyName": "Realtime Mesh Component",
6-
"Description": "A component allowing for rendering and interacting with runtime generated geometry.",
7-
"Category": "Rendering",
8-
"CreatedBy": "Chris Conway (Koderz)",
9-
"CreatedByURL": "hhttps://github.com/Koderz",
10-
"DocsURL": "https://realtimemesh.koderz.io/",
11-
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/ad0b45a6a31e462aba7cf7c790a9c125",
12-
"SupportURL": "https://github.com/TriAxis-Games/RealtimeMeshComponent/issues",
13-
"EnabledByDefault": true,
14-
"CanContainContent": true,
15-
"IsBetaVersion": false,
16-
"Installed": false,
17-
"Modules": [
18-
{
19-
"Name": "RealtimeMeshComponent",
20-
"Type": "Runtime",
21-
"LoadingPhase": "PostConfigInit"
22-
},
23-
{
24-
"Name": "RealtimeMeshTests",
25-
"Type": "Editor",
26-
"LoadingPhase": "Default"
27-
},
28-
{
29-
"Name": "RealtimeMeshEditor",
30-
"Type": "Editor",
31-
"LoadingPhase": "Default"
32-
}
33-
]
2+
"FileVersion": 3,
3+
"Version": 50,
4+
"VersionName": "5.0.5",
5+
"FriendlyName": "Realtime Mesh Component",
6+
"Description": "A component allowing for rendering and interacting with runtime generated geometry.",
7+
"Category": "Rendering",
8+
"CreatedBy": "Chris Conway (Koderz)",
9+
"CreatedByURL": "hhttps://github.com/Koderz",
10+
"DocsURL": "https://realtimemesh.koderz.io/",
11+
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/ad0b45a6a31e462aba7cf7c790a9c125",
12+
"SupportURL": "https://github.com/TriAxis-Games/RealtimeMeshComponent/issues",
13+
"EnabledByDefault": true,
14+
"CanContainContent": true,
15+
"IsBetaVersion": false,
16+
"Installed": false,
17+
"Modules": [
18+
{
19+
"Name": "RealtimeMeshComponent",
20+
"Type": "Runtime",
21+
"LoadingPhase": "PostConfigInit"
22+
},
23+
{
24+
"Name": "RealtimeMeshTests",
25+
"Type": "Editor",
26+
"LoadingPhase": "Default"
27+
},
28+
{
29+
"Name": "RealtimeMeshEditor",
30+
"Type": "Editor",
31+
"LoadingPhase": "Default"
32+
},
33+
{
34+
"Name": "RealtimeMeshComponentExtensions",
35+
"Type": "Runtime",
36+
"LoadingPhase": "Default"
37+
}
38+
]
3439
}

Source/RealtimeMeshComponent/Private/Data/RealtimeMeshData.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
// Copyright TriAxis Games, L.L.C. All Rights Reserved.
22

3-
#include "..\..\Public\Data\RealtimeMeshData.h"
3+
#include "Data/RealtimeMeshData.h"
44

55
#include "Data/RealtimeMeshLOD.h"
66
#include "Data/RealtimeMeshSectionGroup.h"
7-
#include "Data/RealtimeMeshStateUpdate.h"
87
#include "RenderProxy/RealtimeMeshProxy.h"
98
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
10-
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
9+
#if RMC_ENGINE_ABOVE_5_2
1110
#include "Logging/MessageLog.h"
1211
#endif
1312

Source/RealtimeMeshComponent/Private/Data/RealtimeMeshLOD.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// Copyright TriAxis Games, L.L.C. All Rights Reserved.
22

33
#include "Data/RealtimeMeshLOD.h"
4-
#include "RealtimeMeshShared.h"
4+
#include "Data/RealtimeMeshShared.h"
55
#include "Data/RealtimeMeshSectionGroup.h"
6-
#include "Data/RealtimeMeshStateUpdate.h"
76
#include "RenderProxy/RealtimeMeshLODProxy.h"
87
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
9-
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
8+
#if RMC_ENGINE_ABOVE_5_2
109
#include "Logging/MessageLog.h"
1110
#endif
1211

Source/RealtimeMeshComponent/Private/Data/RealtimeMeshSection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#include "Data/RealtimeMeshSection.h"
44
#include "RealtimeMeshGuard.h"
5-
#include "RealtimeMeshShared.h"
5+
#include "Data/RealtimeMeshShared.h"
66
#include "Data/RealtimeMeshData.h"
77
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
88
#include "RenderProxy/RealtimeMeshSectionProxy.h"

Source/RealtimeMeshComponent/Private/Data/RealtimeMeshSectionGroup.cpp

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
#include "Data/RealtimeMeshSectionGroup.h"
44
#include "RealtimeMeshGuard.h"
5-
#include "RealtimeMeshShared.h"
5+
#include "Data/RealtimeMeshShared.h"
66
#include "Data/RealtimeMeshSection.h"
77
#include "RenderProxy/RealtimeMeshGPUBuffer.h"
88
#include "RenderProxy/RealtimeMeshProxyCommandBatch.h"
99
#include "RenderProxy/RealtimeMeshSectionGroupProxy.h"
10-
#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 2
10+
#if RMC_ENGINE_ABOVE_5_2
1111
#include "Logging/MessageLog.h"
1212
#endif
1313

@@ -65,6 +65,18 @@ namespace RealtimeMesh
6565
return Sections.Num();
6666
}
6767

68+
bool FRealtimeMeshSectionGroup::HasStreams() const
69+
{
70+
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
71+
return Streams.Num() > 0;
72+
}
73+
74+
TSet<FRealtimeMeshStreamKey> FRealtimeMeshSectionGroup::GetStreamKeys() const
75+
{
76+
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
77+
return Streams;
78+
}
79+
6880
FRealtimeMeshSectionPtr FRealtimeMeshSectionGroup::GetSection(const FRealtimeMeshSectionKey& SectionKey) const
6981
{
7082
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
@@ -134,14 +146,14 @@ namespace RealtimeMesh
134146
SharedResources->BroadcastSectionGroupBoundsChanged(Key);
135147
}
136148

137-
TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshDataStream&& Stream)
149+
TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshStream&& Stream)
138150
{
139151
FRealtimeMeshProxyCommandBatch Commands(SharedResources->GetOwner());
140152
CreateOrUpdateStream(Commands, MoveTemp(Stream));
141153
return Commands.Commit();
142154
}
143155

144-
void FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshProxyCommandBatch& Commands, FRealtimeMeshDataStream&& Stream)
156+
void FRealtimeMeshSectionGroup::CreateOrUpdateStream(FRealtimeMeshProxyCommandBatch& Commands, FRealtimeMeshStream&& Stream)
145157
{
146158
FRealtimeMeshScopeGuardWrite ScopeGuard(SharedResources->GetGuard());
147159

@@ -219,7 +231,7 @@ namespace RealtimeMesh
219231
TSet<FRealtimeMeshStreamKey> ExistingStreamKeys = Streams;
220232

221233
// Remove all old streams
222-
for (const auto& StreamKey : ExistingStreamKeys)
234+
for (const FRealtimeMeshStreamKey& StreamKey : ExistingStreamKeys)
223235
{
224236
if (!InStreams.Contains(StreamKey))
225237
{
@@ -228,10 +240,10 @@ namespace RealtimeMesh
228240
}
229241

230242
// Create/Update streams
231-
for (const auto& NewStream : InStreams)
243+
InStreams.ForEach([&](FRealtimeMeshStream& Stream)
232244
{
233-
CreateOrUpdateStream(Commands, MoveTemp(NewStream.Get()));
234-
}
245+
CreateOrUpdateStream(Commands, MoveTemp(Stream));
246+
});
235247
}
236248

237249
TFuture<ERealtimeMeshProxyUpdateStatus> FRealtimeMeshSectionGroup::CreateOrUpdateSection(const FRealtimeMeshSectionKey& SectionKey, const FRealtimeMeshSectionConfig& InConfig,
@@ -354,23 +366,6 @@ namespace RealtimeMesh
354366
}
355367
}
356368

357-
TSet<FRealtimeMeshStreamKey> FRealtimeMeshSectionGroup::GetStreamKeys() const
358-
{
359-
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
360-
return Streams;
361-
}
362-
363-
TSet<FRealtimeMeshSectionKey> FRealtimeMeshSectionGroup::GetSectionKeys() const
364-
{
365-
FRealtimeMeshScopeGuardRead ScopeGuard(SharedResources->GetGuard());
366-
TSet<FRealtimeMeshSectionKey> SectionKeys;
367-
for (const auto& Section : Sections)
368-
{
369-
SectionKeys.Add(Section->GetKey());
370-
}
371-
return SectionKeys;
372-
}
373-
374369
void FRealtimeMeshSectionGroup::InvalidateBounds() const
375370
{
376371
Bounds.ClearCachedValue();
@@ -386,7 +381,7 @@ namespace RealtimeMesh
386381
// Apply all stream updates
387382
if (Update.HasStreamSet())
388383
{
389-
for (FRealtimeMeshDataStreamRef Stream : Update.GetUpdatedStreams())
384+
for (FRealtimeMeshStreamRef Stream : Update.GetUpdatedStreams())
390385
{
391386
UpdatedStreams.Add(Stream->GetStreamKey());
392387

0 commit comments

Comments
 (0)