Skip to content

Commit 5fbcbed

Browse files
committed
Merge remote-tracking branch 'origin/main' into UpdateTilesetCollisionChannelResponse
2 parents 797441b + bf5b3ff commit 5fbcbed

25 files changed

+781
-45
lines changed

.github/workflows/buildLinux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Removed unneeded packages to gain disk space
4040
run: |
4141
sudo apt update
42-
sudo apt remove google-chrome-stable clang-13 clang-14 clang-15 clang-format-13 clang-format-14 clang-format-15 llvm-13-dev llvm-13-linker-tools llvm-13-runtime llvm-13-tools llvm-13 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools llvm-14 llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-15 x11-common xserver-common aspnetcore-runtime-6.0 aspnetcore-runtime-7.0 aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0 aspnetcore-targeting-pack-8.0 aspnetcore-targeting-pack-9.0 docker-ce-cli docker-ce dotnet-apphost-pack-6.0 dotnet-apphost-pack-7.0 dotnet-apphost-pack-8.0 dotnet-apphost-pack-9.0 dotnet-host dotnet-hostfxr-6.0 dotnet-hostfxr-7.0 dotnet-hostfxr-8.0 dotnet-hostfxr-9.0 dotnet-runtime-6.0 dotnet-runtime-7.0 dotnet-runtime-8.0 dotnet-runtime-9.0 dotnet-runtime-deps-6.0 dotnet-runtime-deps-7.0 dotnet-runtime-deps-8.0 dotnet-runtime-deps-9.0 dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 dotnet-sdk-9.0 dotnet-targeting-pack-6.0 dotnet-targeting-pack-7.0 dotnet-targeting-pack-8.0 dotnet-targeting-pack-9.0 eatmydata emacsen-common firebird3.0-common-doc firebird3.0-common firefox kubectl mercurial-common mercurial microsoft-edge-stable mssql-tools mysql-client-8.0 mysql-client-core-8.0 mysql-client mysql-common mysql-server-8.0 php8.1 postgresql-14 azure-cli microsoft-edge-stable google-cloud-cli temurin-21-jdk temurin-17-jdk temurin-11-jdk temurin-8-jdk powershell google-cloud-cli-anthoscli mysql-server-core-8.0 containerd.io libllvm15 libllvm14 libllvm13 mono-devel libclang-common-15-dev libclang-common-14-dev libclang-common-13-dev apache2-bin apache2-data apache2-utils apache2 containerd.io cpp-9 cpp-10 cpp-11 cpp-12 cpp docker-ce-cli docker-ce emacsen-common g++-9 g++-10 g++-11 g++-12 g++ gcc-9-base gcc-10-base gcc-11-base gcc-9 gcc-10 gcc-11 gcc-12 gcc gfortran-9 gfortran-10 gfortran-11 gfortran-12 gfortran ruby-dev ruby-full ruby-net-telnet ruby-rubygems ruby-webrick ruby-xmlrpc ruby3.0-dev ruby3.0-doc ruby3.0 ruby rubygems-integration alsa-topology-conf alsa-ucm-conf ant byobu cifs-utils conmon crun debugedit dirmngr imagemagick-6.q16 imagemagick-6-common imagemagick golang-github-containernetworking-plugin-dnsname golang-github-containers-common golang-github-containers-image java-common javascript-common postgresql-client-14 postgresql-client-common postgresql-common-dev postgresql-common vim vim-common vim-runtime vim-tiny tex-common texinfo
42+
sudo apt remove google-chrome-stable clang-13 clang-14 clang-15 clang-format-13 clang-format-14 clang-format-15 llvm-13-dev llvm-13-linker-tools llvm-13-runtime llvm-13-tools llvm-13 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools llvm-14 llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-15 x11-common xserver-common aspnetcore-runtime-6.0 aspnetcore-runtime-7.0 aspnetcore-runtime-8.0 aspnetcore-runtime-9.0 aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0 aspnetcore-targeting-pack-8.0 aspnetcore-targeting-pack-9.0 docker-ce-cli docker-ce dotnet-apphost-pack-6.0 dotnet-apphost-pack-7.0 dotnet-apphost-pack-8.0 dotnet-apphost-pack-9.0 dotnet-host dotnet-hostfxr-6.0 dotnet-hostfxr-7.0 dotnet-hostfxr-8.0 dotnet-hostfxr-9.0 dotnet-runtime-6.0 dotnet-runtime-7.0 dotnet-runtime-8.0 dotnet-runtime-9.0 dotnet-runtime-deps-6.0 dotnet-runtime-deps-7.0 dotnet-runtime-deps-8.0 dotnet-runtime-deps-9.0 dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 dotnet-sdk-9.0 dotnet-targeting-pack-6.0 dotnet-targeting-pack-7.0 dotnet-targeting-pack-8.0 dotnet-targeting-pack-9.0 eatmydata emacsen-common firebird3.0-common-doc firebird3.0-common firefox kubectl mercurial-common mercurial microsoft-edge-stable mssql-tools mysql-client-8.0 mysql-client-core-8.0 mysql-client mysql-common mysql-server-8.0 php8.1 postgresql-14 azure-cli microsoft-edge-stable google-cloud-cli temurin-21-jdk temurin-17-jdk temurin-11-jdk temurin-8-jdk powershell google-cloud-cli-anthoscli mysql-server-core-8.0 containerd.io libllvm15 libllvm14 libllvm13 mono-devel libclang-common-15-dev libclang-common-14-dev libclang-common-13-dev apache2-bin apache2-data apache2-utils apache2 containerd.io cpp-9 cpp-10 cpp-11 cpp-12 cpp docker-ce-cli docker-ce emacsen-common g++-9 g++-10 g++-11 g++-12 g++ gcc-9-base gcc-10-base gcc-11-base gcc-9 gcc-10 gcc-11 gcc-12 gcc gfortran-9 gfortran-10 gfortran-11 gfortran-12 gfortran ruby-dev ruby-full ruby-net-telnet ruby-rubygems ruby-webrick ruby-xmlrpc ruby3.0-dev ruby3.0-doc ruby3.0 ruby rubygems-integration alsa-topology-conf alsa-ucm-conf ant byobu cifs-utils conmon crun debugedit dirmngr imagemagick-6.q16 imagemagick-6-common imagemagick golang-github-containernetworking-plugin-dnsname golang-github-containers-common golang-github-containers-image java-common javascript-common postgresql-client-14 postgresql-client-common postgresql-common vim vim-common vim-runtime vim-tiny tex-common texinfo
4343
df -h
4444
sudo rm -rf /usr/local/lib/android || true
4545
sudo rm -rf /usr/share/dotnet || true

CHANGES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Change Log {#changes}
22

3-
- adding a function to change the collision response of a Cesium3DTileset by collision channel.
3+
### ? - ?
4+
5+
##### Additions :tada:
6+
7+
- Added `CesiumAzureMapsRasterOverlay`.
8+
- Added the interface `ICesium3DTilesetLifecycleEventReceiver`: when an implementation is registered on a tileset (with `ACesium3DTileset::SetLifecycleEventReceiver`), its functions will be called at various points in a tile's lifecycle, like when a mesh component is created, when a material is instanced, when the tile changes visibility, when it is unloaded, etc.
9+
- Added `ACesium3DTileset::SetCollisionResponseToChannel`, allowing change of the the collision response of a tileset by collision channel.
10+
11+
##### Fixes :wrench:
12+
13+
- Fixed a bug where `CesiumCreditSystem` would not filter out empty credits, resulting in duplicate on-screen delimiters.
14+
- Fixed a problem where multi-selecting `UCesiumGlobeAnchorComponent` could cause the selected components to teleport to 0 degrees longitude and 0 degrees latitude. Now, the geospatial position and orientation fields are hidden while multi-selecting.
415

516
### v2.20.0 - 2025-10-01
617

Source/CesiumEditor/Private/CesiumGlobeAnchorCustomization.cpp

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@
77
#include "CesiumGlobeAnchorComponent.h"
88
#include "DetailCategoryBuilder.h"
99
#include "DetailLayoutBuilder.h"
10+
#include "DetailWidgetRow.h"
1011
#include "IDetailGroup.h"
1112
#include "Widgets/SToolTip.h"
13+
#include "Widgets/Text/STextBlock.h"
14+
15+
#define LOCTEXT_NAMESPACE "CesiumGlobeAnchorCustomization"
1216

1317
FName FCesiumGlobeAnchorCustomization::RegisteredLayoutName;
1418

@@ -36,6 +40,7 @@ FCesiumGlobeAnchorCustomization::MakeInstance() {
3640
void FCesiumGlobeAnchorCustomization::CustomizeDetails(
3741
IDetailLayoutBuilder& DetailBuilder) {
3842
DetailBuilder.GetObjectsBeingCustomized(this->SelectedObjects);
43+
const bool bIsMultiSelect = this->SelectedObjects.Num() > 1;
3944

4045
IDetailCategoryBuilder& CesiumCategory = DetailBuilder.EditCategory("Cesium");
4146

@@ -67,11 +72,29 @@ void FCesiumGlobeAnchorCustomization::CustomizeDetails(
6772
UCesiumGlobeAnchorComponent,
6873
TeleportWhenUpdatingTransform));
6974

70-
this->UpdateDerivedProperties();
71-
72-
this->CreatePositionLongitudeLatitudeHeight(DetailBuilder, CesiumCategory);
73-
this->CreatePositionEarthCenteredEarthFixed(DetailBuilder, CesiumCategory);
74-
this->CreateRotationEastSouthUp(DetailBuilder, CesiumCategory);
75+
if (!bIsMultiSelect) {
76+
this->UpdateDerivedProperties();
77+
this->CreatePositionLongitudeLatitudeHeight(DetailBuilder, CesiumCategory);
78+
this->CreatePositionEarthCenteredEarthFixed(DetailBuilder, CesiumCategory);
79+
this->CreateRotationEastSouthUp(DetailBuilder, CesiumCategory);
80+
} else {
81+
FDetailWidgetRow& Row =
82+
CesiumCategory
83+
.AddCustomRow(
84+
LOCTEXT("MultipleSelectionFilter", "Multiple Selection"))
85+
.FilterString(LOCTEXT(
86+
"MultipleSelectionFilters",
87+
"Latitude Longitude Height ECEF ESU"));
88+
89+
Row.WholeRowContent()[SNew(SBox).Padding(FMargin(
90+
0.f,
91+
4.f))[SNew(STextBlock)
92+
.Text(LOCTEXT(
93+
"MultiSelectInfo",
94+
"Multiple actors selected. Geodetic position (Latitude, Longitude, Height; ECEF) and "
95+
"ESU rotation cannot be edited in multi-select. Select a single actor to edit these values."))
96+
.AutoWrapText(true)]];
97+
}
7598
}
7699

77100
void FCesiumGlobeAnchorCustomization::CreatePositionEarthCenteredEarthFixed(
@@ -296,3 +319,5 @@ TStatId UCesiumGlobeAnchorDerivedProperties::GetStatId() const {
296319
UCesiumGlobeAnchorRotationEastSouthUp,
297320
STATGROUP_Tickables);
298321
}
322+
323+
#undef LOCTEXT_NAMESPACE

Source/CesiumRuntime/Private/Cesium3DTileset.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright 2020-2024 CesiumGS, Inc. and Contributors
22

33
#include "Cesium3DTileset.h"
4+
45
#include "Async/Async.h"
56
#include "Camera/CameraTypes.h"
67
#include "Camera/PlayerCameraManager.h"
@@ -9,6 +10,7 @@
910
#include "Cesium3DTilesSelection/TilesetLoadFailureDetails.h"
1011
#include "Cesium3DTilesSelection/TilesetOptions.h"
1112
#include "Cesium3DTilesSelection/TilesetSharedAssetSystem.h"
13+
#include "Cesium3DTilesetLifecycleEventReceiver.h"
1214
#include "Cesium3DTilesetLoadFailureDetails.h"
1315
#include "Cesium3DTilesetRoot.h"
1416
#include "CesiumActors.h"
@@ -48,12 +50,14 @@
4850
#include "StereoRendering.h"
4951
#include "UnrealPrepareRendererResources.h"
5052
#include "VecMath.h"
53+
5154
#include <glm/gtc/matrix_inverse.hpp>
5255
#include <memory>
5356
#include <spdlog/spdlog.h>
5457

5558
#ifdef CESIUM_DEBUG_TILE_STATES
5659
#include "HAL/PlatformFileManager.h"
60+
5761
#include <Cesium3DTilesSelection/DebugTileStateDatabase.h>
5862
#endif
5963

@@ -2360,4 +2364,17 @@ void ACesium3DTileset::SetCollisionResponseToChannel(
23602364
}
23612365
}
23622366
}
2363-
}
2367+
}
2368+
2369+
ICesium3DTilesetLifecycleEventReceiver*
2370+
ACesium3DTileset::GetLifecycleEventReceiver() {
2371+
return Cast<ICesium3DTilesetLifecycleEventReceiver>(
2372+
this->_pLifecycleEventReceiver);
2373+
}
2374+
2375+
void ACesium3DTileset::SetLifecycleEventReceiver(UObject* InEventReceiver) {
2376+
if (UKismetSystemLibrary::DoesImplementInterface(
2377+
InEventReceiver,
2378+
UCesium3DTilesetLifecycleEventReceiver::StaticClass()))
2379+
this->_pLifecycleEventReceiver = InEventReceiver;
2380+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Copyright 2020-2025 CesiumGS, Inc. and Contributors
2+
3+
#include "Cesium3DTilesetLifecycleEventReceiver.h"
4+
5+
#include "Materials/MaterialInstanceDynamic.h"
6+
7+
UMaterialInstanceDynamic*
8+
ICesium3DTilesetLifecycleEventReceiver::CreateMaterial(
9+
ICesiumLoadedTilePrimitive& TilePrimitive,
10+
UMaterialInterface* DefaultBaseMaterial,
11+
const FName& Name) {
12+
// Default implementation: just create a new instance
13+
return UMaterialInstanceDynamic::Create(DefaultBaseMaterial, nullptr, Name);
14+
}
15+
16+
void ICesium3DTilesetLifecycleEventReceiver::CustomizeMaterial(
17+
ICesiumLoadedTilePrimitive& TilePrimitive,
18+
UMaterialInstanceDynamic& Material,
19+
const UCesiumMaterialUserData* CesiumData,
20+
const CesiumGltf::Material& GltfMaterial) {}
21+
22+
void ICesium3DTilesetLifecycleEventReceiver::OnTileMeshPrimitiveLoaded(
23+
ICesiumLoadedTilePrimitive& TilePrimitive) {}
24+
25+
void ICesium3DTilesetLifecycleEventReceiver::OnTileLoaded(
26+
ICesiumLoadedTile& Tile) {}
27+
28+
void ICesium3DTilesetLifecycleEventReceiver::OnTileVisibilityChanged(
29+
ICesiumLoadedTile& Tile,
30+
bool bVisible) {}
31+
32+
void ICesium3DTilesetLifecycleEventReceiver::OnTileUnloading(
33+
ICesiumLoadedTile& Tile) {}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright 2020-2025 CesiumGS, Inc. and Contributors
2+
3+
#include "CesiumAzureMapsRasterOverlay.h"
4+
#include <Cesium3DTilesSelection/Tileset.h>
5+
#include <CesiumRasterOverlays/AzureMapsRasterOverlay.h>
6+
7+
using namespace CesiumRasterOverlays;
8+
9+
namespace {
10+
std::string getTilesetId(EAzureMapsTilesetId tilesetId) {
11+
switch (tilesetId) {
12+
case EAzureMapsTilesetId::BaseDarkGrey:
13+
return AzureMapsTilesetId::baseDarkGrey;
14+
case EAzureMapsTilesetId::BaseLabelsRoad:
15+
return AzureMapsTilesetId::baseLabelsRoad;
16+
case EAzureMapsTilesetId::BaseLabelsDarkGrey:
17+
return AzureMapsTilesetId::baseLabelsDarkGrey;
18+
case EAzureMapsTilesetId::BaseHybridRoad:
19+
return AzureMapsTilesetId::baseHybridRoad;
20+
case EAzureMapsTilesetId::BaseHybridDarkGrey:
21+
return AzureMapsTilesetId::baseHybridDarkGrey;
22+
case EAzureMapsTilesetId::Imagery:
23+
return AzureMapsTilesetId::imagery;
24+
case EAzureMapsTilesetId::Terra:
25+
return AzureMapsTilesetId::terra;
26+
case EAzureMapsTilesetId::WeatherRadar:
27+
return AzureMapsTilesetId::weatherRadar;
28+
case EAzureMapsTilesetId::WeatherInfrared:
29+
return AzureMapsTilesetId::weatherInfrared;
30+
case EAzureMapsTilesetId::TrafficAbsolute:
31+
return AzureMapsTilesetId::trafficAbsolute;
32+
case EAzureMapsTilesetId::TrafficRelativeMain:
33+
return AzureMapsTilesetId::trafficRelativeMain;
34+
case EAzureMapsTilesetId::TrafficRelativeDark:
35+
return AzureMapsTilesetId::trafficRelativeDark;
36+
case EAzureMapsTilesetId::TrafficDelay:
37+
return AzureMapsTilesetId::trafficDelay;
38+
case EAzureMapsTilesetId::TrafficReduced:
39+
return AzureMapsTilesetId::trafficReduced;
40+
case EAzureMapsTilesetId::BaseRoad:
41+
default:
42+
return AzureMapsTilesetId::baseRoad;
43+
}
44+
}
45+
} // namespace
46+
47+
std::unique_ptr<CesiumRasterOverlays::RasterOverlay>
48+
UCesiumAzureMapsRasterOverlay::CreateOverlay(
49+
const CesiumRasterOverlays::RasterOverlayOptions& options) {
50+
if (this->Key.IsEmpty()) {
51+
// We must have a key to create this overlay.
52+
return nullptr;
53+
}
54+
55+
return std::make_unique<AzureMapsRasterOverlay>(
56+
TCHAR_TO_UTF8(*this->MaterialLayerKey),
57+
AzureMapsSessionParameters{
58+
.key = TCHAR_TO_UTF8(*this->Key),
59+
.apiVersion = TCHAR_TO_UTF8(*this->ApiVersion),
60+
.tilesetId = getTilesetId(this->TilesetId),
61+
.language = TCHAR_TO_UTF8(*this->Language),
62+
.view = TCHAR_TO_UTF8(*this->View),
63+
},
64+
options);
65+
}

Source/CesiumRuntime/Private/CesiumCreditSystem.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,19 @@ void ACesiumCreditSystem::Tick(float DeltaTime) {
340340
for (int i = 0; i < creditsToShowThisFrame.size(); i++) {
341341
const CesiumUtility::Credit& credit = creditsToShowThisFrame[i];
342342

343-
FString CreditRtf;
343+
FString creditRtf;
344344
const std::string& html = _pCreditSystem->getHtml(credit);
345345

346346
auto htmlFind = _htmlToRtf.find(html);
347347
if (htmlFind != _htmlToRtf.end()) {
348-
CreditRtf = htmlFind->second;
348+
creditRtf = htmlFind->second;
349349
} else {
350-
CreditRtf = ConvertHtmlToRtf(html);
351-
_htmlToRtf.insert({html, CreditRtf});
350+
creditRtf = ConvertHtmlToRtf(html);
351+
_htmlToRtf.insert({html, creditRtf});
352+
}
353+
354+
if (creditRtf.IsEmpty()) {
355+
continue;
352356
}
353357

354358
if (_pCreditSystem->shouldBeShownOnScreen(credit)) {
@@ -358,13 +362,13 @@ void ACesiumCreditSystem::Tick(float DeltaTime) {
358362
OnScreenCredits += TEXT(" \u2022 ");
359363
}
360364

361-
OnScreenCredits += CreditRtf;
365+
OnScreenCredits += creditRtf;
362366
} else {
363367
if (i != 0) {
364368
Credits += "\n";
365369
}
366370

367-
Credits += CreditRtf;
371+
Credits += creditRtf;
368372
}
369373
}
370374

0 commit comments

Comments
 (0)