From c23f1a413069e109d9acd14409af5c21aa15a63c Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 25 Jun 2024 13:32:02 +0200 Subject: [PATCH] new release (source = ca952840) --- .../Private/ITwinCalcBounds.cpp | 20 +- .../Private/ITwinCalcBounds.h | 2 +- .../Private/ITwinCesium3DTileset.cpp | 142 +++++----- .../Private/ITwinCesium3DTilesetRoot.cpp | 6 +- .../Private/ITwinCesiumActors.cpp | 16 +- .../Private/ITwinCesiumActors.h | 2 +- .../ITwinCesiumBingMapsRasterOverlay.cpp | 16 +- .../ITwinCesiumBoundingVolumeComponent.cpp | 8 +- .../ITwinCesiumBoundingVolumeComponent.h | 4 +- .../Private/ITwinCesiumCameraManager.cpp | 6 +- .../ITwinCesiumCartographicPolygon.cpp | 4 +- .../Private/ITwinCesiumCreditSystem.cpp | 10 +- .../Private/ITwinCesiumCustomVersion.cpp | 2 +- .../ITwinCesiumEncodedFeaturesMetadata.cpp | 114 ++++---- .../ITwinCesiumEncodedFeaturesMetadata.h | 20 +- .../ITwinCesiumEncodedMetadataConversions.cpp | 168 +++++------ .../ITwinCesiumEncodedMetadataConversions.h | 10 +- .../ITwinCesiumEncodedMetadataUtility.cpp | 118 ++++---- .../ITwinCesiumEncodedMetadataUtility.h | 30 +- .../Private/ITwinCesiumFeatureIdAttribute.cpp | 10 +- .../Private/ITwinCesiumFeatureIdSet.cpp | 26 +- .../Private/ITwinCesiumFeatureIdTexture.cpp | 10 +- .../ITwinCesiumFeaturesMetadataComponent.cpp | 122 ++++---- .../Private/ITwinCesiumFlyToComponent.cpp | 22 +- .../Private/ITwinCesiumGeoreference.cpp | 46 +-- .../ITwinCesiumGlobeAnchorComponent.cpp | 58 ++-- .../Private/ITwinCesiumGltfComponent.cpp | 202 +++++++------ .../Private/ITwinCesiumGltfComponent.h | 6 +- .../ITwinCesiumGltfPrimitiveComponent.cpp | 16 +- .../ITwinCesiumGltfPrimitiveComponent.h | 6 +- .../Private/ITwinCesiumIonRasterOverlay.cpp | 4 +- .../Private/ITwinCesiumIonServer.cpp | 8 +- .../Private/ITwinCesiumLifetime.cpp | 30 +- .../Private/ITwinCesiumLifetime.h | 6 +- ...nCesiumMetadataPickingBlueprintLibrary.cpp | 4 +- .../Private/ITwinCesiumMetadataPrimitive.cpp | 4 +- ...nCesiumMetadataUtilityBlueprintLibrary.cpp | 2 +- .../Private/ITwinCesiumMetadataValue.cpp | 40 +-- .../ITwinCesiumOriginShiftComponent.cpp | 14 +- .../Private/ITwinCesiumPrimitiveFeatures.cpp | 2 +- ...winCesiumPropertyArrayBlueprintLibrary.cpp | 8 +- .../Private/ITwinCesiumPropertyTable.cpp | 18 +- .../ITwinCesiumPropertyTableProperty.cpp | 224 +++++++-------- .../Private/ITwinCesiumPropertyTexture.cpp | 16 +- .../ITwinCesiumPropertyTextureProperty.cpp | 74 ++--- .../Private/ITwinCesiumRasterOverlay.cpp | 14 +- .../Private/ITwinCesiumRuntime.cpp | 18 +- .../Private/ITwinCesiumSubLevelComponent.cpp | 30 +- .../ITwinCesiumSubLevelSwitcherComponent.cpp | 16 +- .../Private/ITwinCesiumSunSky.cpp | 8 +- .../Private/ITwinCesiumTextureUtility.cpp | 28 +- .../Private/ITwinCesiumTextureUtility.h | 4 +- .../Private/ITwinCesiumTile.cpp | 2 +- .../Private/ITwinCesiumTileExcluder.cpp | 6 +- .../ITwinCesiumTileExcluderAdapter.cpp | 6 +- .../Private/ITwinCesiumTileExcluderAdapter.h | 4 +- .../Private/ITwinCesiumTransforms.cpp | 10 +- .../Private/ITwinCesiumTransforms.h | 2 +- .../Private/ITwinCesiumViewExtension.cpp | 20 +- .../Private/ITwinCesiumViewExtension.h | 6 +- .../Private/ITwinCesiumWgs84Ellipsoid.cpp | 18 +- .../Private/ITwinCreateGltfOptions.h | 2 +- .../Private/ITwinGeoTransforms.cpp | 6 +- .../Private/ITwinGlmLogging.cpp | 16 +- .../Private/ITwinGlmLogging.h | 6 +- .../Private/ITwinGlobeAwareDefaultPawn.cpp | 12 +- .../Private/ITwinLoadGltfResult.h | 22 +- .../Private/ITwinSpdlogUnrealLoggerSink.cpp | 18 +- .../Private/ITwinSpdlogUnrealLoggerSink.h | 2 +- .../ITwinUnrealMetadataConversions.cpp | 220 +++++++------- .../Private/ITwinVecMath.cpp | 74 ++--- .../ITwinCesiumRuntime/Private/ITwinVecMath.h | 2 +- .../Tests/ITwinCesiumCameraManager.spec.cpp | 6 +- .../ITwinCesiumFeatureIdAttribute.spec.cpp | 28 +- .../Tests/ITwinCesiumFeatureIdSet.spec.cpp | 44 +-- .../ITwinCesiumFeatureIdTexture.spec.cpp | 56 ++-- .../Tests/ITwinCesiumGeoreference.spec.cpp | 6 +- .../Tests/ITwinCesiumGlobeAnchor.spec.cpp | 2 +- .../Tests/ITwinCesiumGltfSpecUtility.cpp | 6 +- .../Tests/ITwinCesiumGltfSpecUtility.h | 10 +- .../Private/Tests/ITwinCesiumLoadTestCore.cpp | 20 +- .../Tests/ITwinCesiumLoadTestSamples.cpp | 14 +- ...umMetadataPickingBlueprintLibrary.spec.cpp | 26 +- .../Tests/ITwinCesiumMetadataValue.spec.cpp | 36 +-- .../ITwinCesiumOriginShiftComponent.spec.cpp | 4 +- .../ITwinCesiumPrimitiveFeatures.spec.cpp | 50 ++-- .../Tests/ITwinCesiumPropertyArray.spec.cpp | 30 +- .../Tests/ITwinCesiumPropertyTable.spec.cpp | 52 ++-- .../ITwinCesiumPropertyTableProperty.spec.cpp | 268 +++++++++--------- .../Tests/ITwinCesiumPropertyTexture.spec.cpp | 48 ++-- ...TwinCesiumPropertyTextureProperty.spec.cpp | 170 +++++------ .../Tests/ITwinCesiumSceneGeneration.cpp | 16 +- .../Private/Tests/ITwinCesiumTestHelpers.cpp | 4 +- .../Private/Tests/ITwinCesiumTestHelpers.h | 6 +- .../Private/Tests/ITwinGeoTransforms.spec.cpp | 6 +- .../Tests/ITwinGlobeAwareDefaultPawn.spec.cpp | 2 +- .../Tests/ITwinGoogle3dTilesLoadTest.cpp | 14 +- .../Private/Tests/ITwinSubLevels.spec.cpp | 2 +- .../Tests/ITwinUnrealAssetAccessor.spec.cpp | 10 +- .../ITwinUnrealMetadataConversions.spec.cpp | 72 ++--- .../Public/ITwinCesium3DTileset.h | 30 +- .../ITwinCesium3DTilesetLoadFailureDetails.h | 4 +- .../Public/ITwinCesiumBingMapsRasterOverlay.h | 4 +- .../ITwinCesiumEncodedMetadataComponent.h | 80 +++--- .../Public/ITwinCesiumFeatureIdAttribute.h | 8 +- .../Public/ITwinCesiumFeatureIdSet.h | 8 +- .../Public/ITwinCesiumFeatureIdTexture.h | 8 +- .../ITwinCesiumFeaturesMetadataComponent.h | 2 +- .../Public/ITwinCesiumFlyToComponent.h | 4 +- .../Public/ITwinCesiumGeoreference.h | 16 +- .../Public/ITwinCesiumMeshBuildCallbacks.h | 55 ++-- .../ITwinCesiumMetadataEncodingDetails.h | 28 +- .../ITwinCesiumMetadataPropertyDetails.h | 26 +- .../Public/ITwinCesiumMetadataValue.h | 20 +- .../Public/ITwinCesiumMetadataValueType.h | 58 ++-- .../Public/ITwinCesiumOriginShiftComponent.h | 8 +- .../Public/ITwinCesiumPrimitiveFeatures.h | 2 +- .../Public/ITwinCesiumPropertyArray.h | 6 +- ...ITwinCesiumPropertyArrayBlueprintLibrary.h | 6 +- .../Public/ITwinCesiumPropertyTable.h | 8 +- .../Public/ITwinCesiumPropertyTableProperty.h | 26 +- .../Public/ITwinCesiumPropertyTexture.h | 8 +- .../ITwinCesiumPropertyTextureProperty.h | 22 +- .../Public/ITwinCesiumRasterOverlay.h | 4 +- ...winCesiumRasterOverlayLoadFailureDetails.h | 4 +- .../Public/ITwinCesiumRuntime.h | 13 +- .../Public/ITwinCesiumTile.h | 2 +- .../Public/ITwinCesiumTileExcluder.h | 4 +- .../Public/ITwinGlobeAwareDefaultPawn.h | 8 +- .../Public/ITwinOriginPlacement.h | 2 +- .../Public/ITwinUnrealMetadataConversions.h | 12 +- .../ITwinRuntime/Private/ITwinDigitalTwin.cpp | 7 +- .../ITwinRuntime/Private/ITwinGeolocation.cpp | 4 +- .../ITwinRuntime/Private/ITwinIModel.cpp | 250 +++++++++++++--- .../ITwinRuntime/Private/ITwinRealityData.cpp | 11 +- .../ITwinRuntime/Private/ITwinSavedView.cpp | 266 ++++++++++++----- .../ITwinRuntime/Private/ITwinSceneMapping.h | 19 +- .../Private/ITwinSceneMappingBuilder.cpp | 35 ++- .../Private/ITwinSceneMappingBuilder.h | 16 +- .../Private/ITwinServiceActor.cpp | 14 +- .../ITwinAuthorizationManager.cpp | 5 +- .../ITwinWebServices/ITwinWebServices.cpp | 188 +++++++++--- .../ITwinWebServicesObserver.cpp | 2 +- .../ITwinRuntime/Public/ITwinCoordSystem.h | 21 ++ .../Source/ITwinRuntime/Public/ITwinIModel.h | 24 +- .../ITwinRuntime/Public/ITwinSavedView.h | 2 +- .../ITwinRuntime/Public/ITwinServiceActor.h | 7 + .../ITwinWebServices/ITwinWebServices.h | 20 +- .../ITwinWebServicesObserver.h | 4 +- .../Private/IModelSelectionMenuScript.cpp | 12 +- .../ITwinTestApp/Private/ITwinSelector.cpp | 4 +- .../Source/ITwinTestApp/Private/TopMenu.cpp | 69 ++++- .../Private/TopMenuWidgetImpl.cpp | 15 + .../Source/ITwinTestApp/Public/TopMenu.h | 13 +- .../ITwinTestApp/Public/TopMenuWidgetImpl.h | 2 + README.md | 13 +- 156 files changed, 2703 insertions(+), 2062 deletions(-) create mode 100644 Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinCoordSystem.h diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.cpp index 93a1937..b9f6de4 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.cpp @@ -5,18 +5,18 @@ #include #include -glm::dmat4 CalcBoundsOperation::getModelToUnrealWorldMatrix() const { +glm::dmat4 FITwinCalcBoundsOperation::getModelToUnrealWorldMatrix() const { const FMatrix matrix = localToWorld.ToMatrixWithScale(); - return VecMath::createMatrix4D(matrix); + return FITwinVecMath::createMatrix4D(matrix); } -glm::dmat4 CalcBoundsOperation::getTilesetToUnrealWorldMatrix() const { +glm::dmat4 FITwinCalcBoundsOperation::getTilesetToUnrealWorldMatrix() const { const glm::dmat4 modelToUnreal = getModelToUnrealWorldMatrix(); const glm::dmat4 tilesetToModel = glm::affineInverse(highPrecisionTransform); return modelToUnreal * tilesetToModel; } -FBoxSphereBounds CalcBoundsOperation::operator()( +FBoxSphereBounds FITwinCalcBoundsOperation::operator()( const CesiumGeometry::BoundingSphere& sphere) const { glm::dmat4 matrix = getTilesetToUnrealWorldMatrix(); glm::dvec3 center = glm::dvec3(matrix * glm::dvec4(sphere.getCenter(), 1.0)); @@ -28,13 +28,13 @@ FBoxSphereBounds CalcBoundsOperation::operator()( sphereRadius = glm::max(sphereRadius, glm::length(halfAxes[2])); FBoxSphereBounds result; - result.Origin = VecMath::createVector(center); + result.Origin = FITwinVecMath::createVector(center); result.SphereRadius = sphereRadius; result.BoxExtent = FVector(sphereRadius, sphereRadius, sphereRadius); return result; } -FBoxSphereBounds CalcBoundsOperation::operator()( +FBoxSphereBounds FITwinCalcBoundsOperation::operator()( const CesiumGeometry::OrientedBoundingBox& box) const { glm::dmat4 matrix = getTilesetToUnrealWorldMatrix(); glm::dvec3 center = glm::dvec3(matrix * glm::dvec4(box.getCenter(), 1.0)); @@ -55,24 +55,24 @@ FBoxSphereBounds CalcBoundsOperation::operator()( glm::abs(halfAxes[2].z); FBoxSphereBounds result; - result.Origin = VecMath::createVector(center); + result.Origin = FITwinVecMath::createVector(center); result.SphereRadius = sphereRadius; result.BoxExtent = FVector(maxX, maxY, maxZ); return result; } -FBoxSphereBounds CalcBoundsOperation::operator()( +FBoxSphereBounds FITwinCalcBoundsOperation::operator()( const CesiumGeospatial::BoundingRegion& region) const { return (*this)(region.getBoundingBox()); } -FBoxSphereBounds CalcBoundsOperation::operator()( +FBoxSphereBounds FITwinCalcBoundsOperation::operator()( const CesiumGeospatial::BoundingRegionWithLooseFittingHeights& region) const { return (*this)(region.getBoundingRegion()); } -FBoxSphereBounds CalcBoundsOperation::operator()( +FBoxSphereBounds FITwinCalcBoundsOperation::operator()( const CesiumGeospatial::S2CellBoundingVolume& s2) const { return (*this)(s2.computeBoundingRegion()); } \ No newline at end of file diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.h index c687274..1942a7b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCalcBounds.h @@ -8,7 +8,7 @@ #include #include -struct CalcBoundsOperation { +struct FITwinCalcBoundsOperation { const FTransform& localToWorld; const glm::dmat4& highPrecisionTransform; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTileset.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTileset.cpp index 1a668a2..2b8705b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTileset.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTileset.cpp @@ -251,7 +251,7 @@ void AITwinCesium3DTileset::AddFocusViewportDelegate() { void AITwinCesium3DTileset::PostInitProperties() { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Called PostInitProperties on actor %s"), *this->GetName()); @@ -280,7 +280,7 @@ void AITwinCesium3DTileset::SetUseLodTransitions(bool InUseLodTransitions) { } } -void AITwinCesium3DTileset::SetTilesetSource(ETilesetSource InSource) { +void AITwinCesium3DTileset::SetTilesetSource(EITwinTilesetSource InSource) { if (InSource != this->TilesetSource) { this->DestroyTileset(); this->TilesetSource = InSource; @@ -289,7 +289,7 @@ void AITwinCesium3DTileset::SetTilesetSource(ETilesetSource InSource) { void AITwinCesium3DTileset::SetUrl(const FString& InUrl) { if (InUrl != this->Url) { - if (this->TilesetSource == ETilesetSource::FromUrl) { + if (this->TilesetSource == EITwinTilesetSource::FromUrl) { this->DestroyTileset(); } this->Url = InUrl; @@ -298,7 +298,7 @@ void AITwinCesium3DTileset::SetUrl(const FString& InUrl) { void AITwinCesium3DTileset::SetIonAssetID(int64 InAssetID) { if (InAssetID >= 0 && InAssetID != this->IonAssetID) { - if (this->TilesetSource == ETilesetSource::FromCesiumIon) { + if (this->TilesetSource == EITwinTilesetSource::FromCesiumIon) { this->DestroyTileset(); } this->IonAssetID = InAssetID; @@ -307,7 +307,7 @@ void AITwinCesium3DTileset::SetIonAssetID(int64 InAssetID) { void AITwinCesium3DTileset::SetIonAccessToken(const FString& InAccessToken) { if (this->IonAccessToken != InAccessToken) { - if (this->TilesetSource == ETilesetSource::FromCesiumIon) { + if (this->TilesetSource == EITwinTilesetSource::FromCesiumIon) { this->DestroyTileset(); } this->IonAccessToken = InAccessToken; @@ -316,7 +316,7 @@ void AITwinCesium3DTileset::SetIonAccessToken(const FString& InAccessToken) { void AITwinCesium3DTileset::SetCesiumIonServer(UITwinCesiumIonServer* Server) { if (this->CesiumIonServer != Server) { - if (this->TilesetSource == ETilesetSource::FromCesiumIon) { + if (this->TilesetSource == EITwinTilesetSource::FromCesiumIon) { this->DestroyTileset(); } this->CesiumIonServer = Server; @@ -466,7 +466,7 @@ void AITwinCesium3DTileset::PauseMovieSequencer() { this->StopMovieSequencer(); void AITwinCesium3DTileset::OnFocusEditorViewportOnThis() { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Called OnFocusEditorViewportOnThis on actor %s"), *this->GetName()); @@ -531,14 +531,14 @@ void AITwinCesium3DTileset::OnFocusEditorViewportOnThis() { std::visit(CalculateECEFCameraPosition{}, boundingVolume); FVector unrealCameraPosition = pGeoreference->TransformEarthCenteredEarthFixedPositionToUnreal( - VecMath::createVector(ecefCameraPosition)); + FITwinVecMath::createVector(ecefCameraPosition)); // calculate unreal camera orientation glm::dvec3 ecefCenter = Cesium3DTilesSelection::getBoundingVolumeCenter(boundingVolume); FVector unrealCenter = pGeoreference->TransformEarthCenteredEarthFixedPositionToUnreal( - VecMath::createVector(ecefCenter)); + FITwinVecMath::createVector(ecefCenter)); FVector unrealCameraFront = (unrealCenter - unrealCameraPosition).GetSafeNormal(); FVector unrealCameraRight = @@ -742,7 +742,7 @@ class UnrealResourcePreparer tile, this->_pActor->GetCreateNavCollision()); } - // UE_LOG(LogCesium, VeryVerbose, TEXT("No content for tile")); + // UE_LOG(LogITwinCesium, VeryVerbose, TEXT("No content for tile")); return nullptr; } @@ -758,7 +758,7 @@ class UnrealResourcePreparer } else if (pMainThreadResult) { UITwinCesiumGltfComponent* pGltf = reinterpret_cast(pMainThreadResult); - CesiumLifetime::destroyComponentRecursively(pGltf); + FITwinCesiumLifetime::destroyComponentRecursively(pGltf); } } @@ -766,7 +766,7 @@ class UnrealResourcePreparer CesiumGltf::ImageCesium& image, const std::any& rendererOptions) override { auto ppOptions = - std::any_cast(&rendererOptions); + std::any_cast(&rendererOptions); check(ppOptions != nullptr && *ppOptions != nullptr); if (ppOptions == nullptr || *ppOptions == nullptr) { return nullptr; @@ -774,8 +774,8 @@ class UnrealResourcePreparer auto pOptions = *ppOptions; - auto texture = CesiumTextureUtility::loadTextureAnyThreadPart( - CesiumTextureUtility::GltfImagePtr{&image}, + auto texture = ITwinCesiumTextureUtility::loadTextureAnyThreadPart( + ITwinCesiumTextureUtility::GltfImagePtr{&image}, TextureAddress::TA_Clamp, TextureAddress::TA_Clamp, pOptions->filter, @@ -790,8 +790,8 @@ class UnrealResourcePreparer CesiumRasterOverlays::RasterOverlayTile& rasterTile, void* pLoadThreadResult) override { - TUniquePtr pLoadedTexture{ - static_cast( + TUniquePtr pLoadedTexture{ + static_cast( pLoadThreadResult)}; if (!pLoadedTexture) { @@ -800,15 +800,15 @@ class UnrealResourcePreparer // The image source pointer during loading may have been invalidated, // so replace it. - CesiumTextureUtility::GltfImagePtr* pImageSource = - std::get_if( + ITwinCesiumTextureUtility::GltfImagePtr* pImageSource = + std::get_if( &pLoadedTexture->textureSource); if (pImageSource) { pImageSource->pImage = &rasterTile.getImage(); } UTexture2D* pTexture = - CesiumTextureUtility::loadTextureGameThreadPart(pLoadedTexture.Get()); + ITwinCesiumTextureUtility::loadTextureGameThreadPart(pLoadedTexture.Get()); if (!pTexture) { return nullptr; } @@ -822,17 +822,17 @@ class UnrealResourcePreparer void* pLoadThreadResult, void* pMainThreadResult) noexcept override { if (pLoadThreadResult) { - CesiumTextureUtility::LoadedTextureResult* pLoadedTexture = - static_cast( + ITwinCesiumTextureUtility::LoadedTextureResult* pLoadedTexture = + static_cast( pLoadThreadResult); - CesiumTextureUtility::destroyHalfLoadedTexture(*pLoadedTexture); + ITwinCesiumTextureUtility::destroyHalfLoadedTexture(*pLoadedTexture); delete pLoadedTexture; } if (pMainThreadResult) { UTexture* pTexture = static_cast(pMainThreadResult); pTexture->RemoveFromRoot(); - CesiumTextureUtility::destroyTexture(pTexture); + ITwinCesiumTextureUtility::destroyTexture(pTexture); } } @@ -923,18 +923,18 @@ void AITwinCesium3DTileset::UpdateLoadStatus() { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::BroadcastOnTilesetLoaded) // Tileset just finished loading, we broadcast the update - UE_LOG(LogCesium, Verbose, TEXT("Broadcasting OnTileLoaded")); + UE_LOG(LogITwinCesium, Verbose, TEXT("Broadcasting OnTileLoaded")); OnTilesetLoaded.Broadcast(); } } namespace { -const TSharedRef& -getCesiumViewExtension() { - static TSharedRef +const TSharedRef& +getFITwinCesiumViewExtension() { + static TSharedRef cesiumViewExtension = - GEngine->ViewExtensions->NewExtension(); + GEngine->ViewExtensions->NewExtension(); return cesiumViewExtension; } @@ -956,7 +956,7 @@ void AITwinCesium3DTileset::LoadTileset() { AWorldSettings* pWorldSettings = pWorld->GetWorldSettings(); if (pWorldSettings && pWorldSettings->bEnableWorldBoundsChecks) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "\"Enable World Bounds Checks\" in the world settings is currently enabled. Please consider disabling it to avoid potential issues."), @@ -964,19 +964,19 @@ void AITwinCesium3DTileset::LoadTileset() { } // Make sure we have a valid Cesium ion server if we need one. - if (this->TilesetSource == ETilesetSource::FromCesiumIon && + if (this->TilesetSource == EITwinTilesetSource::FromCesiumIon && !IsValid(this->CesiumIonServer)) { this->Modify(); this->CesiumIonServer = UITwinCesiumIonServer::GetServerForNewObjects(); } - const TSharedRef& - cesiumViewExtension = getCesiumViewExtension(); + const TSharedRef& + cesiumViewExtension = getFITwinCesiumViewExtension(); const std::shared_ptr& pAssetAccessor = - getAssetAccessor(); - const CesiumAsync::AsyncSystem& asyncSystem = getAsyncSystem(); + ITwinCesium::getAssetAccessor(); + const CesiumAsync::AsyncSystem& asyncSystem = ITwinCesium::getAsyncSystem(); - // Both the feature flag and the CesiumViewExtension are global, not owned by + // Both the feature flag and the FITwinCesiumViewExtension are global, not owned by // the Tileset. We're just applying one to the other here out of convenience. cesiumViewExtension->SetEnabled( GetDefault() @@ -994,8 +994,8 @@ void AITwinCesium3DTileset::LoadTileset() { // Check if this component exists for backwards compatibility. PRAGMA_DISABLE_DEPRECATION_WARNINGS - const UDEPRECATED_CesiumEncodedMetadataComponent* pEncodedMetadataComponent = - this->FindComponentByClass(); + const UDEPRECATED_ITwinCesiumEncodedMetadataComponent* pEncodedMetadataComponent = + this->FindComponentByClass(); this->_featuresMetadataDescription = std::nullopt; this->_metadataDescription_DEPRECATED = std::nullopt; @@ -1011,7 +1011,7 @@ void AITwinCesium3DTileset::LoadTileset() { pFeaturesMetadataComponent->PropertyTextures}; } else if (pEncodedMetadataComponent) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead.")); @@ -1074,13 +1074,13 @@ void AITwinCesium3DTileset::LoadTileset() { options.loadErrorCallback = [this](const Cesium3DTilesSelection::TilesetLoadFailureDetails& details) { static_assert( - uint8_t(ECesium3DTilesetLoadType::CesiumIon) == + uint8_t(EITwinCesium3DTilesetLoadType::CesiumIon) == uint8_t(Cesium3DTilesSelection::TilesetLoadType::CesiumIon)); static_assert( - uint8_t(ECesium3DTilesetLoadType::TilesetJson) == + uint8_t(EITwinCesium3DTilesetLoadType::TilesetJson) == uint8_t(Cesium3DTilesSelection::TilesetLoadType::TilesetJson)); static_assert( - uint8_t(ECesium3DTilesetLoadType::Unknown) == + uint8_t(EITwinCesium3DTilesetLoadType::Unknown) == uint8_t(Cesium3DTilesSelection::TilesetLoadType::Unknown)); uint8_t typeValue = uint8_t(details.type); @@ -1091,7 +1091,7 @@ void AITwinCesium3DTileset::LoadTileset() { FITwinCesium3DTilesetLoadFailureDetails ueDetails{}; ueDetails.Tileset = this; - ueDetails.Type = ECesium3DTilesetLoadType(typeValue); + ueDetails.Type = EITwinCesium3DTilesetLoadType(typeValue); ueDetails.HttpStatusCode = details.statusCode; ueDetails.Message = UTF8_TO_TCHAR(details.message.c_str()); @@ -1142,16 +1142,16 @@ void AITwinCesium3DTileset::LoadTileset() { options.contentOptions.applyTextureTransform = false; switch (this->TilesetSource) { - case ETilesetSource::FromUrl: - UE_LOG(LogCesium, Log, TEXT("Loading tileset from URL %s"), *this->Url); + case EITwinTilesetSource::FromUrl: + UE_LOG(LogITwinCesium, Log, TEXT("Loading tileset from URL %s"), *this->Url); this->_pTileset = MakeUnique( externals, TCHAR_TO_UTF8(*this->Url), options); break; - case ETilesetSource::FromCesiumIon: + case EITwinTilesetSource::FromCesiumIon: UE_LOG( - LogCesium, + LogITwinCesium, Log, TEXT("Loading tileset for asset ID %d"), this->IonAssetID); @@ -1194,16 +1194,16 @@ void AITwinCesium3DTileset::LoadTileset() { } switch (this->TilesetSource) { - case ETilesetSource::FromUrl: + case EITwinTilesetSource::FromUrl: UE_LOG( - LogCesium, + LogITwinCesium, Log, TEXT("Loading tileset from URL %s done"), *this->Url); break; - case ETilesetSource::FromCesiumIon: + case EITwinTilesetSource::FromCesiumIon: UE_LOG( - LogCesium, + LogITwinCesium, Log, TEXT("Loading tileset for asset ID %d done"), this->IonAssetID); @@ -1211,14 +1211,14 @@ void AITwinCesium3DTileset::LoadTileset() { } switch (ApplyDpiScaling) { - case (EApplyDpiScaling::UseProjectDefault): + case (EITwinApplyDpiScaling::UseProjectDefault): _scaleUsingDPI = GetDefault()->ScaleLevelOfDetailByDPI; break; - case (EApplyDpiScaling::Yes): + case (EITwinApplyDpiScaling::Yes): _scaleUsingDPI = true; break; - case (EApplyDpiScaling::No): + case (EITwinApplyDpiScaling::No): _scaleUsingDPI = false; break; default: @@ -1232,16 +1232,16 @@ void AITwinCesium3DTileset::DestroyTileset() { } switch (this->TilesetSource) { - case ETilesetSource::FromUrl: + case EITwinTilesetSource::FromUrl: UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Destroying tileset from URL %s"), *this->Url); break; - case ETilesetSource::FromCesiumIon: + case EITwinTilesetSource::FromCesiumIon: UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Destroying tileset for asset ID %d"), this->IonAssetID); @@ -1282,16 +1282,16 @@ void AITwinCesium3DTileset::DestroyTileset() { this->_pTileset.Reset(); switch (this->TilesetSource) { - case ETilesetSource::FromUrl: + case EITwinTilesetSource::FromUrl: UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Destroying tileset from URL %s done"), *this->Url); break; - case ETilesetSource::FromCesiumIon: + case EITwinTilesetSource::FromCesiumIon: UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Destroying tileset for asset ID %d done"), this->IonAssetID); @@ -1716,7 +1716,7 @@ void hideTiles(const std::vector& tiles) { } else { // TODO: why is this happening? UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Tile to no longer render does not have a visible Gltf")); } @@ -1851,7 +1851,7 @@ void AITwinCesium3DTileset::updateLastViewUpdateResultState( this->_lastMaxDepthVisited = result.maxDepthVisited; UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT( "%s: %d ms, Visited %d, Culled Visited %d, Rendered %d, Culled %d, Occluded %d, Waiting For Occlusion Results %d, Max Depth Visited: %d, Loading-Worker %d, Loading-Main %d, Loaded tiles %g%%"), @@ -1920,7 +1920,7 @@ void AITwinCesium3DTileset::showTilesToRender( pTile->getTileID()) .c_str()); UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Tile %s could not be attached to root"), *tileIdString); @@ -2021,7 +2021,7 @@ void AITwinCesium3DTileset::Tick(float DeltaTime) { } glm::dmat4 ueTilesetToUeWorld = - VecMath::createMatrix4D(this->GetActorTransform().ToMatrixWithScale()); + FITwinVecMath::createMatrix4D(this->GetActorTransform().ToMatrixWithScale()); const glm::dmat4& cesiumTilesetToUeTileset = this->GetCesiumTilesetToUnrealRelativeWorldTransform(); @@ -2098,8 +2098,8 @@ void AITwinCesium3DTileset::PostLoad() { Super::PostLoad(); - if (CesiumActors::shouldValidateFlags(this)) - CesiumActors::validateActorFlags(this); + if (ITwinCesiumActors::shouldValidateFlags(this)) + ITwinCesiumActors::validateActorFlags(this); #if WITH_EDITOR const int32 CesiumVersion = @@ -2125,9 +2125,9 @@ void AITwinCesium3DTileset::Serialize(FArchive& Ar) { // In previous versions, the tileset source was inferred from the presence // of a non-empty URL property, rather than being explicitly specified. if (this->Url.Len() > 0) { - this->TilesetSource = ETilesetSource::FromUrl; + this->TilesetSource = EITwinTilesetSource::FromUrl; } else { - this->TilesetSource = ETilesetSource::FromCesiumIon; + this->TilesetSource = EITwinTilesetSource::FromCesiumIon; } } @@ -2256,8 +2256,8 @@ bool AITwinCesium3DTileset::IsReadyForFinishDestroy() { ready &= this->_tilesetsBeingDestroyed == 0; if (!ready) { - getAssetAccessor()->tick(); - getAsyncSystem().dispatchMainThreadTasks(); + ITwinCesium::getAssetAccessor()->tick(); + ITwinCesium::getAsyncSystem().dispatchMainThreadTasks(); } return ready; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTilesetRoot.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTilesetRoot.cpp index 80285ca..5796a05 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTilesetRoot.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesium3DTilesetRoot.cpp @@ -14,7 +14,7 @@ UITwinCesium3DTilesetRoot::UITwinCesium3DTilesetRoot() void UITwinCesium3DTilesetRoot::HandleGeoreferenceUpdated() { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Called HandleGeoreferenceUpdated for tileset root %s"), *this->GetName()); @@ -57,13 +57,13 @@ bool UITwinCesium3DTilesetRoot::MoveComponentImpl( void UITwinCesium3DTilesetRoot::_updateAbsoluteLocation() { const FVector& newLocation = this->GetRelativeLocation(); - this->_absoluteLocation = VecMath::createVector3D(newLocation); + this->_absoluteLocation = FITwinVecMath::createVector3D(newLocation); } void UITwinCesium3DTilesetRoot::_updateTilesetToUnrealRelativeWorldTransform() { AITwinCesium3DTileset* pTileset = this->GetOwner(); - this->_tilesetToUnrealRelativeWorld = VecMath::createMatrix4D( + this->_tilesetToUnrealRelativeWorld = FITwinVecMath::createMatrix4D( pTileset->ResolveGeoreference() ->ComputeEarthCenteredEarthFixedToUnrealTransformation()); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.cpp index 45e60be..cca2dae 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.cpp @@ -10,15 +10,15 @@ #include -glm::dvec4 CesiumActors::getWorldOrigin4D(const AActor* actor) { +glm::dvec4 ITwinCesiumActors::getWorldOrigin4D(const AActor* actor) { if (!IsValid(actor)) { - UE_LOG(LogCesium, Warning, TEXT("The actor is not valid")); + UE_LOG(LogITwinCesium, Warning, TEXT("The actor is not valid")); return glm::dvec4(); } const UWorld* world = actor->GetWorld(); if (!IsValid(world)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("The actor %s is not spawned in a level"), *actor->GetName()); @@ -28,7 +28,7 @@ glm::dvec4 CesiumActors::getWorldOrigin4D(const AActor* actor) { return glm::dvec4(originLocation.X, originLocation.Y, originLocation.Z, 1.0); } -bool CesiumActors::shouldValidateFlags(UObject* object) { +bool ITwinCesiumActors::shouldValidateFlags(UObject* object) { #if WITH_EDITOR // Only fixup flags in the editor, when not in play mode if (!IsValid(GEditor) || GEditor->IsPlaySessionInProgress()) @@ -46,7 +46,7 @@ bool CesiumActors::shouldValidateFlags(UObject* object) { #endif } -void CesiumActors::validatePublicFlag(UObject* object, const FString& label) { +void ITwinCesiumActors::validatePublicFlag(UObject* object, const FString& label) { // // From an Epic Engine Developer... // RF_Public means that the object is an asset, so it should be only set for @@ -60,7 +60,7 @@ void CesiumActors::validatePublicFlag(UObject* object, const FString& label) { // if (object->HasAnyFlags(RF_Public)) { UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Clearing invalid RF_Public flag on %s"), *label); @@ -68,12 +68,12 @@ void CesiumActors::validatePublicFlag(UObject* object, const FString& label) { } } -void CesiumActors::validateActorFlags(AActor* actor) { +void ITwinCesiumActors::validateActorFlags(AActor* actor) { FString label = FString("actor: ") + *actor->GetName(); validatePublicFlag(actor, label); } -void CesiumActors::validateActorComponentFlags(UActorComponent* component) { +void ITwinCesiumActors::validateActorComponentFlags(UActorComponent* component) { FString label = FString("actor component: ") + *component->GetName(); validatePublicFlag(component, label); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.h index d0ecfe7..9e5597f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumActors.h @@ -15,7 +15,7 @@ /** * @brief Utility functions related to Unreal actors */ -class CesiumActors { +class ITwinCesiumActors { public: /** * @brief Returns the origin location of the world that the given diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBingMapsRasterOverlay.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBingMapsRasterOverlay.cpp index 3d85c15..6431a8d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBingMapsRasterOverlay.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBingMapsRasterOverlay.cpp @@ -10,29 +10,29 @@ UITwinCesiumBingMapsRasterOverlay::CreateOverlay( std::string mapStyle; switch (this->MapStyle) { - case EBingMapsStyle::Aerial: + case EITwinBingMapsStyle::Aerial: mapStyle = CesiumRasterOverlays::BingMapsStyle::AERIAL; break; - case EBingMapsStyle::AerialWithLabelsOnDemand: + case EITwinBingMapsStyle::AerialWithLabelsOnDemand: mapStyle = CesiumRasterOverlays::BingMapsStyle::AERIAL_WITH_LABELS_ON_DEMAND; break; - case EBingMapsStyle::RoadOnDemand: + case EITwinBingMapsStyle::RoadOnDemand: mapStyle = CesiumRasterOverlays::BingMapsStyle::ROAD_ON_DEMAND; break; - case EBingMapsStyle::CanvasDark: + case EITwinBingMapsStyle::CanvasDark: mapStyle = CesiumRasterOverlays::BingMapsStyle::CANVAS_DARK; break; - case EBingMapsStyle::CanvasLight: + case EITwinBingMapsStyle::CanvasLight: mapStyle = CesiumRasterOverlays::BingMapsStyle::CANVAS_LIGHT; break; - case EBingMapsStyle::CanvasGray: + case EITwinBingMapsStyle::CanvasGray: mapStyle = CesiumRasterOverlays::BingMapsStyle::CANVAS_GRAY; break; - case EBingMapsStyle::OrdnanceSurvey: + case EITwinBingMapsStyle::OrdnanceSurvey: mapStyle = CesiumRasterOverlays::BingMapsStyle::ORDNANCE_SURVEY; break; - case EBingMapsStyle::CollinsBart: + case EITwinBingMapsStyle::CollinsBart: mapStyle = CesiumRasterOverlays::BingMapsStyle::COLLINS_BART; break; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.cpp index ff2d244..d12507b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.cpp @@ -42,7 +42,7 @@ void UITwinCesiumBoundingVolumePoolComponent::destroyProxy( UITwinCesiumBoundingVolumeComponent* pBoundingVolumeComponent = (UITwinCesiumBoundingVolumeComponent*)pProxy; if (pBoundingVolumeComponent) { - CesiumLifetime::destroyComponentRecursively(pBoundingVolumeComponent); + FITwinCesiumLifetime::destroyComponentRecursively(pBoundingVolumeComponent); } } @@ -95,7 +95,7 @@ FPrimitiveSceneProxy* UITwinCesiumBoundingVolumeComponent::CreateSceneProxy() { } void UITwinCesiumBoundingVolumeComponent::UpdateOcclusion( - const CesiumViewExtension& cesiumViewExtension) { + const FITwinCesiumViewExtension& cesiumViewExtension) { if (!_isMapped) { return; } @@ -114,7 +114,7 @@ void UITwinCesiumBoundingVolumeComponent::UpdateOcclusion( void UITwinCesiumBoundingVolumeComponent::_updateTransform() { const FTransform transform = FTransform( - VecMath::createMatrix(this->_cesiumToUnreal * this->_tileTransform)); + FITwinVecMath::createMatrix(this->_cesiumToUnreal * this->_tileTransform)); this->SetRelativeTransform_Direct(transform); this->SetComponentToWorld(transform); @@ -145,6 +145,6 @@ void UITwinCesiumBoundingVolumeComponent::reset(const Tile* pTile) { FBoxSphereBounds UITwinCesiumBoundingVolumeComponent::CalcBounds( const FTransform& LocalToWorld) const { return std::visit( - CalcBoundsOperation{LocalToWorld, this->_tileTransform}, + FITwinCalcBoundsOperation{LocalToWorld, this->_tileTransform}, this->_tileBounds); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.h index 875a732..72faafd 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumBoundingVolumeComponent.h @@ -90,9 +90,9 @@ class UITwinCesiumBoundingVolumeComponent /** * Update the occlusion state for this bounding volume from the - * CesiumViewExtension. + * FITwinCesiumViewExtension. */ - void UpdateOcclusion(const CesiumViewExtension& cesiumViewExtension); + void UpdateOcclusion(const FITwinCesiumViewExtension& cesiumViewExtension); /** * Updates this component's transform from a new double-precision diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCameraManager.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCameraManager.cpp index c39de01..c722769 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCameraManager.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCameraManager.cpp @@ -22,7 +22,7 @@ FName AITwinCesiumCameraManager::DEFAULT_CAMERAMANAGER_TAG = return nullptr; } UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("World name for GetDefaultCameraManager: %s"), *world->GetFullName()); @@ -51,7 +51,7 @@ FName AITwinCesiumCameraManager::DEFAULT_CAMERAMANAGER_TAG = if (!pCameraManager) { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Creating default AITwinCesiumCameraManager for actor %s"), *WorldContextObject->GetName()); @@ -68,7 +68,7 @@ FName AITwinCesiumCameraManager::DEFAULT_CAMERAMANAGER_TAG = } } else { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Using existing AITwinCesiumCameraManager %s for actor %s"), *pCameraManager->GetName(), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCartographicPolygon.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCartographicPolygon.cpp index c5e90c7..4df194c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCartographicPolygon.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCartographicPolygon.cpp @@ -84,6 +84,6 @@ void AITwinCesiumCartographicPolygon::MakeLinear() { void AITwinCesiumCartographicPolygon::PostLoad() { Super::PostLoad(); - if (CesiumActors::shouldValidateFlags(this)) - CesiumActors::validateActorFlags(this); + if (ITwinCesiumActors::shouldValidateFlags(this)) + ITwinCesiumActors::validateActorFlags(this); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCreditSystem.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCreditSystem.cpp index 24253f8..a7e6dc0 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCreditSystem.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCreditSystem.cpp @@ -36,7 +36,7 @@ namespace { AITwinCesiumCreditSystem* findValidDefaultCreditSystem(ULevel* Level) { if (!IsValid(Level)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("No valid level for findValidDefaultCreditSystem")); return nullptr; @@ -65,7 +65,7 @@ AITwinCesiumCreditSystem* findValidDefaultCreditSystem(ULevel* Level) { bool checkIfInSubLevel(AITwinCesiumCreditSystem* pCreditSystem) { if (pCreditSystem->GetLevel() != pCreditSystem->GetWorld()->PersistentLevel) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumCreditSystem should only exist in the Persistent Level. Adding it to a sub-level may cause credits to be lost.")); @@ -99,7 +99,7 @@ AITwinCesiumCreditSystem::GetDefaultCreditSystem(const UObject* WorldContextObje return nullptr; } UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("World name for GetDefaultCreditSystem: %s"), *world->GetFullName()); @@ -138,7 +138,7 @@ AITwinCesiumCreditSystem::GetDefaultCreditSystem(const UObject* WorldContextObje } if (!pCreditSystem) { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Creating default Credit System for actor %s"), *WorldContextObject->GetName()); @@ -157,7 +157,7 @@ AITwinCesiumCreditSystem::GetDefaultCreditSystem(const UObject* WorldContextObje } } else { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Using existing CreditSystem %s for actor %s"), *pCreditSystem->GetName(), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCustomVersion.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCustomVersion.cpp index f35f003..afb9915 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCustomVersion.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumCustomVersion.cpp @@ -7,7 +7,7 @@ const FGuid FITwinCesiumCustomVersion::GUID(0xEEBEC3F6, 0xADA54FC6, 0x8597852F, 0x3AF08280); // Register the custom version with core -FCustomVersionRegistration GRegisterCesiumCustomVersion( +FCustomVersionRegistration GRegisterITwinCesiumCustomVersion( FITwinCesiumCustomVersion::GUID, FITwinCesiumCustomVersion::LatestVersion, TEXT("CesiumVer")); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.cpp index 865b228..f969c99 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.cpp @@ -22,9 +22,9 @@ #include #include -using namespace CesiumTextureUtility; +using namespace ITwinCesiumTextureUtility; -namespace CesiumEncodedFeaturesMetadata { +namespace ITwinCesiumEncodedFeaturesMetadata { FString getNameForFeatureIDSet( const FITwinCesiumFeatureIdSet& featureIDSet, @@ -34,31 +34,31 @@ FString getNameForFeatureIDSet( return label; } - ECesiumFeatureIdSetType type = + EITwinCesiumFeatureIdSetType type = UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType(featureIDSet); - if (type == ECesiumFeatureIdSetType::Attribute) { + if (type == EITwinCesiumFeatureIdSetType::Attribute) { FITwinCesiumFeatureIdAttribute attribute = UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDAttribute( featureIDSet); - ECesiumFeatureIdAttributeStatus status = + EITwinCesiumFeatureIdAttributeStatus status = UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDAttributeStatus( attribute); - if (status == ECesiumFeatureIdAttributeStatus::Valid) { + if (status == EITwinCesiumFeatureIdAttributeStatus::Valid) { std::string generatedName = "_FEATURE_ID_" + std::to_string(attribute.getAttributeIndex()); return FString(generatedName.c_str()); } } - if (type == ECesiumFeatureIdSetType::Texture) { + if (type == EITwinCesiumFeatureIdSetType::Texture) { std::string generatedName = "_FEATURE_ID_TEXTURE_" + std::to_string(FeatureIdTextureCounter); FeatureIdTextureCounter++; return FString(generatedName.c_str()); } - if (type == ECesiumFeatureIdSetType::Implicit) { + if (type == EITwinCesiumFeatureIdSetType::Implicit) { return FString("_IMPLICIT_FEATURE_ID"); } @@ -79,13 +79,13 @@ namespace { */ std::optional encodeFeatureIdAttribute(const FITwinCesiumFeatureIdAttribute& attribute) { - const ECesiumFeatureIdAttributeStatus status = + const EITwinCesiumFeatureIdAttributeStatus status = UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDAttributeStatus( attribute); - if (status != ECesiumFeatureIdAttributeStatus::Valid) { + if (status != EITwinCesiumFeatureIdAttributeStatus::Valid) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Can't encode invalid feature ID attribute, skipped.")); return std::nullopt; @@ -100,12 +100,12 @@ std::optional encodeFeatureIdTexture( const FITwinCesiumFeatureIdTexture& texture, TMap>& featureIdTextureMap) { - const ECesiumFeatureIdTextureStatus status = + const EITwinCesiumFeatureIdTextureStatus status = UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( texture); - if (status != ECesiumFeatureIdTextureStatus::Valid) { + if (status != EITwinCesiumFeatureIdTextureStatus::Valid) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Can't encode invalid feature ID texture, skipped.")); return std::nullopt; @@ -149,7 +149,7 @@ std::optional encodeFeatureIdTexture( if (!encodedFeatureIdTexture.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a feature ID texture. Most likely could not allocate enough texture memory.")); @@ -213,18 +213,18 @@ EncodedPrimitiveFeatures encodePrimitiveFeaturesAnyThreadPart( } std::optional encodedSet; - ECesiumFeatureIdSetType type = + EITwinCesiumFeatureIdSetType type = UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType(set); - if (type == ECesiumFeatureIdSetType::Attribute) { + if (type == EITwinCesiumFeatureIdSetType::Attribute) { const FITwinCesiumFeatureIdAttribute& attribute = UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDAttribute(set); encodedSet = encodeFeatureIdAttribute(attribute); - } else if (type == ECesiumFeatureIdSetType::Texture) { + } else if (type == EITwinCesiumFeatureIdSetType::Texture) { const FITwinCesiumFeatureIdTexture& texture = UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDTexture(set); encodedSet = encodeFeatureIdTexture(texture, featureIdTextureMap); - } else if (type == ECesiumFeatureIdSetType::Implicit) { + } else if (type == EITwinCesiumFeatureIdSetType::Implicit) { encodedSet = EncodedFeatureIdSet(); } @@ -280,7 +280,7 @@ void destroyEncodedPrimitiveFeatures( auto& encodedFeatureIdTexture = *encodedFeatureIdSet.texture; if (encodedFeatureIdTexture.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy(encodedFeatureIdTexture.pTexture->pTexture.Get()); + FITwinCesiumLifetime::destroy(encodedFeatureIdTexture.pTexture->pTexture.Get()); encodedFeatureIdTexture.pTexture->pTexture.Reset(); } } @@ -341,24 +341,24 @@ EncodedPixelFormat getPixelFormat(FITwinCesiumMetadataEncodingDetails encodingDetails) { switch (encodingDetails.ComponentType) { - case ECesiumEncodedMetadataComponentType::Uint8: + case EITwinCesiumEncodedMetadataComponentType::Uint8: switch (encodingDetails.Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: return {EPixelFormat::PF_R8_UINT, 1}; - case ECesiumEncodedMetadataType::Vec2: - case ECesiumEncodedMetadataType::Vec3: - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec4: return {EPixelFormat::PF_R8G8B8A8_UINT, 4}; default: return {EPixelFormat::PF_Unknown, 0}; } - case ECesiumEncodedMetadataComponentType::Float: + case EITwinCesiumEncodedMetadataComponentType::Float: switch (encodingDetails.Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: return {EPixelFormat::PF_R32_FLOAT, 4}; - case ECesiumEncodedMetadataType::Vec2: - case ECesiumEncodedMetadataType::Vec3: - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec4: // Note this is ABGR return {EPixelFormat::PF_A32B32G32R32F, 16}; } @@ -371,9 +371,9 @@ bool isValidPropertyTablePropertyDescription( const FITwinCesiumPropertyTablePropertyDescription& propertyDescription, const FITwinCesiumPropertyTableProperty& property) { if (propertyDescription.EncodingDetails.Type == - ECesiumEncodedMetadataType::None) { + EITwinCesiumEncodedMetadataType::None) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "No encoded metadata type was specified for this property table property; skip encoding.")); @@ -381,9 +381,9 @@ bool isValidPropertyTablePropertyDescription( } if (propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::None) { + EITwinCesiumEncodedMetadataComponentType::None) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "No encoded metadata component type was specified for this property table property; skip encoding.")); @@ -396,7 +396,7 @@ bool isValidPropertyTablePropertyDescription( UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetValueType(property); if (valueType != expectedType) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "The value type of the metadata property %s does not match the type specified by the metadata description. It will still attempt to be encoded, but may result in empty or unexpected values."), @@ -410,15 +410,15 @@ bool isValidPropertyTablePropertyDescription( propertyDescription.PropertyDetails.bIsNormalized ? "Description incorrectly marked a property table property as normalized; skip encoding." : "Description incorrectly marked a property table property as not normalized; skip encoding."; - UE_LOG(LogCesium, Warning, TEXT("%s"), *error); + UE_LOG(LogITwinCesium, Warning, TEXT("%s"), *error); return false; } // Only uint8 normalization is currently supported. if (isNormalized && - valueType.ComponentType != ECesiumMetadataComponentType::Uint8) { + valueType.ComponentType != EITwinCesiumMetadataComponentType::Uint8) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Only normalization of uint8 properties is currently supported.")); return false; @@ -436,7 +436,7 @@ bool isValidPropertyTexturePropertyDescription( UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetValueType(property); if (valueType != expectedType) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "The value type of the metadata property %s does not match the type specified by the metadata description. It will still attempt to be encoded, but may result in empty or unexpected values."), @@ -450,15 +450,15 @@ bool isValidPropertyTexturePropertyDescription( propertyDescription.PropertyDetails.bIsNormalized ? "Description incorrectly marked a property texture property as normalized; skip encoding." : "Description incorrectly marked a property texture property as not normalized; skip encoding."; - UE_LOG(LogCesium, Warning, TEXT("%s"), *error); + UE_LOG(LogITwinCesium, Warning, TEXT("%s"), *error); return false; } // Only uint8 normalization is currently supported. if (isNormalized && - valueType.ComponentType != ECesiumMetadataComponentType::Uint8) { + valueType.ComponentType != EITwinCesiumMetadataComponentType::Uint8) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Only normalization of uint8 properties is currently supported.")); return false; @@ -501,7 +501,7 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( const FITwinCesiumMetadataEncodingDetails& encodingDetails = pDescription->EncodingDetails; - if (encodingDetails.Conversion == ECesiumEncodedMetadataConversion::None) { + if (encodingDetails.Conversion == EITwinCesiumEncodedMetadataConversion::None) { // No encoding to be done; skip. continue; } @@ -511,10 +511,10 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( } if (encodingDetails.Conversion == - ECesiumEncodedMetadataConversion::Coerce && + EITwinCesiumEncodedMetadataConversion::Coerce && !CesiumEncodedMetadataCoerce::canEncode(*pDescription)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cannot use 'Coerce' with the specified property info; skipped.")); @@ -522,10 +522,10 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( } if (encodingDetails.Conversion == - ECesiumEncodedMetadataConversion::ParseColorFromString && + EITwinCesiumEncodedMetadataConversion::ParseColorFromString && !CesiumEncodedMetadataParseColorFromString::canEncode(*pDescription)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cannot use `Parse Color From String` with the specified property info; skipped.")); @@ -535,7 +535,7 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( EncodedPixelFormat encodedFormat = getPixelFormat(encodingDetails); if (encodedFormat.format == EPixelFormat::PF_Unknown) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Unable to determine a suitable GPU format for this property table property; skipped.")); @@ -551,7 +551,7 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( if (UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property) == - ECesiumPropertyTablePropertyStatus::Valid) { + EITwinCesiumPropertyTablePropertyStatus::Valid) { int64 floorSqrtFeatureCount = glm::sqrt(propertyTableCount); int64 textureDimension = @@ -574,7 +574,7 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( if (!encodedProperty.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a property table property. Most likely could not allocate enough texture memory.")); @@ -596,13 +596,13 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( static_cast(pMip->BulkData.GetBulkDataSize())); if (encodingDetails.Conversion == - ECesiumEncodedMetadataConversion::ParseColorFromString) { + EITwinCesiumEncodedMetadataConversion::ParseColorFromString) { CesiumEncodedMetadataParseColorFromString::encode( *pDescription, property, textureData, encodedFormat.pixelSize); - } else /* info.Conversion == ECesiumEncodedMetadataConversion::Coerce */ { + } else /* info.Conversion == EITwinCesiumEncodedMetadataConversion::Coerce */ { CesiumEncodedMetadataCoerce::encode( *pDescription, property, @@ -700,7 +700,7 @@ EncodedPropertyTexture encodePropertyTextureAnyThreadPart( if (UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property) == - ECesiumPropertyTexturePropertyStatus::Valid) { + EITwinCesiumPropertyTexturePropertyStatus::Valid) { const TArray& channels = UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetChannels(property); @@ -755,7 +755,7 @@ EncodedPropertyTexture encodePropertyTextureAnyThreadPart( if (!encodedProperty.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a property texture property. Most likely could not allocate enough texture memory.")); @@ -962,7 +962,7 @@ void destroyEncodedModelMetadata(EncodedModelMetadata& encodedMetadata) { propertyTable.properties) { if (encodedProperty.pTexture && encodedProperty.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy(encodedProperty.pTexture->pTexture.Get()); + FITwinCesiumLifetime::destroy(encodedProperty.pTexture->pTexture.Get()); encodedProperty.pTexture->pTexture.Reset(); } } @@ -972,7 +972,7 @@ void destroyEncodedModelMetadata(EncodedModelMetadata& encodedMetadata) { for (EncodedPropertyTextureProperty& encodedPropertyTextureProperty : encodedPropertyTextureIt.properties) { if (encodedPropertyTextureProperty.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy( + FITwinCesiumLifetime::destroy( encodedPropertyTextureProperty.pTexture->pTexture.Get()); encodedPropertyTextureProperty.pTexture->pTexture.Reset(); } @@ -1006,4 +1006,4 @@ FString createHlslSafeName(const FString& rawName) { return safeName; } -} // namespace CesiumEncodedFeaturesMetadata +} // namespace ITwinCesiumEncodedFeaturesMetadata diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.h index 4e966f1..6137788 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedFeaturesMetadata.h @@ -21,7 +21,7 @@ struct FITwinCesiumPropertyTableProperty; struct FITwinCesiumPropertyTexture; struct FITwinCesiumPropertyTableDescription; struct FITwinCesiumPropertyTextureDescription; -struct FFeatureTextureDescription; +struct FITwinFeatureTextureDescription; struct FITwinCesiumModelMetadataDescription; struct FITwinCesiumPrimitiveFeaturesDescription; struct FITwinCesiumPrimitiveMetadataDescription; @@ -37,7 +37,7 @@ struct FITwinCesiumPrimitiveMetadataDescription; * a model-by-model basis. Not all models in a tileset may necessarily contain * the feature IDs / metadata specified in the description. */ -namespace CesiumEncodedFeaturesMetadata { +namespace ITwinCesiumEncodedFeaturesMetadata { /** * Naming convention for feature ID texture parameters nodes: @@ -152,7 +152,7 @@ struct EncodedFeatureIdTexture { /** * @brief The actual feature ID texture. */ - TSharedPtr pTexture; + TSharedPtr pTexture; /** * @brief The channels that this feature ID texture uses within the image. @@ -308,12 +308,12 @@ struct EncodedPropertyTableProperty { /** * @brief The property table property values, encoded into a texture. */ - TUniquePtr pTexture; + TUniquePtr pTexture; /** * @brief The type that the metadata will be encoded as. */ - ECesiumEncodedMetadataType type; + EITwinCesiumEncodedMetadataType type; /** * @brief The property table property's offset. @@ -365,12 +365,12 @@ struct EncodedPropertyTextureProperty { /** * @brief The texture used by the property texture property. */ - TSharedPtr pTexture; + TSharedPtr pTexture; /** * @brief The type that of the metadata encoded in the texture. */ - ECesiumEncodedMetadataType type; + EITwinCesiumEncodedMetadataType type; /** * @brief The set index of the texture coordinates from the glTF primitive @@ -454,7 +454,7 @@ EncodedPropertyTexture encodePropertyTextureAnyThreadPart( const FITwinCesiumPropertyTexture& propertyTexture, TMap< const CesiumGltf::ImageCesium*, - TWeakPtr>& + TWeakPtr>& propertyTexturePropertyMap); EncodedPrimitiveMetadata encodePrimitiveMetadataAnyThreadPart( @@ -470,7 +470,7 @@ bool encodePropertyTableGameThreadPart( EncodedPropertyTable& encodedFeatureTable); bool encodePropertyTextureGameThreadPart( - TArray>& + TArray>& uniqueTextures, EncodedPropertyTexture& encodedFeatureTexture); @@ -482,4 +482,4 @@ void destroyEncodedModelMetadata(EncodedModelMetadata& encodedMetadata); FString createHlslSafeName(const FString& rawName); -} // namespace CesiumEncodedFeaturesMetadata +} // namespace ITwinCesiumEncodedFeaturesMetadata diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.cpp index 078885a..c9a5a97 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.cpp @@ -10,118 +10,118 @@ #include namespace { -ECesiumEncodedMetadataType +EITwinCesiumEncodedMetadataType GetBestFittingEncodedType(FITwinCesiumMetadataPropertyDetails PropertyDetails) { - ECesiumMetadataType type = PropertyDetails.Type; + EITwinCesiumMetadataType type = PropertyDetails.Type; if (PropertyDetails.bIsArray) { if (PropertyDetails.ArraySize <= 0) { // Variable-length array properties are unsupported. - return ECesiumEncodedMetadataType::None; + return EITwinCesiumEncodedMetadataType::None; } - if (type != ECesiumMetadataType::Boolean && - type != ECesiumMetadataType::Scalar) { + if (type != EITwinCesiumMetadataType::Boolean && + type != EITwinCesiumMetadataType::Scalar) { // Only boolean and scalar array properties are supported. - return ECesiumEncodedMetadataType::None; + return EITwinCesiumEncodedMetadataType::None; } int64 componentCount = std::min(PropertyDetails.ArraySize, static_cast(4)); switch (componentCount) { case 1: - return ECesiumEncodedMetadataType::Scalar; + return EITwinCesiumEncodedMetadataType::Scalar; case 2: - return ECesiumEncodedMetadataType::Vec2; + return EITwinCesiumEncodedMetadataType::Vec2; case 3: - return ECesiumEncodedMetadataType::Vec3; + return EITwinCesiumEncodedMetadataType::Vec3; case 4: - return ECesiumEncodedMetadataType::Vec4; + return EITwinCesiumEncodedMetadataType::Vec4; default: - return ECesiumEncodedMetadataType::None; + return EITwinCesiumEncodedMetadataType::None; } } switch (type) { - case ECesiumMetadataType::Boolean: - case ECesiumMetadataType::Scalar: - return ECesiumEncodedMetadataType::Scalar; - case ECesiumMetadataType::Vec2: - return ECesiumEncodedMetadataType::Vec2; - case ECesiumMetadataType::Vec3: - return ECesiumEncodedMetadataType::Vec3; - case ECesiumMetadataType::Vec4: - return ECesiumEncodedMetadataType::Vec4; + case EITwinCesiumMetadataType::Boolean: + case EITwinCesiumMetadataType::Scalar: + return EITwinCesiumEncodedMetadataType::Scalar; + case EITwinCesiumMetadataType::Vec2: + return EITwinCesiumEncodedMetadataType::Vec2; + case EITwinCesiumMetadataType::Vec3: + return EITwinCesiumEncodedMetadataType::Vec3; + case EITwinCesiumMetadataType::Vec4: + return EITwinCesiumEncodedMetadataType::Vec4; default: - return ECesiumEncodedMetadataType::None; + return EITwinCesiumEncodedMetadataType::None; } } -ECesiumEncodedMetadataComponentType -GetBestFittingEncodedComponentType(ECesiumMetadataComponentType ComponentType) { +EITwinCesiumEncodedMetadataComponentType +GetBestFittingEncodedComponentType(EITwinCesiumMetadataComponentType ComponentType) { switch (ComponentType) { - case ECesiumMetadataComponentType::Int8: // lossy or reinterpreted - case ECesiumMetadataComponentType::Uint8: - return ECesiumEncodedMetadataComponentType::Uint8; - case ECesiumMetadataComponentType::Int16: - case ECesiumMetadataComponentType::Uint16: - case ECesiumMetadataComponentType::Int32: // lossy or reinterpreted - case ECesiumMetadataComponentType::Uint32: // lossy or reinterpreted - case ECesiumMetadataComponentType::Int64: // lossy - case ECesiumMetadataComponentType::Uint64: // lossy - case ECesiumMetadataComponentType::Float32: - case ECesiumMetadataComponentType::Float64: // lossy - return ECesiumEncodedMetadataComponentType::Float; + case EITwinCesiumMetadataComponentType::Int8: // lossy or reinterpreted + case EITwinCesiumMetadataComponentType::Uint8: + return EITwinCesiumEncodedMetadataComponentType::Uint8; + case EITwinCesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Int32: // lossy or reinterpreted + case EITwinCesiumMetadataComponentType::Uint32: // lossy or reinterpreted + case EITwinCesiumMetadataComponentType::Int64: // lossy + case EITwinCesiumMetadataComponentType::Uint64: // lossy + case EITwinCesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float64: // lossy + return EITwinCesiumEncodedMetadataComponentType::Float; default: - return ECesiumEncodedMetadataComponentType::None; + return EITwinCesiumEncodedMetadataComponentType::None; } } } // namespace -ECesiumEncodedMetadataType +EITwinCesiumEncodedMetadataType -CesiumMetadataTypeToEncodingType(ECesiumMetadataType Type) { +CesiumMetadataTypeToEncodingType(EITwinCesiumMetadataType Type) { switch (Type) { - case ECesiumMetadataType::Scalar: - return ECesiumEncodedMetadataType::Scalar; - case ECesiumMetadataType::Vec2: - return ECesiumEncodedMetadataType::Vec2; - case ECesiumMetadataType::Vec3: - return ECesiumEncodedMetadataType::Vec3; - case ECesiumMetadataType::Vec4: - return ECesiumEncodedMetadataType::Vec4; + case EITwinCesiumMetadataType::Scalar: + return EITwinCesiumEncodedMetadataType::Scalar; + case EITwinCesiumMetadataType::Vec2: + return EITwinCesiumEncodedMetadataType::Vec2; + case EITwinCesiumMetadataType::Vec3: + return EITwinCesiumEncodedMetadataType::Vec3; + case EITwinCesiumMetadataType::Vec4: + return EITwinCesiumEncodedMetadataType::Vec4; default: - return ECesiumEncodedMetadataType::None; + return EITwinCesiumEncodedMetadataType::None; } } FITwinCesiumMetadataEncodingDetails CesiumMetadataPropertyDetailsToEncodingDetails( FITwinCesiumMetadataPropertyDetails PropertyDetails) { - ECesiumEncodedMetadataType type = GetBestFittingEncodedType(PropertyDetails); + EITwinCesiumEncodedMetadataType type = GetBestFittingEncodedType(PropertyDetails); - if (type == ECesiumEncodedMetadataType::None) { + if (type == EITwinCesiumEncodedMetadataType::None) { // The type cannot be encoded at all; return. return FITwinCesiumMetadataEncodingDetails(); } - ECesiumEncodedMetadataComponentType componentType = + EITwinCesiumEncodedMetadataComponentType componentType = GetBestFittingEncodedComponentType(PropertyDetails.ComponentType); return FITwinCesiumMetadataEncodingDetails( type, componentType, - ECesiumEncodedMetadataConversion::Coerce); + EITwinCesiumEncodedMetadataConversion::Coerce); } size_t -CesiumGetEncodedMetadataTypeComponentCount(ECesiumEncodedMetadataType Type) { +CesiumGetEncodedMetadataTypeComponentCount(EITwinCesiumEncodedMetadataType Type) { switch (Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: return 1; - case ECesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec2: return 2; - case ECesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec3: return 3; - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec4: return 4; default: return 0; @@ -338,10 +338,10 @@ void coerceAndEncodeVec4s( bool CesiumEncodedMetadataCoerce::canEncode( const FITwinCesiumPropertyTablePropertyDescription& description) { - const ECesiumMetadataType type = description.PropertyDetails.Type; + const EITwinCesiumMetadataType type = description.PropertyDetails.Type; - if (type == ECesiumMetadataType::Boolean || - type == ECesiumMetadataType::String) { + if (type == EITwinCesiumMetadataType::Boolean || + type == EITwinCesiumMetadataType::String) { // Booleans and boolean arrays are supported. // Strings and string arrays are technically supported for all encoded // types. This will attempt to coerce a string by parsing it as the @@ -349,9 +349,9 @@ bool CesiumEncodedMetadataCoerce::canEncode( return true; } - const ECesiumMetadataComponentType componentType = + const EITwinCesiumMetadataComponentType componentType = description.PropertyDetails.ComponentType; - if (componentType == ECesiumMetadataComponentType::None) { + if (componentType == EITwinCesiumMetadataComponentType::None) { // Can't coerce a numeric property that doesn't know its component type. return false; } @@ -359,20 +359,20 @@ bool CesiumEncodedMetadataCoerce::canEncode( if (description.PropertyDetails.bIsArray) { // Only scalar and boolean types are supported. (Booleans will have been // verified earlier in this function). - return type == ECesiumMetadataType::Scalar; + return type == EITwinCesiumMetadataType::Scalar; } switch (type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: // Scalars can be converted to vecNs. return true; - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: // VecNs can be converted to other vecNs of different dimensions, but not to // scalars. return description.EncodingDetails.Type != - ECesiumEncodedMetadataType::Scalar; + EITwinCesiumEncodedMetadataType::Scalar; default: return false; } @@ -385,7 +385,7 @@ void CesiumEncodedMetadataCoerce::encode( size_t pixelSize) { if (propertyDescription.PropertyDetails.bIsArray) { if (propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Uint8) { + EITwinCesiumEncodedMetadataComponentType::Uint8) { coerceAndEncodeArrays( propertyDescription, property, @@ -393,7 +393,7 @@ void CesiumEncodedMetadataCoerce::encode( pixelSize); } else if ( propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Float) { + EITwinCesiumEncodedMetadataComponentType::Float) { coerceAndEncodeArrays( propertyDescription, property, @@ -404,18 +404,18 @@ void CesiumEncodedMetadataCoerce::encode( } if (propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Uint8) { + EITwinCesiumEncodedMetadataComponentType::Uint8) { switch (propertyDescription.EncodingDetails.Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: coerceAndEncodeScalars(property, textureData); break; - case ECesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec2: coerceAndEncodeVec2s(property, textureData, pixelSize); break; - case ECesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec3: coerceAndEncodeVec3s(property, textureData, pixelSize); break; - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec4: coerceAndEncodeVec4s(property, textureData, pixelSize); break; default: @@ -423,18 +423,18 @@ void CesiumEncodedMetadataCoerce::encode( } } else if ( propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Float) { + EITwinCesiumEncodedMetadataComponentType::Float) { switch (propertyDescription.EncodingDetails.Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: coerceAndEncodeScalars(property, textureData); break; - case ECesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec2: coerceAndEncodeVec2s(property, textureData, pixelSize); break; - case ECesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec3: coerceAndEncodeVec3s(property, textureData, pixelSize); break; - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec4: coerceAndEncodeVec4s(property, textureData, pixelSize); break; default: @@ -543,11 +543,11 @@ void parseAndEncodeColors( bool CesiumEncodedMetadataParseColorFromString::canEncode( const FITwinCesiumPropertyTablePropertyDescription& description) { - return description.PropertyDetails.Type == ECesiumMetadataType::String && + return description.PropertyDetails.Type == EITwinCesiumMetadataType::String && !description.PropertyDetails.bIsArray && (description.EncodingDetails.Type == - ECesiumEncodedMetadataType::Vec3 || - description.EncodingDetails.Type == ECesiumEncodedMetadataType::Vec4); + EITwinCesiumEncodedMetadataType::Vec3 || + description.EncodingDetails.Type == EITwinCesiumEncodedMetadataType::Vec4); } void CesiumEncodedMetadataParseColorFromString::encode( @@ -556,11 +556,11 @@ void CesiumEncodedMetadataParseColorFromString::encode( gsl::span& textureData, size_t pixelSize) { if (propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Uint8) { + EITwinCesiumEncodedMetadataComponentType::Uint8) { parseAndEncodeColors(property, textureData, pixelSize); } else if ( propertyDescription.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Float) { + EITwinCesiumEncodedMetadataComponentType::Float) { parseAndEncodeColors(property, textureData, pixelSize); } } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.h index 1934f1f..12fc639 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataConversions.h @@ -4,8 +4,8 @@ #include -enum class ECesiumMetadataType : uint8; -enum class ECesiumEncodedMetadataType : uint8; +enum class EITwinCesiumMetadataType : uint8; +enum class EITwinCesiumEncodedMetadataType : uint8; struct FITwinCesiumPropertyTablePropertyDescription; struct FITwinCesiumPropertyTableProperty; struct FITwinCesiumMetadataPropertyDetails; @@ -14,8 +14,8 @@ struct FITwinCesiumMetadataEncodingDetails; /** * @brief Gets the best-fitting encoded type for the given metadata type. */ -ECesiumEncodedMetadataType -CesiumMetadataTypeToEncodingType(ECesiumMetadataType Type); +EITwinCesiumEncodedMetadataType +CesiumMetadataTypeToEncodingType(EITwinCesiumMetadataType Type); /** * @brief Gets the best-fitting encoded types and conversion method for a given @@ -37,7 +37,7 @@ FITwinCesiumMetadataEncodingDetails CesiumMetadataPropertyDetailsToEncodingDetai * @param type The encoded metadata type. */ size_t -CesiumGetEncodedMetadataTypeComponentCount(ECesiumEncodedMetadataType Type); +CesiumGetEncodedMetadataTypeComponentCount(EITwinCesiumEncodedMetadataType Type); /** * Any custom encoding behavior, e.g., special encoding of unsupported diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.cpp index 748d4fa..ce19044 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.cpp @@ -24,11 +24,11 @@ #include #include -using namespace CesiumTextureUtility; +using namespace ITwinCesiumTextureUtility; PRAGMA_DISABLE_DEPRECATION_WARNINGS -namespace CesiumEncodedMetadataUtility { +namespace ITwinCesiumEncodedMetadataUtility { namespace { @@ -40,12 +40,12 @@ struct EncodedPixelFormat { // TODO: consider picking better pixel formats when they are available for the // current platform. EncodedPixelFormat getPixelFormat( - ECesiumMetadataPackedGpuType_DEPRECATED type, + EITwinCesiumMetadataPackedGpuType_DEPRECATED type, int64 componentCount, bool isNormalized) { switch (type) { - case ECesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: switch (componentCount) { case 1: return {isNormalized ? EPixelFormat::PF_R8 : EPixelFormat::PF_R8_UINT, 1}; @@ -59,7 +59,7 @@ EncodedPixelFormat getPixelFormat( default: return {EPixelFormat::PF_Unknown, 0}; } - case ECesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: switch (componentCount) { case 1: return {EPixelFormat::PF_R32_FLOAT, 4}; @@ -76,7 +76,7 @@ EncodedPixelFormat getPixelFormat( } // namespace EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( - const FFeatureTableDescription& featureTableDescription, + const FITwinFeatureTableDescription& featureTableDescription, const FITwinCesiumPropertyTable& featureTable) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::EncodeFeatureTable) @@ -93,9 +93,9 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( for (const auto& pair : properties) { const FITwinCesiumPropertyTableProperty& property = pair.Value; - const FPropertyDescription* pExpectedProperty = + const FITwinPropertyDescription* pExpectedProperty = featureTableDescription.Properties.FindByPredicate( - [&key = pair.Key](const FPropertyDescription& expectedProperty) { + [&key = pair.Key](const FITwinPropertyDescription& expectedProperty) { return key == expectedProperty.Name; }); @@ -119,46 +119,46 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( int32 expectedComponentCount = 1; switch (pExpectedProperty->Type) { - // case ECesiumPropertyType::Scalar: + // case EITwinCesiumPropertyType::Scalar: // expectedComponentCount = 1; // break; - case ECesiumPropertyType_DEPRECATED::Vec2_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec2_DEPRECATED: expectedComponentCount = 2; break; - case ECesiumPropertyType_DEPRECATED::Vec3_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec3_DEPRECATED: expectedComponentCount = 3; break; - case ECesiumPropertyType_DEPRECATED::Vec4_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec4_DEPRECATED: expectedComponentCount = 4; }; if (expectedComponentCount != componentCount) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Unexpected component count in feature table property.")); continue; } // Coerce the true type into the expected gpu component type. - ECesiumMetadataPackedGpuType_DEPRECATED gpuType = - ECesiumMetadataPackedGpuType_DEPRECATED::None_DEPRECATED; + EITwinCesiumMetadataPackedGpuType_DEPRECATED gpuType = + EITwinCesiumMetadataPackedGpuType_DEPRECATED::None_DEPRECATED; if (pExpectedProperty->ComponentType == - ECesiumPropertyComponentType_DEPRECATED::Uint8_DEPRECATED) { - gpuType = ECesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED; + EITwinCesiumPropertyComponentType_DEPRECATED::Uint8_DEPRECATED) { + gpuType = EITwinCesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED; } else /*if (expected type is float)*/ { - gpuType = ECesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED; + gpuType = EITwinCesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED; } if (pExpectedProperty->Normalized != isNormalized) { if (isNormalized) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Unexpected normalization in feature table property.")); } else { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Feature table property not normalized as expected")); } @@ -167,9 +167,9 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( // Only support normalization of uint8 for now if (isNormalized && - trueType.ComponentType != ECesiumMetadataComponentType::Uint8) { + trueType.ComponentType != EITwinCesiumMetadataComponentType::Uint8) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Feature table property has unexpected type for normalization, only normalization of Uint8 is supported.")); @@ -181,7 +181,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( if (encodedFormat.format == EPixelFormat::PF_Unknown) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Unable to determine a suitable GPU format for this feature table property.")); @@ -215,7 +215,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( if (!encodedProperty.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a feature table property. Most likely could not allocate enough texture memory.")); @@ -233,7 +233,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( if (isArray) { switch (gpuType) { - case ECesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: { + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: { uint8* pWritePos = reinterpret_cast(pTextureData); for (int64 i = 0; i < featureCount; ++i) { FITwinCesiumPropertyArray arrayProperty = @@ -247,7 +247,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( pWritePos += encodedFormat.pixelSize; } } break; - case ECesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: { + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: { uint8* pWritePos = reinterpret_cast(pTextureData); for (int64 i = 0; i < featureCount; ++i) { FITwinCesiumPropertyArray arrayProperty = @@ -269,7 +269,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( } } else { switch (gpuType) { - case ECesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: { + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Uint8_DEPRECATED: { uint8* pWritePos = reinterpret_cast(pTextureData); for (int64 i = 0; i < featureCount; ++i) { *pWritePos = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetByte( @@ -278,7 +278,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( ++pWritePos; } } break; - case ECesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: { + case EITwinCesiumMetadataPackedGpuType_DEPRECATED::Float_DEPRECATED: { float* pWritePosF = reinterpret_cast(pTextureData); for (int64 i = 0; i < featureCount; ++i) { *pWritePosF = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetFloat( @@ -300,7 +300,7 @@ EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( TMap>& featureTexturePropertyMap, - const FFeatureTextureDescription& featureTextureDescription, + const FITwinFeatureTextureDescription& featureTextureDescription, const FString& featureTextureName, const FITwinCesiumPropertyTexture& featureTexture) { @@ -313,10 +313,10 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( encodedFeatureTexture.properties.Reserve(properties.Num()); for (const auto& propertyIt : properties) { - const FFeatureTexturePropertyDescription* pPropertyDescription = + const FITwinFeatureTexturePropertyDescription* pPropertyDescription = featureTextureDescription.Properties.FindByPredicate( [propertyName = propertyIt.Key]( - const FFeatureTexturePropertyDescription& expectedProperty) { + const FITwinFeatureTexturePropertyDescription& expectedProperty) { return propertyName == expectedProperty.Name; }); @@ -331,7 +331,7 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( if (!pImage) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("This feature texture property does not have a valid image.")); continue; @@ -339,16 +339,16 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( int32 expectedComponentCount = 0; switch (pPropertyDescription->Type) { - case ECesiumPropertyType_DEPRECATED::Scalar_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Scalar_DEPRECATED: expectedComponentCount = 1; break; - case ECesiumPropertyType_DEPRECATED::Vec2_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec2_DEPRECATED: expectedComponentCount = 2; break; - case ECesiumPropertyType_DEPRECATED::Vec3_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec3_DEPRECATED: expectedComponentCount = 3; break; - case ECesiumPropertyType_DEPRECATED::Vec4_DEPRECATED: + case EITwinCesiumPropertyType_DEPRECATED::Vec4_DEPRECATED: expectedComponentCount = 4; break; }; @@ -358,23 +358,23 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetValueType( featureTextureProperty); switch (valueType.Type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: actualComponentCount = 1; break; - case ECesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec2: actualComponentCount = 2; break; - case ECesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec3: actualComponentCount = 3; break; - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec4: actualComponentCount = 4; break; } if (expectedComponentCount != actualComponentCount) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "This feature texture property does not have the expected component count")); @@ -386,7 +386,7 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( featureTextureProperty); if (pPropertyDescription->Normalized != isNormalized) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "This feature texture property does not have the expected normalization.")); @@ -443,7 +443,7 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( if (!encodedFeatureTextureProperty.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a feature texture property. Most likely could not allocate enough texture memory.")); @@ -471,7 +471,7 @@ EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( } EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( - const FMetadataDescription& metadataDescription, + const FITwinMetadataDescription& metadataDescription, const FITwinCesiumMetadataPrimitive& primitive) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::EncodeMetadataPrimitive) @@ -489,7 +489,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( primitive); result.featureTextureNames.Reserve(featureTextureNames.Num()); - for (const FFeatureTextureDescription& expectedFeatureTexture : + for (const FITwinFeatureTextureDescription& expectedFeatureTexture : metadataDescription.FeatureTextures) { if (featureTextureNames.Find(expectedFeatureTexture.Name) != INDEX_NONE) { result.featureTextureNames.Add(expectedFeatureTexture.Name); @@ -505,12 +505,12 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( // Imposed implementation limitation: Assume only upto one feature id texture // or attribute corresponds to each feature table. - for (const FFeatureTableDescription& expectedFeatureTable : + for (const FITwinFeatureTableDescription& expectedFeatureTable : metadataDescription.FeatureTables) { const FString& featureTableName = expectedFeatureTable.Name; if (expectedFeatureTable.AccessType == - ECesiumFeatureTableAccessType_DEPRECATED::Texture_DEPRECATED) { + EITwinCesiumFeatureTableAccessType_DEPRECATED::Texture_DEPRECATED) { const FITwinCesiumFeatureIdTexture* pFeatureIdTexture = featureIdTextures.FindByPredicate([&featureTableName]( @@ -529,7 +529,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( if (!pFeatureIdImage) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Feature id texture missing valid image.")); continue; @@ -573,7 +573,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( if (!encodedFeatureIdTexture.pTexture->pTextureData) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Error encoding a feature table property. Most likely could not allocate enough texture memory.")); @@ -602,7 +602,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( } } else if ( expectedFeatureTable.AccessType == - ECesiumFeatureTableAccessType_DEPRECATED::Attribute_DEPRECATED) { + EITwinCesiumFeatureTableAccessType_DEPRECATED::Attribute_DEPRECATED) { for (size_t i = 0; i < featureIdAttributes.Num(); ++i) { const FITwinCesiumFeatureIdAttribute& featureIdAttribute = featureIdAttributes[i]; @@ -627,7 +627,7 @@ EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( } EncodedMetadata encodeMetadataAnyThreadPart( - const FMetadataDescription& metadataDescription, + const FITwinMetadataDescription& metadataDescription, const FITwinCesiumModelMetadata& metadata) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::EncodeMetadataModel) @@ -640,10 +640,10 @@ EncodedMetadata encodeMetadataAnyThreadPart( for (const auto& featureTableIt : featureTables) { const FString& featureTableName = featureTableIt.Key; - const FFeatureTableDescription* pExpectedFeatureTable = + const FITwinFeatureTableDescription* pExpectedFeatureTable = metadataDescription.FeatureTables.FindByPredicate( [&featureTableName]( - const FFeatureTableDescription& expectedFeatureTable) { + const FITwinFeatureTableDescription& expectedFeatureTable) { return featureTableName == expectedFeatureTable.Name; }); @@ -667,10 +667,10 @@ EncodedMetadata encodeMetadataAnyThreadPart( for (const auto& featureTextureIt : featureTextures) { const FString& featureTextureName = featureTextureIt.Key; - const FFeatureTextureDescription* pExpectedFeatureTexture = + const FITwinFeatureTextureDescription* pExpectedFeatureTexture = metadataDescription.FeatureTextures.FindByPredicate( [&featureTextureName]( - const FFeatureTextureDescription& expectedFeatureTexture) { + const FITwinFeatureTextureDescription& expectedFeatureTexture) { return featureTextureName == expectedFeatureTexture.Name; }); @@ -769,7 +769,7 @@ void destroyEncodedMetadataPrimitive( encodedPrimitive.encodedFeatureIdTextures) { if (encodedFeatureIdTexture.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy(encodedFeatureIdTexture.pTexture->pTexture.Get()); + FITwinCesiumLifetime::destroy(encodedFeatureIdTexture.pTexture->pTexture.Get()); encodedFeatureIdTexture.pTexture->pTexture.Reset(); } } @@ -782,7 +782,7 @@ void destroyEncodedMetadata(EncodedMetadata& encodedMetadata) { for (EncodedMetadataProperty& encodedProperty : encodedFeatureTableIt.Value.encodedProperties) { if (encodedProperty.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy(encodedProperty.pTexture->pTexture.Get()); + FITwinCesiumLifetime::destroy(encodedProperty.pTexture->pTexture.Get()); encodedProperty.pTexture->pTexture.Reset(); } } @@ -793,7 +793,7 @@ void destroyEncodedMetadata(EncodedMetadata& encodedMetadata) { for (EncodedFeatureTextureProperty& encodedFeatureTextureProperty : encodedFeatureTextureIt.Value.properties) { if (encodedFeatureTextureProperty.pTexture->pTexture.IsValid()) { - CesiumLifetime::destroy( + FITwinCesiumLifetime::destroy( encodedFeatureTextureProperty.pTexture->pTexture.Get()); encodedFeatureTextureProperty.pTexture->pTexture.Reset(); } @@ -827,6 +827,6 @@ FString createHlslSafeName(const FString& rawName) { return safeName; } -} // namespace CesiumEncodedMetadataUtility +} // namespace ITwinCesiumEncodedMetadataUtility PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.h index d08c2ac..1252b23 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumEncodedMetadataUtility.h @@ -16,15 +16,15 @@ struct FITwinCesiumModelMetadata; struct FITwinCesiumMetadataPrimitive; struct FITwinCesiumPropertyTable; struct FITwinCesiumPropertyTexture; -struct FFeatureTableDescription; -struct FFeatureTextureDescription; -struct FMetadataDescription; +struct FITwinFeatureTableDescription; +struct FITwinFeatureTextureDescription; +struct FITwinMetadataDescription; struct FITwinCesiumPrimitiveFeaturesDescription; /** - * DEPRECATED. Use CesiumEncodedFeaturesMetadata instead. + * DEPRECATED. Use ITwinCesiumEncodedFeaturesMetadata instead. */ -namespace CesiumEncodedMetadataUtility { +namespace ITwinCesiumEncodedMetadataUtility { struct EncodedMetadataProperty { /** * @brief The name of this property. @@ -34,7 +34,7 @@ struct EncodedMetadataProperty { /** * @brief The encoded property array. */ - TUniquePtr pTexture; + TUniquePtr pTexture; }; struct EncodedMetadataFeatureTable { @@ -59,7 +59,7 @@ struct EncodedFeatureIdTexture { /** * @brief The actual feature id texture. */ - TSharedPtr pTexture; + TSharedPtr pTexture; /** * @brief The channel that this feature id texture uses within the image. @@ -80,7 +80,7 @@ struct EncodedFeatureIdAttribute { struct EncodedFeatureTextureProperty { FString baseName; - TSharedPtr pTexture; + TSharedPtr pTexture; int64 textureCoordinateAttributeId; int32 channelOffsets[4]; }; @@ -101,31 +101,31 @@ struct EncodedMetadata { }; EncodedMetadataFeatureTable encodeMetadataFeatureTableAnyThreadPart( - const FFeatureTableDescription& featureTableDescription, + const FITwinFeatureTableDescription& featureTableDescription, const FITwinCesiumPropertyTable& featureTable); EncodedFeatureTexture encodeFeatureTextureAnyThreadPart( TMap< const CesiumGltf::ImageCesium*, - TWeakPtr>& + TWeakPtr>& featureTexturePropertyMap, - const FFeatureTextureDescription& featureTextureDescription, + const FITwinFeatureTextureDescription& featureTextureDescription, const FString& featureTextureName, const FITwinCesiumPropertyTexture& featureTexture); EncodedMetadataPrimitive encodeMetadataPrimitiveAnyThreadPart( - const FMetadataDescription& metadataDescription, + const FITwinMetadataDescription& metadataDescription, const FITwinCesiumMetadataPrimitive& primitive); EncodedMetadata encodeMetadataAnyThreadPart( - const FMetadataDescription& metadataDescription, + const FITwinMetadataDescription& metadataDescription, const FITwinCesiumModelMetadata& metadata); bool encodeMetadataFeatureTableGameThreadPart( EncodedMetadataFeatureTable& encodedFeatureTable); bool encodeFeatureTextureGameThreadPart( - TArray>& + TArray>& uniqueTextures, EncodedFeatureTexture& encodedFeatureTexture); @@ -141,6 +141,6 @@ void destroyEncodedMetadata(EncodedMetadata& encodedMetadata); FString createHlslSafeName(const FString& rawName); -} // namespace CesiumEncodedMetadataUtility +} // namespace ITwinCesiumEncodedMetadataUtility PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdAttribute.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdAttribute.cpp index 64b7d72..04bc6ab 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdAttribute.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdAttribute.cpp @@ -11,7 +11,7 @@ FITwinCesiumFeatureIdAttribute::FITwinCesiumFeatureIdAttribute( const MeshPrimitive& Primitive, const int64 FeatureIDAttribute, const FString& PropertyTableName) - : _status(ECesiumFeatureIdAttributeStatus::ErrorInvalidAttribute), + : _status(EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAttribute), _featureIdAccessor(), _attributeIndex(FeatureIDAttribute), _propertyTableName(PropertyTableName) { @@ -26,7 +26,7 @@ FITwinCesiumFeatureIdAttribute::FITwinCesiumFeatureIdAttribute( const Accessor* accessor = Model.getSafe(&Model.accessors, featureID->second); if (!accessor || accessor->type != Accessor::Type::SCALAR) { - this->_status = ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor; + this->_status = EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor; return; } @@ -38,10 +38,10 @@ FITwinCesiumFeatureIdAttribute::FITwinCesiumFeatureIdAttribute( this->_status = std::visit( [](auto view) { if (view.status() != AccessorViewStatus::Valid) { - return ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor; + return EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor; } - return ECesiumFeatureIdAttributeStatus::Valid; + return EITwinCesiumFeatureIdAttributeStatus::Valid; }, this->_featureIdAccessor); } @@ -51,7 +51,7 @@ const FString& UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureTableNa return FeatureIDAttribute._propertyTableName; } -ECesiumFeatureIdAttributeStatus +EITwinCesiumFeatureIdAttributeStatus UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDAttributeStatus( UPARAM(ref) const FITwinCesiumFeatureIdAttribute& FeatureIDAttribute) { return FeatureIDAttribute._status; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdSet.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdSet.cpp index bc244e8..bb557ac 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdSet.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdSet.cpp @@ -17,7 +17,7 @@ FITwinCesiumFeatureIdSet::FITwinCesiumFeatureIdSet( const MeshPrimitive& Primitive, const FeatureId& FeatureID) : _featureID(), - _featureIDSetType(ECesiumFeatureIdSetType::None), + _featureIDSetType(EITwinCesiumFeatureIdSetType::None), _featureCount(FeatureID.featureCount), _nullFeatureID(FeatureID.nullFeatureId.value_or(-1)), _propertyTableIndex(FeatureID.propertyTable.value_or(-1)), @@ -42,7 +42,7 @@ FITwinCesiumFeatureIdSet::FITwinCesiumFeatureIdSet( Primitive, *FeatureID.attribute, propertyTableName); - _featureIDSetType = ECesiumFeatureIdSetType::Attribute; + _featureIDSetType = EITwinCesiumFeatureIdSetType::Attribute; return; } @@ -53,17 +53,17 @@ FITwinCesiumFeatureIdSet::FITwinCesiumFeatureIdSet( Primitive, *FeatureID.texture, propertyTableName); - _featureIDSetType = ECesiumFeatureIdSetType::Texture; + _featureIDSetType = EITwinCesiumFeatureIdSetType::Texture; return; } if (_featureCount > 0) { - _featureIDSetType = ECesiumFeatureIdSetType::Implicit; + _featureIDSetType = EITwinCesiumFeatureIdSetType::Implicit; } } -const ECesiumFeatureIdSetType +const EITwinCesiumFeatureIdSetType UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet) { return FeatureIDSet._featureIDSetType; @@ -72,7 +72,7 @@ UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( const FITwinCesiumFeatureIdAttribute& UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDAttribute( UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet) { - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Attribute) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Attribute) { return std::get(FeatureIDSet._featureID); } @@ -82,7 +82,7 @@ UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDAttribute( const FITwinCesiumFeatureIdTexture& UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDTexture( UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet) { - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Texture) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Texture) { return std::get(FeatureIDSet._featureID); } @@ -112,7 +112,7 @@ const FString UITwinCesiumFeatureIdSetBlueprintLibrary::GetLabel( int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDForVertex( UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet, int64 VertexIndex) { - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Attribute) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Attribute) { FITwinCesiumFeatureIdAttribute attribute = std::get(FeatureIDSet._featureID); return UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDForVertex( @@ -120,7 +120,7 @@ int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDForVertex( VertexIndex); } - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Texture) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Texture) { FITwinCesiumFeatureIdTexture texture = std::get(FeatureIDSet._featureID); return UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDForVertex( @@ -128,7 +128,7 @@ int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDForVertex( VertexIndex); } - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Implicit) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Implicit) { return (VertexIndex >= 0 && VertexIndex < FeatureIDSet._featureCount) ? VertexIndex : -1; @@ -140,7 +140,7 @@ int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDForVertex( int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDFromHit( UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet, const FHitResult& Hit) { - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Texture) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Texture) { FITwinCesiumFeatureIdTexture texture = std::get(FeatureIDSet._featureID); return UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDFromHit( @@ -164,7 +164,7 @@ int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDFromHit( int64 VertexIndex = VertexIndices[0]; - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Attribute) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Attribute) { FITwinCesiumFeatureIdAttribute attribute = std::get(FeatureIDSet._featureID); return UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDForVertex( @@ -172,7 +172,7 @@ int64 UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDFromHit( VertexIndex); } - if (FeatureIDSet._featureIDSetType == ECesiumFeatureIdSetType::Implicit) { + if (FeatureIDSet._featureIDSetType == EITwinCesiumFeatureIdSetType::Implicit) { return (VertexIndex >= 0 && VertexIndex < FeatureIDSet._featureCount) ? VertexIndex : -1; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdTexture.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdTexture.cpp index cfe67cd..4a57543 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdTexture.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeatureIdTexture.cpp @@ -15,17 +15,17 @@ FITwinCesiumFeatureIdTexture::FITwinCesiumFeatureIdTexture( const MeshPrimitive& Primitive, const FeatureIdTexture& FeatureIdTexture, const FString& PropertyTableName) - : _status(ECesiumFeatureIdTextureStatus::ErrorInvalidTexture), + : _status(EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture), _featureIdTextureView(Model, FeatureIdTexture), _texCoordAccessor(), _textureCoordinateSetIndex(FeatureIdTexture.texCoord), _propertyTableName(PropertyTableName) { switch (_featureIdTextureView.status()) { case FeatureIdTextureViewStatus::Valid: - _status = ECesiumFeatureIdTextureStatus::Valid; + _status = EITwinCesiumFeatureIdTextureStatus::Valid; break; case FeatureIdTextureViewStatus::ErrorInvalidChannels: - _status = ECesiumFeatureIdTextureStatus::ErrorInvalidTextureAccess; + _status = EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTextureAccess; return; default: // Error with the texture or image. The status is already set by the @@ -51,7 +51,7 @@ const FString& UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureTableName return FeatureIDTexture._propertyTableName; } -ECesiumFeatureIdTextureStatus +EITwinCesiumFeatureIdTextureStatus UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( UPARAM(ref) const FITwinCesiumFeatureIdTexture& FeatureIDTexture) { return FeatureIDTexture._status; @@ -68,7 +68,7 @@ int64 UITwinCesiumFeatureIdTextureBlueprintLibrary::GetUnrealUVChannel( const UITwinCesiumGltfPrimitiveComponent* pPrimitive = Cast(PrimitiveComponent); if (!pPrimitive || - FeatureIDTexture._status != ECesiumFeatureIdTextureStatus::Valid) { + FeatureIDTexture._status != EITwinCesiumFeatureIdTextureStatus::Valid) { return -1; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeaturesMetadataComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeaturesMetadataComponent.cpp index 288facc..0c00aa2 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeaturesMetadataComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFeaturesMetadataComponent.cpp @@ -38,7 +38,7 @@ extern UNREALED_API class UEditorEngine* GEditor; -using namespace CesiumEncodedFeaturesMetadata; +using namespace ITwinCesiumEncodedFeaturesMetadata; static const FString AutogeneratedMessage = "AUTOGENERATED DO NOT EDIT"; @@ -77,15 +77,15 @@ void AutoFillPropertyTableDescriptions( // We have already accounted for this property, but we may need to check // for its offset / scale, since they can differ from the class // property's definition. - ECesiumMetadataType type = pExistingProperty->PropertyDetails.Type; + EITwinCesiumMetadataType type = pExistingProperty->PropertyDetails.Type; switch (type) { - case ECesiumMetadataType::Scalar: - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: - case ECesiumMetadataType::Mat2: - case ECesiumMetadataType::Mat3: - case ECesiumMetadataType::Mat4: + case EITwinCesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Mat2: + case EITwinCesiumMetadataType::Mat3: + case EITwinCesiumMetadataType::Mat4: break; default: continue; @@ -186,15 +186,15 @@ void AutoFillPropertyTextureDescriptions( // We have already accounted for this property, but we may need to check // for its offset / scale, since they can differ from the class // property's definition. - ECesiumMetadataType type = pExistingProperty->PropertyDetails.Type; + EITwinCesiumMetadataType type = pExistingProperty->PropertyDetails.Type; switch (type) { - case ECesiumMetadataType::Scalar: - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: - case ECesiumMetadataType::Mat2: - case ECesiumMetadataType::Mat3: - case ECesiumMetadataType::Mat4: + case EITwinCesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Mat2: + case EITwinCesiumMetadataType::Mat3: + case EITwinCesiumMetadataType::Mat4: break; default: continue; @@ -266,11 +266,11 @@ void AutoFillFeatureIdSetDescriptions( int32 featureIDTextureCounter = 0; for (const FITwinCesiumFeatureIdSet& featureIDSet : featureIDSets) { - ECesiumFeatureIdSetType type = + EITwinCesiumFeatureIdSetType type = UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType(featureIDSet); int64 count = UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet); - if (type == ECesiumFeatureIdSetType::None || count == 0) { + if (type == EITwinCesiumFeatureIdSetType::None || count == 0) { // Empty or invalid feature ID set. Skip. continue; } @@ -796,29 +796,29 @@ float GetNameLengthScalar(const FString& Name) { } ECustomMaterialOutputType -GetOutputTypeForEncodedType(ECesiumEncodedMetadataType Type) { +GetOutputTypeForEncodedType(EITwinCesiumEncodedMetadataType Type) { switch (Type) { - case ECesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec2: return ECustomMaterialOutputType::CMOT_Float2; - case ECesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec3: return ECustomMaterialOutputType::CMOT_Float3; - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec4: return ECustomMaterialOutputType::CMOT_Float4; - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: default: return ECustomMaterialOutputType::CMOT_Float1; }; } -FString GetSwizzleForEncodedType(ECesiumEncodedMetadataType Type) { +FString GetSwizzleForEncodedType(EITwinCesiumEncodedMetadataType Type) { switch (Type) { - case ECesiumEncodedMetadataType::Scalar: + case EITwinCesiumEncodedMetadataType::Scalar: return ".r"; - case ECesiumEncodedMetadataType::Vec2: + case EITwinCesiumEncodedMetadataType::Vec2: return ".rg"; - case ECesiumEncodedMetadataType::Vec3: + case EITwinCesiumEncodedMetadataType::Vec3: return ".rgb"; - case ECesiumEncodedMetadataType::Vec4: + case EITwinCesiumEncodedMetadataType::Vec4: return ".rgba"; default: return FString(); @@ -828,7 +828,7 @@ FString GetSwizzleForEncodedType(ECesiumEncodedMetadataType Type) { bool IsSupportedPropertyTextureProperty( const FITwinCesiumMetadataPropertyDetails& PropertyDetails) { if (PropertyDetails.bIsArray && - PropertyDetails.Type != ECesiumMetadataType::Scalar) { + PropertyDetails.Type != EITwinCesiumMetadataType::Scalar) { // Only scalar arrays are supported. return false; } @@ -882,12 +882,12 @@ FString GenerateCodeForScalarPropertyTextureProperty( // clang-format on } switch (PropertyDetails.ComponentType) { - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: code += PropertyName + " = asfloat(" + PropertyResultName + ");\n"; break; - case ECesiumMetadataComponentType::Int8: - case ECesiumMetadataComponentType::Int16: - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int32: code += PropertyName + " = asint(" + PropertyResultName + ");\n"; default: code += PropertyName + " = " + PropertyResultName + ";\n"; @@ -907,12 +907,12 @@ FString GenerateCodeForVec2PropertyTextureProperty( const FITwinCesiumMetadataPropertyDetails& PropertyDetails) { FString ComponentString; switch (PropertyDetails.ComponentType) { - case ECesiumMetadataComponentType::Uint8: - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint16: ComponentString = "uint"; break; - case ECesiumMetadataComponentType::Int8: - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int16: ComponentString = "int"; break; default: @@ -971,15 +971,15 @@ FString GenerateCodeForVec2PropertyTextureProperty( FString GenerateCodeForVecNPropertyTextureProperty( const FString& PropertyName, const FString& PropertyChannelsName, - ECesiumMetadataComponentType ComponentType, + EITwinCesiumMetadataComponentType ComponentType, uint32 Count) { FString ComponentString; // Only single-byte components are supported. switch (ComponentType) { - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: ComponentString = "uint"; break; - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: ComponentString = "int"; break; default: @@ -1078,25 +1078,25 @@ FString GenerateCodeForPropertyTextureProperty( } switch (PropertyDetails.Type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: return code + GenerateCodeForScalarPropertyTextureProperty( PropertyName, PropertyChannelsName, PropertyDetails); - case ECesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec2: // Vec2s must be handled differently because they can consist of either // single-byte or double-byte components return code + GenerateCodeForVec2PropertyTextureProperty( PropertyName, PropertyChannelsName, PropertyDetails); - case ECesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec3: return code + GenerateCodeForVecNPropertyTextureProperty( PropertyName, PropertyChannelsName, PropertyDetails.ComponentType, 3); - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec4: return code + GenerateCodeForVecNPropertyTextureProperty( PropertyName, PropertyChannelsName, @@ -1276,7 +1276,7 @@ void GenerateNodesForNullFeatureId( * type. */ UMaterialExpressionParameter* GenerateParameterNodeWithGivenType( - const ECesiumEncodedMetadataType Type, + const EITwinCesiumEncodedMetadataType Type, const FString& Name, TArray& AutoGeneratedNodes, UMaterialFunctionMaterialLayer* TargetMaterialLayer, @@ -1285,16 +1285,16 @@ UMaterialExpressionParameter* GenerateParameterNodeWithGivenType( UMaterialExpressionParameter* Parameter = nullptr; int32 NodeHeight = 0; - if (Type == ECesiumEncodedMetadataType::Scalar) { + if (Type == EITwinCesiumEncodedMetadataType::Scalar) { UMaterialExpressionScalarParameter* ScalarParameter = NewObject(TargetMaterialLayer); ScalarParameter->DefaultValue = 0.0f; Parameter = ScalarParameter; } - if (Type == ECesiumEncodedMetadataType::Vec2 || - Type == ECesiumEncodedMetadataType::Vec3 || - Type == ECesiumEncodedMetadataType::Vec4) { + if (Type == EITwinCesiumEncodedMetadataType::Vec2 || + Type == EITwinCesiumEncodedMetadataType::Vec3 || + Type == EITwinCesiumEncodedMetadataType::Vec4) { UMaterialExpressionVectorParameter* VectorParameter = NewObject(TargetMaterialLayer); VectorParameter->DefaultValue = FLinearColor(0.0f, 0.0f, 0.0f, 0.0f); @@ -1319,7 +1319,7 @@ UMaterialExpressionParameter* GenerateParameterNodeWithGivenType( */ void GenerateNodesForMetadataPropertyTransforms( const FITwinCesiumMetadataPropertyDetails& PropertyDetails, - ECesiumEncodedMetadataType Type, + EITwinCesiumEncodedMetadataType Type, const FString& PropertyName, const FString& FullPropertyName, TArray& AutoGeneratedNodes, @@ -1463,7 +1463,7 @@ void GenerateNodesForMetadataPropertyTransforms( int32 NameLength = Incr * GetNameLengthScalar(Parameter->ParameterName); - if (Type == ECesiumEncodedMetadataType::Scalar) { + if (Type == EITwinCesiumEncodedMetadataType::Scalar) { // No additional work needs to be done to retrieve the scalar, so don't // an extra unnecessary node. GetNoDataValueNode = Parameter; @@ -1513,7 +1513,7 @@ void GenerateNodesForMetadataPropertyTransforms( int32 NameLength = Incr * GetNameLengthScalar(Parameter->ParameterName); - if (Type == ECesiumEncodedMetadataType::Scalar) { + if (Type == EITwinCesiumEncodedMetadataType::Scalar) { // No additional work needs to be done to retrieve the scalar, so don't // an extra unnecessary node. GetDefaultValueNode = Parameter; @@ -1712,7 +1712,7 @@ void GenerateNodesForPropertyTable( for (const FITwinCesiumPropertyTablePropertyDescription& Property : PropertyTable.Properties) { if (Property.EncodingDetails.Conversion == - ECesiumEncodedMetadataConversion::None || + EITwinCesiumEncodedMetadataConversion::None || !Property.EncodingDetails.HasValidType()) { continue; } @@ -1781,7 +1781,7 @@ void GenerateNodesForPropertyTable( FString asComponentString = Property.EncodingDetails.ComponentType == - ECesiumEncodedMetadataComponentType::Float + EITwinCesiumEncodedMetadataComponentType::Float ? "asfloat" : "asuint"; @@ -1901,7 +1901,7 @@ void GenerateNodesForPropertyTexture( // more than four bytes to parse values from. This limitation is imposed // by cesium-native because only single-byte channels are supported. UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Skipping material node generation for unsupported property texture property %s in %s."), @@ -1914,7 +1914,7 @@ void GenerateNodesForPropertyTexture( FString FullPropertyName = getMaterialNameForPropertyTextureProperty( PropertyTextureName, PropertyName); - ECesiumEncodedMetadataType Type = + EITwinCesiumEncodedMetadataType Type = CesiumMetadataPropertyDetailsToEncodingDetails(Property.PropertyDetails) .Type; @@ -2112,12 +2112,12 @@ void GenerateMaterialNodes( for (const FITwinCesiumFeatureIdSetDescription& featureIdSet : pComponent->FeatureIdSets) { - if (featureIdSet.Type == ECesiumFeatureIdSetType::None) { + if (featureIdSet.Type == EITwinCesiumFeatureIdSetType::None) { continue; } UMaterialExpressionMaterialFunctionCall* GetFeatureIdCall = nullptr; - if (featureIdSet.Type == ECesiumFeatureIdSetType::Texture) { + if (featureIdSet.Type == EITwinCesiumFeatureIdSetType::Texture) { GetFeatureIdCall = GenerateNodesForFeatureIdTexture( featureIdSet, AutoGeneratedNodes, @@ -2349,7 +2349,7 @@ void UITwinCesiumFeaturesMetadataComponent::GenerateMaterial() { if (!SelectTexCoordsFunction || !GetFeatureIdsFromAttributeFunction || !GetFeatureIdsFromTextureFunction) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Can't find the material functions necessary to generate material. Aborting.")); @@ -2359,7 +2359,7 @@ void UITwinCesiumFeaturesMetadataComponent::GenerateMaterial() { if (this->TargetMaterialLayer && this->TargetMaterialLayer->GetPackage()->IsDirty()) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Can't regenerate a material layer that has unsaved changes. Please save your changes and try again.")); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFlyToComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFlyToComponent.cpp index ed05606..6863b88 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFlyToComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumFlyToComponent.cpp @@ -42,7 +42,7 @@ void UITwinCesiumFlyToComponent::FlyToLocationEarthCenteredEarthFixed( bool CanInterruptByMoving) { if (this->_flightInProgress) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT("Cannot start a flight because one is already in progress.")); return; @@ -65,9 +65,9 @@ void UITwinCesiumFlyToComponent::FlyToLocationEarthCenteredEarthFixed( this->_destinationEcef = EarthCenteredEarthFixedDestination; // Compute axis/Angle transform - glm::dvec3 glmEcefSource = VecMath::createVector3D( + glm::dvec3 glmEcefSource = FITwinVecMath::createVector3D( UITwinCesiumWgs84Ellipsoid::ScaleToGeodeticSurface(ecefSource)); - glm::dvec3 glmEcefDestination = VecMath::createVector3D( + glm::dvec3 glmEcefDestination = FITwinVecMath::createVector3D( UITwinCesiumWgs84Ellipsoid::ScaleToGeodeticSurface(this->_destinationEcef)); glm::dquat flyQuat = glm::rotation( @@ -158,7 +158,7 @@ void UITwinCesiumFlyToComponent::FlyToLocationUnreal( UITwinCesiumGlobeAnchorComponent* GlobeAnchor = this->GetGlobeAnchor(); if (!IsValid(GlobeAnchor)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumFlyToComponent cannot FlyToLocationUnreal because the Actor has no CesiumGlobeAnchorComponent.")); @@ -168,7 +168,7 @@ void UITwinCesiumFlyToComponent::FlyToLocationUnreal( AITwinCesiumGeoreference* Georeference = GlobeAnchor->ResolveGeoreference(); if (!IsValid(Georeference)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumFlyToComponent cannot FlyToLocationUnreal because the globe anchor has no associated CesiumGeoreference.")); @@ -196,7 +196,7 @@ void UITwinCesiumFlyToComponent::InterruptFlight() { } // Trigger callback accessible from BP - UE_LOG(LogCesium, Verbose, TEXT("Broadcasting OnFlightInterrupt")); + UE_LOG(LogITwinCesium, Verbose, TEXT("Broadcasting OnFlightInterrupt")); OnFlightInterrupted.Broadcast(); } @@ -250,7 +250,7 @@ void UITwinCesiumFlyToComponent::TickComponent( this->_currentFlyTime = 0.0f; // Trigger callback accessible from BP - UE_LOG(LogCesium, Verbose, TEXT("Broadcasting OnFlightComplete")); + UE_LOG(LogITwinCesium, Verbose, TEXT("Broadcasting OnFlightComplete")); OnFlightComplete.Broadcast(); return; @@ -301,14 +301,14 @@ void UITwinCesiumFlyToComponent::TickComponent( } FQuat UITwinCesiumFlyToComponent::GetCurrentRotationEastSouthUp() { - if (this->RotationToUse != ECesiumFlyToRotation::Actor) { + if (this->RotationToUse != EITwinCesiumFlyToRotation::Actor) { APawn* Pawn = Cast(this->GetOwner()); const TObjectPtr Controller = IsValid(Pawn) ? Pawn->Controller : nullptr; if (Controller) { FRotator rotator = Controller->GetControlRotation(); if (this->RotationToUse == - ECesiumFlyToRotation::ControlRotationInUnreal) { + EITwinCesiumFlyToRotation::ControlRotationInUnreal) { USceneComponent* PawnRoot = Pawn->GetRootComponent(); if (IsValid(PawnRoot)) { rotator = GetGlobeAnchor() @@ -329,14 +329,14 @@ void UITwinCesiumFlyToComponent::SetCurrentRotationEastSouthUp( const FQuat& EastSouthUpRotation) { bool controlRotationSet = false; - if (this->RotationToUse != ECesiumFlyToRotation::Actor) { + if (this->RotationToUse != EITwinCesiumFlyToRotation::Actor) { APawn* Pawn = Cast(this->GetOwner()); const TObjectPtr Controller = IsValid(Pawn) ? Pawn->Controller : nullptr; if (Controller) { FRotator rotator = EastSouthUpRotation.Rotator(); if (this->RotationToUse == - ECesiumFlyToRotation::ControlRotationInUnreal) { + EITwinCesiumFlyToRotation::ControlRotationInUnreal) { USceneComponent* PawnRoot = Pawn->GetRootComponent(); if (IsValid(PawnRoot)) { rotator = GetGlobeAnchor() diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGeoreference.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGeoreference.cpp index ce34948..0ff89f0 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGeoreference.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGeoreference.cpp @@ -51,7 +51,7 @@ namespace { LocalHorizontalCoordinateSystem createCoordinateSystem(const FVector& center, double scale) { return LocalHorizontalCoordinateSystem( - VecMath::createVector3D(center), + FITwinVecMath::createVector3D(center), LocalDirection::East, LocalDirection::South, LocalDirection::Up, @@ -204,11 +204,11 @@ void AITwinCesiumGeoreference::SetOriginEarthCenteredEarthFixed( TargetEarthCenteredEarthFixed)); } -EOriginPlacement AITwinCesiumGeoreference::GetOriginPlacement() const { +EITwinOriginPlacement AITwinCesiumGeoreference::GetOriginPlacement() const { return this->OriginPlacement; } -void AITwinCesiumGeoreference::SetOriginPlacement(EOriginPlacement NewValue) { +void AITwinCesiumGeoreference::SetOriginPlacement(EITwinOriginPlacement NewValue) { this->OriginPlacement = NewValue; this->UpdateGeoreference(); } @@ -286,26 +286,26 @@ FVector AITwinCesiumGeoreference::TransformUnrealPositionToLongitudeLatitudeHeig FVector AITwinCesiumGeoreference::TransformEarthCenteredEarthFixedPositionToUnreal( const FVector& EarthCenteredEarthFixedPosition) const { - return VecMath::createVector(this->_coordinateSystem.ecefPositionToLocal( - VecMath::createVector3D(EarthCenteredEarthFixedPosition))); + return FITwinVecMath::createVector(this->_coordinateSystem.ecefPositionToLocal( + FITwinVecMath::createVector3D(EarthCenteredEarthFixedPosition))); } FVector AITwinCesiumGeoreference::TransformUnrealPositionToEarthCenteredEarthFixed( const FVector& UnrealPosition) const { - return VecMath::createVector(this->_coordinateSystem.localPositionToEcef( - VecMath::createVector3D(UnrealPosition))); + return FITwinVecMath::createVector(this->_coordinateSystem.localPositionToEcef( + FITwinVecMath::createVector3D(UnrealPosition))); } FVector AITwinCesiumGeoreference::TransformEarthCenteredEarthFixedDirectionToUnreal( const FVector& EarthCenteredEarthFixedDirection) const { - return VecMath::createVector(this->_coordinateSystem.ecefDirectionToLocal( - VecMath::createVector3D(EarthCenteredEarthFixedDirection))); + return FITwinVecMath::createVector(this->_coordinateSystem.ecefDirectionToLocal( + FITwinVecMath::createVector3D(EarthCenteredEarthFixedDirection))); } FVector AITwinCesiumGeoreference::TransformUnrealDirectionToEarthCenteredEarthFixed( const FVector& UnrealDirection) const { - return VecMath::createVector(this->_coordinateSystem.localDirectionToEcef( - VecMath::createVector3D(UnrealDirection))); + return FITwinVecMath::createVector(this->_coordinateSystem.localDirectionToEcef( + FITwinVecMath::createVector3D(UnrealDirection))); } FRotator AITwinCesiumGeoreference::TransformUnrealRotatorToEastSouthUp( @@ -327,14 +327,14 @@ FRotator AITwinCesiumGeoreference::TransformEastSouthUpRotatorToUnreal( FMatrix AITwinCesiumGeoreference::ComputeUnrealToEarthCenteredEarthFixedTransformation() const { - return VecMath::createMatrix( + return FITwinVecMath::createMatrix( this->_coordinateSystem.getLocalToEcefTransformation()); } FMatrix AITwinCesiumGeoreference::ComputeEarthCenteredEarthFixedToUnrealTransformation() const { - return VecMath::createMatrix( + return FITwinVecMath::createMatrix( this->_coordinateSystem.getEcefToLocalTransformation()); } @@ -352,7 +352,7 @@ FMatrix AITwinCesiumGeoreference:: const FVector& EarthCenteredEarthFixedPosition) const { LocalHorizontalCoordinateSystem newLocal = createCoordinateSystem(EarthCenteredEarthFixedPosition, this->GetScale()); - return VecMath::createMatrix( + return FITwinVecMath::createMatrix( newLocal.computeTransformationToAnotherLocal(this->_coordinateSystem)); } @@ -546,7 +546,7 @@ void AITwinCesiumGeoreference::BeginPlay() { UWorld* pWorld = this->GetWorld(); if (!pWorld) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("CesiumGeoreference does not have a World in BeginPlay.")); return; @@ -561,7 +561,7 @@ void AITwinCesiumGeoreference::OnConstruction(const FTransform& Transform) { Super::OnConstruction(Transform); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Called OnConstruction on actor %s"), *this->GetName()); @@ -601,7 +601,7 @@ void AITwinCesiumGeoreference::PostLoad() { if (!SubLevelActor) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("An explicit SubLevelCamera was specified on this " "CesiumGeoreference, but its ViewTarget is not a valid " @@ -627,7 +627,7 @@ void AITwinCesiumGeoreference::PostLoad() { if (!SubLevelActor) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Could not find a Pawn in the level set to auto-possess player " @@ -658,7 +658,7 @@ void AITwinCesiumGeoreference::PostLoad() { SubLevelActor->AddInstanceComponent(OriginShift); UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Added CesiumOriginShiftComponent to %s in order to preserve " "backward compatibility for sub-level switching."), @@ -704,7 +704,7 @@ void AITwinCesiumGeoreference::_createSubLevelsFromWorldComposition() { // This happens for the georeference that is shown in the // content browser. Might omit this message. UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT( "Georeference is not spawned in world: %s, skipping _updateCesiumSubLevels"), @@ -800,7 +800,7 @@ void AITwinCesiumGeoreference::_createSubLevelsFromWorldComposition() { this->CesiumSubLevels_DEPRECATED.Empty(); UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cesium sub-levels based on World Composition have been converted to Level Instances. Save the level to keep these changes. We recommend disabling World Composition in the World Settings, as it is now obsolete.")); @@ -860,7 +860,7 @@ void AITwinCesiumGeoreference::UpdateGeoreference() { } UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Broadcasting OnGeoreferenceUpdated for Georeference %s"), *this->GetFullName()); @@ -880,7 +880,7 @@ FName AITwinCesiumGeoreference::DEFAULT_GEOREFERENCE_TAG = FName("DEFAULT_GEOREFERENCE"); void AITwinCesiumGeoreference::_updateCoordinateSystem() { - if (this->OriginPlacement == EOriginPlacement::CartographicOrigin) { + if (this->OriginPlacement == EITwinOriginPlacement::CartographicOrigin) { FVector origin = this->GetOriginLongitudeLatitudeHeight(); this->_coordinateSystem = createCoordinateSystem( this->GetOriginEarthCenteredEarthFixed(), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGlobeAnchorComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGlobeAnchorComponent.cpp index 2f660b3..caf61e2 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGlobeAnchorComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGlobeAnchorComponent.cpp @@ -50,7 +50,7 @@ namespace { CesiumGeospatial::GlobeAnchor createNativeGlobeAnchor(const FMatrix& actorToECEF) { - return CesiumGeospatial::GlobeAnchor(VecMath::createMatrix4D(actorToECEF)); + return CesiumGeospatial::GlobeAnchor(FITwinVecMath::createMatrix4D(actorToECEF)); } } // namespace @@ -90,7 +90,7 @@ UITwinCesiumGlobeAnchorComponent::GetEarthCenteredEarthFixedPosition() const { // log when editing a CDO. if (this->GetWorld()) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumGlobeAnchorComponent %s globe position is invalid because the component is not yet registered."), @@ -165,7 +165,7 @@ void UITwinCesiumGlobeAnchorComponent::MoveToEarthCenteredEarthFixedPosition( void UITwinCesiumGlobeAnchorComponent::SnapLocalUpToEllipsoidNormal() { if (!this->_actorToECEFIsValid || !IsValid(this->ResolvedGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "CesiumGlobeAnchorComponent %s globe orientation cannot be changed because the component is not yet registered."), @@ -312,7 +312,7 @@ FQuat UITwinCesiumGlobeAnchorComponent::GetEastSouthUpRotation() const { // log when editing a CDO. if (this->GetWorld()) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot get the rotation from CesiumGlobeAnchorComponent %s because the component is not yet registered or does not have a valid CesiumGeoreference."), @@ -322,7 +322,7 @@ FQuat UITwinCesiumGlobeAnchorComponent::GetEastSouthUpRotation() const { } CesiumGeospatial::GlobeAnchor anchor( - VecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); + FITwinVecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); CesiumGeospatial::LocalHorizontalCoordinateSystem eastSouthUp = createEastSouthUp(anchor); @@ -335,14 +335,14 @@ FQuat UITwinCesiumGlobeAnchorComponent::GetEastSouthUpRotation() const { nullptr, &rotationToEastSouthUp, nullptr); - return VecMath::createQuaternion(rotationToEastSouthUp); + return FITwinVecMath::createQuaternion(rotationToEastSouthUp); } void UITwinCesiumGlobeAnchorComponent::SetEastSouthUpRotation( const FQuat& EastSouthUpRotation) { if (!this->_actorToECEFIsValid) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot set the rotation on CesiumGlobeAnchorComponent %s because the component is not yet registered or does not have a valid CesiumGeoreference."), @@ -351,7 +351,7 @@ void UITwinCesiumGlobeAnchorComponent::SetEastSouthUpRotation( } CesiumGeospatial::GlobeAnchor anchor( - VecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); + FITwinVecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); CesiumGeospatial::LocalHorizontalCoordinateSystem eastSouthUp = createEastSouthUp(anchor); @@ -369,7 +369,7 @@ void UITwinCesiumGlobeAnchorComponent::SetEastSouthUpRotation( glm::dmat4 newModelToEastSouthUp = CesiumGeometry::Transforms::createTranslationRotationScaleMatrix( translation, - VecMath::createQuaternion(EastSouthUpRotation), + FITwinVecMath::createQuaternion(EastSouthUpRotation), scale); anchor.setAnchorToLocalTransform(eastSouthUp, newModelToEastSouthUp, false); @@ -382,7 +382,7 @@ FQuat UITwinCesiumGlobeAnchorComponent::GetEarthCenteredEarthFixedRotation() con // log when editing a CDO. if (this->GetWorld()) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot get the rotation from CesiumGlobeAnchorComponent %s because the component is not yet registered or does not have a valid CesiumGeoreference."), @@ -393,18 +393,18 @@ FQuat UITwinCesiumGlobeAnchorComponent::GetEarthCenteredEarthFixedRotation() con glm::dquat rotationToEarthCenteredEarthFixed; CesiumGeometry::Transforms::computeTranslationRotationScaleFromMatrix( - VecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix), + FITwinVecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix), nullptr, &rotationToEarthCenteredEarthFixed, nullptr); - return VecMath::createQuaternion(rotationToEarthCenteredEarthFixed); + return FITwinVecMath::createQuaternion(rotationToEarthCenteredEarthFixed); } void UITwinCesiumGlobeAnchorComponent::SetEarthCenteredEarthFixedRotation( const FQuat& EarthCenteredEarthFixedRotation) { if (!this->_actorToECEFIsValid) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot set the rotation on CesiumGlobeAnchorComponent %s because the component is not yet registered or does not have a valid CesiumGeoreference."), @@ -415,7 +415,7 @@ void UITwinCesiumGlobeAnchorComponent::SetEarthCenteredEarthFixedRotation( glm::dvec3 translation; glm::dvec3 scale; CesiumGeometry::Transforms::computeTranslationRotationScaleFromMatrix( - VecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix), + FITwinVecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix), &translation, nullptr, &scale); @@ -423,11 +423,11 @@ void UITwinCesiumGlobeAnchorComponent::SetEarthCenteredEarthFixedRotation( glm::dmat4 newModelToEarthCenteredEarthFixed = CesiumGeometry::Transforms::createTranslationRotationScaleMatrix( translation, - VecMath::createQuaternion(EarthCenteredEarthFixedRotation), + FITwinVecMath::createQuaternion(EarthCenteredEarthFixedRotation), scale); this->ActorToEarthCenteredEarthFixedMatrix = - VecMath::createMatrix(newModelToEarthCenteredEarthFixed); + FITwinVecMath::createMatrix(newModelToEarthCenteredEarthFixed); } void UITwinCesiumGlobeAnchorComponent::Serialize(FArchive& Ar) { @@ -501,7 +501,7 @@ void UITwinCesiumGlobeAnchorComponent::OnRegister() { const AActor* pOwner = this->GetOwner(); if (!IsValid(pOwner)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("CesiumGlobeAnchorComponent %s does not have a valid owner"), *this->GetName()); @@ -531,7 +531,7 @@ void UITwinCesiumGlobeAnchorComponent::OnUnregister() { const AActor* pOwner = this->GetOwner(); if (!IsValid(pOwner)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("CesiumGlobeAnchorComponent %s does not have a valid owner"), *this->GetName()); @@ -555,7 +555,7 @@ UITwinCesiumGlobeAnchorComponent::_getRootComponent(bool warnIfNull) const { if (!IsValid(pOwner)) { if (warnIfNull) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("UITwinCesiumGlobeAnchorComponent %s does not have a valid owner."), *this->GetName()); @@ -567,7 +567,7 @@ UITwinCesiumGlobeAnchorComponent::_getRootComponent(bool warnIfNull) const { if (!IsValid(pOwnerRoot)) { if (warnIfNull) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "The owner of UITwinCesiumGlobeAnchorComponent %s does not have a valid root component."), @@ -589,7 +589,7 @@ void UITwinCesiumGlobeAnchorComponent::_setCurrentRelativeTransform( AActor* pOwner = this->GetOwner(); if (!IsValid(pOwner)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("UITwinCesiumGlobeAnchorComponent %s does not have a valid owner"), *this->GetName()); @@ -599,7 +599,7 @@ void UITwinCesiumGlobeAnchorComponent::_setCurrentRelativeTransform( USceneComponent* pOwnerRoot = pOwner->GetRootComponent(); if (!IsValid(pOwnerRoot)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "The owner of UITwinCesiumGlobeAnchorComponent %s does not have a valid root component"), @@ -632,7 +632,7 @@ CesiumGeospatial::GlobeAnchor UITwinCesiumGlobeAnchorComponent:: pGeoreference->GetCoordinateSystem(); glm::dmat4 newModelToLocal = - VecMath::createMatrix4D(newRelativeTransform.ToMatrixWithScale()); + FITwinVecMath::createMatrix4D(newRelativeTransform.ToMatrixWithScale()); if (!this->_actorToECEFIsValid) { // Create a new anchor initialized at the new position, because there is no @@ -658,13 +658,13 @@ UITwinCesiumGlobeAnchorComponent::_createOrUpdateNativeGlobeAnchorFromECEF( // Create a new anchor initialized at the new position, because there is no // old one. return CesiumGeospatial::GlobeAnchor( - VecMath::createMatrix4D(newActorToECEFMatrix)); + FITwinVecMath::createMatrix4D(newActorToECEFMatrix)); } else { // Create an anchor at the old position and move it to the new one. CesiumGeospatial::GlobeAnchor cppAnchor( - VecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); + FITwinVecMath::createMatrix4D(this->ActorToEarthCenteredEarthFixedMatrix)); cppAnchor.setAnchorToFixedTransform( - VecMath::createMatrix4D(newActorToECEFMatrix), + FITwinVecMath::createMatrix4D(newActorToECEFMatrix), this->AdjustOrientationForGlobeWhenMoving); return cppAnchor; } @@ -673,7 +673,7 @@ UITwinCesiumGlobeAnchorComponent::_createOrUpdateNativeGlobeAnchorFromECEF( void UITwinCesiumGlobeAnchorComponent::_updateFromNativeGlobeAnchor( const CesiumGeospatial::GlobeAnchor& nativeAnchor) { this->ActorToEarthCenteredEarthFixedMatrix = - VecMath::createMatrix(nativeAnchor.getAnchorToFixedTransform()); + FITwinVecMath::createMatrix(nativeAnchor.getAnchorToFixedTransform()); this->_actorToECEFIsValid = true; // Update the Unreal relative transform @@ -683,7 +683,7 @@ void UITwinCesiumGlobeAnchorComponent::_updateFromNativeGlobeAnchor( pGeoreference->GetCoordinateSystem()); this->_setCurrentRelativeTransform( - FTransform(VecMath::createMatrix(anchorToLocal))); + FTransform(FITwinVecMath::createMatrix(anchorToLocal))); } else { this->_lastRelativeTransformIsValid = false; } @@ -707,7 +707,7 @@ void UITwinCesiumGlobeAnchorComponent::_setNewActorToECEFFromRelativeTransform() AITwinCesiumGeoreference* pGeoreference = this->ResolveGeoreference(); if (!IsValid(pGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "CesiumGlobeAnchorComponent %s cannot update globe transform from actor transform because there is no valid Georeference."), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.cpp index 31b72bb..96f0dc2 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.cpp @@ -66,7 +66,7 @@ #endif using namespace CesiumGltf; -using namespace CesiumTextureUtility; +using namespace ITwinCesiumTextureUtility; using namespace CreateGltfOptions; using namespace LoadGltfResult; @@ -80,9 +80,9 @@ static uint32_t nextMaterialId = 0; namespace { void destroyHalfLoadedTexture( - TUniquePtr& pHalfLoadedTexture) { + TUniquePtr& pHalfLoadedTexture) { if (pHalfLoadedTexture) { - CesiumTextureUtility::destroyHalfLoadedTexture(*pHalfLoadedTexture.Get()); + ITwinCesiumTextureUtility::destroyHalfLoadedTexture(*pHalfLoadedTexture.Get()); } } class HalfConstructedReal : public UITwinCesiumGltfComponent::HalfConstructed { @@ -109,6 +109,17 @@ class HalfConstructedReal : public UITwinCesiumGltfComponent::HalfConstructed { }; } // namespace +namespace ITwinCesium { + uint32_t updateTextureCoordinates( + const Model& model, + const MeshPrimitive& primitive, + bool duplicateVertices, + TArray& vertices, + const TArray& indices, + const std::string& attributeName, + std::unordered_map& gltfToUnrealTexCoordMap); +} + template struct IsAccessorView; template struct IsAccessorView : std::false_type {}; @@ -128,7 +139,7 @@ static uint32_t updateTextureCoordinates( return 0; } - return updateTextureCoordinates( + return ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -138,6 +149,8 @@ static uint32_t updateTextureCoordinates( gltfToUnrealTexCoordMap); } +namespace ITwinCesium { + uint32_t updateTextureCoordinates( const Model& model, const MeshPrimitive& primitive, @@ -191,6 +204,8 @@ uint32_t updateTextureCoordinates( return textureCoordinateIndex; } +} // ITwinCesium + static int mikkGetNumFaces(const SMikkTSpaceContext* Context) { TArray& vertices = *reinterpret_cast*>(Context->m_pUserData); @@ -409,7 +424,7 @@ struct ColorVisitor { }; template -static TUniquePtr loadTexture( +static TUniquePtr loadTexture( CesiumGltf::Model& model, const std::optional& gltfTexture, bool sRGB) { @@ -417,7 +432,7 @@ static TUniquePtr loadTexture( gltfTexture.value().index >= model.textures.size()) { if (gltfTexture && gltfTexture.value().index >= 0) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Texture index must be less than %d, but is %d"), model.textures.size(), @@ -526,7 +541,7 @@ static void createTexCoordAccessorsForFeaturesMetadata( auto featureIdTextures = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( primitiveFeatures, - ECesiumFeatureIdSetType::Texture); + EITwinCesiumFeatureIdSetType::Texture); for (const FITwinCesiumFeatureIdSet& featureIdSet : featureIdTextures) { FITwinCesiumFeatureIdTexture featureIdTexture = @@ -594,11 +609,11 @@ static void updateTextureCoordinatesForFeaturesMetadata( TArray& vertices, const TArray& indices, const FITwinCesiumPrimitiveFeatures& primitiveFeatures, - const CesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures& + const ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures& encodedPrimitiveFeatures, - const CesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata& + const ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata& encodedPrimitiveMetadata, - const CesiumEncodedFeaturesMetadata::EncodedModelMetadata& + const ITwinCesiumEncodedFeaturesMetadata::EncodedModelMetadata& encodedModelMetadata, TMap& featuresMetadataTexcoordParameters, std::unordered_map& gltfToUnrealTexCoordMap, @@ -612,22 +627,22 @@ static void updateTextureCoordinatesForFeaturesMetadata( // Property textures can be made accessible in Unreal materials without // requiring a texture coordinate set on the primitive. If it is not present // in primitive metadata, then do not set the parameter. - const CesiumEncodedFeaturesMetadata::EncodedPropertyTexture& + const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTexture& encodedPropertyTexture = encodedModelMetadata.propertyTextures[propertyTextureIndex]; - for (const CesiumEncodedFeaturesMetadata::EncodedPropertyTextureProperty& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTextureProperty& encodedProperty : encodedPropertyTexture.properties) { - FString fullPropertyName = CesiumEncodedFeaturesMetadata:: + FString fullPropertyName = ITwinCesiumEncodedFeaturesMetadata:: getMaterialNameForPropertyTextureProperty( encodedPropertyTexture.name, encodedProperty.name); featuresMetadataTexcoordParameters.Emplace( fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialTexCoordIndexSuffix, - updateTextureCoordinates( + ITwinCesiumEncodedFeaturesMetadata::MaterialTexCoordIndexSuffix, + ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -648,9 +663,9 @@ static void updateTextureCoordinatesForFeaturesMetadata( UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSets( primitiveFeatures); - for (const CesiumEncodedFeaturesMetadata::EncodedFeatureIdSet& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedFeatureIdSet& encodedFeatureIDSet : encodedPrimitiveFeatures.featureIdSets) { - FString SafeName = CesiumEncodedFeaturesMetadata::createHlslSafeName( + FString SafeName = ITwinCesiumEncodedFeaturesMetadata::createHlslSafeName( encodedFeatureIDSet.name); if (encodedFeatureIDSet.attribute) { int32_t attribute = *encodedFeatureIDSet.attribute; @@ -709,11 +724,11 @@ static void updateTextureCoordinatesForFeaturesMetadata( } bHasBakedMetaDataInUVs = true; } else if (encodedFeatureIDSet.texture) { - const CesiumEncodedFeaturesMetadata::EncodedFeatureIdTexture& + const ITwinCesiumEncodedFeaturesMetadata::EncodedFeatureIdTexture& encodedFeatureIDTexture = *encodedFeatureIDSet.texture; featuresMetadataTexcoordParameters.Emplace( - SafeName + CesiumEncodedFeaturesMetadata::MaterialTexCoordIndexSuffix, - updateTextureCoordinates( + SafeName + ITwinCesiumEncodedFeaturesMetadata::MaterialTexCoordIndexSuffix, + ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -758,8 +773,8 @@ static void updateTextureCoordinatesForMetadata_DEPRECATED( bool duplicateVertices, TArray& vertices, const TArray& indices, - const CesiumEncodedMetadataUtility::EncodedMetadata& encodedMetadata, - const CesiumEncodedMetadataUtility::EncodedMetadataPrimitive& + const ITwinCesiumEncodedMetadataUtility::EncodedMetadata& encodedMetadata, + const ITwinCesiumEncodedMetadataUtility::EncodedMetadataPrimitive& encodedPrimitiveMetadata, const TArray& featureIdAttributes, TMap& metadataTextureCoordinateParameters, @@ -768,12 +783,12 @@ static void updateTextureCoordinatesForMetadata_DEPRECATED( TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::UpdateTextureCoordinatesForMetadata) - for (const CesiumEncodedMetadataUtility::EncodedFeatureIdTexture& + for (const ITwinCesiumEncodedMetadataUtility::EncodedFeatureIdTexture& encodedFeatureIdTexture : encodedPrimitiveMetadata.encodedFeatureIdTextures) { metadataTextureCoordinateParameters.Emplace( encodedFeatureIdTexture.baseName + "UV", - updateTextureCoordinates( + ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -787,15 +802,15 @@ static void updateTextureCoordinatesForMetadata_DEPRECATED( for (const FString& featureTextureName : encodedPrimitiveMetadata.featureTextureNames) { - const CesiumEncodedMetadataUtility::EncodedFeatureTexture* + const ITwinCesiumEncodedMetadataUtility::EncodedFeatureTexture* pEncodedFeatureTexture = encodedMetadata.encodedFeatureTextures.Find(featureTextureName); if (pEncodedFeatureTexture) { - for (const CesiumEncodedMetadataUtility::EncodedFeatureTextureProperty& + for (const ITwinCesiumEncodedMetadataUtility::EncodedFeatureTextureProperty& encodedProperty : pEncodedFeatureTexture->properties) { metadataTextureCoordinateParameters.Emplace( encodedProperty.baseName + "UV", - updateTextureCoordinates( + ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -812,7 +827,7 @@ static void updateTextureCoordinatesForMetadata_DEPRECATED( primitive.getExtension(); if (pFeatures) { - for (const CesiumEncodedMetadataUtility::EncodedFeatureIdAttribute& + for (const ITwinCesiumEncodedMetadataUtility::EncodedFeatureIdAttribute& encodedFeatureIdAttribute : encodedPrimitiveMetadata.encodedFeatureIdAttributes) { const FITwinCesiumFeatureIdAttribute& featureIdAttribute = @@ -952,7 +967,7 @@ static void loadPrimitive( primitive.mode != MeshPrimitive::Mode::POINTS) { // TODO: add support for other primitive types. UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("Primitive mode %d is not supported"), primitive.mode); @@ -991,7 +1006,7 @@ static void loadPrimitive( if (positionView.status() != AccessorViewStatus::Valid) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("%s: Invalid position buffer"), UTF8_TO_TCHAR(name.c_str())); @@ -1001,7 +1016,7 @@ static void loadPrimitive( if constexpr (IsAccessorView::value) { if (indicesView.status() != AccessorViewStatus::Valid) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("%s: Invalid indices buffer"), UTF8_TO_TCHAR(name.c_str())); @@ -1021,7 +1036,7 @@ static void loadPrimitive( hasNormals = normalAccessor.status() == AccessorViewStatus::Valid; if (!hasNormals) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "%s: Invalid normal buffer. Flat normals will be auto-generated instead."), @@ -1076,7 +1091,7 @@ static void loadPrimitive( hasTangents = tangentAccessor.status() == AccessorViewStatus::Valid; if (!hasTangents) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("%s: Invalid tangent buffer."), UTF8_TO_TCHAR(name.c_str())); @@ -1302,7 +1317,7 @@ static void loadPrimitive( auto overlayIt = primitive.attributes.find(attributeName); if (overlayIt != primitive.attributes.end()) { primitiveResult.overlayTextureCoordinateIDToUVIndex[i] = - updateTextureCoordinates( + ITwinCesium::updateTextureCoordinates( model, primitive, duplicateVertices, @@ -1343,17 +1358,17 @@ static void loadPrimitive( bool bHasBakedMetaDataInUVs = false; // Check for deprecated metadata description - const FMetadataDescription* pMetadataDescription_DEPRECATED = + const FITwinMetadataDescription* pMetadataDescription_DEPRECATED = pModelOptions->pEncodedMetadataDescription_DEPRECATED; if (pFeaturesMetadataDescription) { primitiveResult.EncodedFeatures = - CesiumEncodedFeaturesMetadata::encodePrimitiveFeaturesAnyThreadPart( + ITwinCesiumEncodedFeaturesMetadata::encodePrimitiveFeaturesAnyThreadPart( pFeaturesMetadataDescription->Features, primitiveResult.Features); primitiveResult.EncodedMetadata = - CesiumEncodedFeaturesMetadata::encodePrimitiveMetadataAnyThreadPart( + ITwinCesiumEncodedFeaturesMetadata::encodePrimitiveMetadataAnyThreadPart( pFeaturesMetadataDescription->PrimitiveMetadata, primitiveResult.Metadata, pModelResult->Metadata); @@ -1373,7 +1388,7 @@ static void loadPrimitive( bHasBakedMetaDataInUVs); } else if (pMetadataDescription_DEPRECATED) { primitiveResult.EncodedMetadata_DEPRECATED = - CesiumEncodedMetadataUtility::encodeMetadataPrimitiveAnyThreadPart( + ITwinCesiumEncodedMetadataUtility::encodeMetadataPrimitiveAnyThreadPart( *pMetadataDescription_DEPRECATED, primitiveResult.Metadata_DEPRECATED); @@ -1426,8 +1441,8 @@ static void loadPrimitive( if (primitiveResult.isUnlit) { glm::dvec3 ecefCenter = glm::dvec3( transform * - glm::dvec4(VecMath::createVector3D(RenderData->Bounds.Origin), 1.0)); - TMeshVector3 upDir = TMeshVector3(VecMath::createVector( + glm::dvec4(FITwinVecMath::createVector3D(RenderData->Bounds.Origin), 1.0)); + TMeshVector3 upDir = TMeshVector3(FITwinVecMath::createVector( glm::affineInverse(transform) * glm::dvec4( CesiumGeospatial::Ellipsoid::WGS84.geodeticSurfaceNormal( @@ -1644,7 +1659,7 @@ static void loadIndexedPrimitive( primitiveResult.IndexAccessor = indexAccessor; } else { UE_LOG( - LogCesium, + LogITwinCesium, VeryVerbose, TEXT( "Skip loading primitive due to invalid component type in its index accessor.")); @@ -1856,7 +1871,7 @@ void applyGltfUpAxisTransform(const Model& model, glm::dmat4x4& rootTransform) { // No transform required } else { UE_LOG( - LogCesium, + LogITwinCesium, VeryVerbose, TEXT("Unknown gltfUpAxis value: {}"), gltfUpAxisValue); @@ -1882,16 +1897,16 @@ static void loadModelAnyThreadPart( options.pFeaturesMetadataDescription; PRAGMA_DISABLE_DEPRECATION_WARNINGS - const FMetadataDescription* pMetadataDescription_DEPRECATED = + const FITwinMetadataDescription* pMetadataDescription_DEPRECATED = options.pEncodedMetadataDescription_DEPRECATED; if (pFeaturesMetadataDescription) { result.EncodedMetadata = - CesiumEncodedFeaturesMetadata::encodeModelMetadataAnyThreadPart( + ITwinCesiumEncodedFeaturesMetadata::encodeModelMetadataAnyThreadPart( pFeaturesMetadataDescription->ModelMetadata, result.Metadata); } else if (pMetadataDescription_DEPRECATED) { result.EncodedMetadata_DEPRECATED = - CesiumEncodedMetadataUtility::encodeMetadataAnyThreadPart( + ITwinCesiumEncodedMetadataUtility::encodeMetadataAnyThreadPart( *pMetadataDescription_DEPRECATED, result.Metadata); } @@ -1941,9 +1956,9 @@ bool applyTexture( const CesiumGltf::Model& model, UMaterialInstanceDynamic* pMaterial, const FMaterialParameterInfo& info, - CesiumTextureUtility::LoadedTextureResult* pLoadedTexture) { + ITwinCesiumTextureUtility::LoadedTextureResult* pLoadedTexture) { UTexture2D* pTexture = - CesiumTextureUtility::loadTextureGameThreadPart(model, pLoadedTexture); + ITwinCesiumTextureUtility::loadTextureGameThreadPart(model, pLoadedTexture); if (!pTexture) { return false; } @@ -2171,6 +2186,7 @@ static void SetGltfParameterValues( } } +namespace ITwinCesium { void SetWaterParameterValues( const CesiumGltf::Model& model, LoadPrimitiveResult& loadResult, @@ -2199,22 +2215,24 @@ void SetWaterParameterValues( loadResult.waterMaskTranslationY, loadResult.waterMaskScale)); } +} // ITwinCesium + static void SetPropertyParameterValue( const FString& name, - ECesiumEncodedMetadataType type, + EITwinCesiumEncodedMetadataType type, const FITwinCesiumMetadataValue& value, const float defaultValue, UMaterialInstanceDynamic* pMaterial, EMaterialParameterAssociation association, int32 index) { - if (type == ECesiumEncodedMetadataType::Scalar) { + if (type == EITwinCesiumEncodedMetadataType::Scalar) { pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo(FName(name), association, index), UITwinCesiumMetadataValueBlueprintLibrary::GetFloat(value, defaultValue)); } else if ( - type == ECesiumEncodedMetadataType::Vec2 || - type == ECesiumEncodedMetadataType::Vec3 || - type == ECesiumEncodedMetadataType::Vec4) { + type == EITwinCesiumEncodedMetadataType::Vec2 || + type == EITwinCesiumEncodedMetadataType::Vec3 || + type == EITwinCesiumEncodedMetadataType::Vec4) { FVector4 vector4Value = UITwinCesiumMetadataValueBlueprintLibrary::GetVector4( value, FVector4(defaultValue, defaultValue, defaultValue, defaultValue)); @@ -2230,15 +2248,15 @@ static void SetPropertyParameterValue( } static void SetPropertyTableParameterValues( - const CesiumEncodedFeaturesMetadata::EncodedPropertyTable& + const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTable& encodedPropertyTable, UMaterialInstanceDynamic* pMaterial, EMaterialParameterAssociation association, int32 index) { - for (const CesiumEncodedFeaturesMetadata::EncodedPropertyTableProperty& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTableProperty& encodedProperty : encodedPropertyTable.properties) { FString fullPropertyName = - CesiumEncodedFeaturesMetadata::getMaterialNameForPropertyTableProperty( + ITwinCesiumEncodedFeaturesMetadata::getMaterialNameForPropertyTableProperty( encodedPropertyTable.name, encodedProperty.name); @@ -2252,7 +2270,7 @@ static void SetPropertyTableParameterValues( encodedProperty.offset)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyOffsetSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyOffsetSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2266,7 +2284,7 @@ static void SetPropertyTableParameterValues( if (!UITwinCesiumMetadataValueBlueprintLibrary::IsEmpty(encodedProperty.scale)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyScaleSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyScaleSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2281,7 +2299,7 @@ static void SetPropertyTableParameterValues( encodedProperty.noData)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyNoDataSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyNoDataSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2296,7 +2314,7 @@ static void SetPropertyTableParameterValues( encodedProperty.defaultValue)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyDefaultValueSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyDefaultValueSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2307,7 +2325,7 @@ static void SetPropertyTableParameterValues( index); FString hasValueName = fullPropertyName = - CesiumEncodedFeaturesMetadata::MaterialPropertyHasValueSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyHasValueSuffix; pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo(FName(hasValueName), association, index), encodedProperty.pTexture ? 1.0 : 0.0); @@ -2316,14 +2334,14 @@ static void SetPropertyTableParameterValues( } static void SetPropertyTextureParameterValues( - const CesiumEncodedFeaturesMetadata::EncodedPropertyTexture& + const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTexture& encodedPropertyTexture, UMaterialInstanceDynamic* pMaterial, EMaterialParameterAssociation association, int32 index) { - for (const CesiumEncodedFeaturesMetadata::EncodedPropertyTextureProperty& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTextureProperty& encodedProperty : encodedPropertyTexture.properties) { - FString fullPropertyName = CesiumEncodedFeaturesMetadata:: + FString fullPropertyName = ITwinCesiumEncodedFeaturesMetadata:: getMaterialNameForPropertyTextureProperty( encodedPropertyTexture.name, encodedProperty.name); @@ -2338,7 +2356,7 @@ static void SetPropertyTextureParameterValues( FMaterialParameterInfo( FName( fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialChannelsSuffix), + ITwinCesiumEncodedFeaturesMetadata::MaterialChannelsSuffix), association, index), FLinearColor( @@ -2351,7 +2369,7 @@ static void SetPropertyTextureParameterValues( encodedProperty.offset)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyOffsetSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyOffsetSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2365,7 +2383,7 @@ static void SetPropertyTextureParameterValues( if (!UITwinCesiumMetadataValueBlueprintLibrary::IsEmpty(encodedProperty.scale)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyScaleSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyScaleSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2380,7 +2398,7 @@ static void SetPropertyTextureParameterValues( encodedProperty.noData)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyNoDataSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyNoDataSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2395,7 +2413,7 @@ static void SetPropertyTextureParameterValues( encodedProperty.defaultValue)) { FString parameterName = fullPropertyName + - CesiumEncodedFeaturesMetadata::MaterialPropertyDefaultValueSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyDefaultValueSuffix; SetPropertyParameterValue( parameterName, encodedProperty.type, @@ -2406,7 +2424,7 @@ static void SetPropertyTextureParameterValues( index); FString hasValueName = fullPropertyName = - CesiumEncodedFeaturesMetadata::MaterialPropertyHasValueSuffix; + ITwinCesiumEncodedFeaturesMetadata::MaterialPropertyHasValueSuffix; pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo(FName(hasValueName), association, index), encodedProperty.pTexture ? 1.0 : 0.0); @@ -2434,16 +2452,16 @@ static void SetFeaturesMetadataParameterValues( } if (encodePrimitiveFeaturesGameThreadPart(loadResult.EncodedFeatures)) { - for (CesiumEncodedFeaturesMetadata::EncodedFeatureIdSet& + for (ITwinCesiumEncodedFeaturesMetadata::EncodedFeatureIdSet& encodedFeatureIdSet : loadResult.EncodedFeatures.featureIdSets) { - FString SafeName = CesiumEncodedFeaturesMetadata::createHlslSafeName( + FString SafeName = ITwinCesiumEncodedFeaturesMetadata::createHlslSafeName( encodedFeatureIdSet.name); if (encodedFeatureIdSet.nullFeatureId) { pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo( FName( SafeName + - CesiumEncodedFeaturesMetadata::MaterialNullFeatureIdSuffix), + ITwinCesiumEncodedFeaturesMetadata::MaterialNullFeatureIdSuffix), association, index), static_cast(*encodedFeatureIdSet.nullFeatureId)); @@ -2453,14 +2471,14 @@ static void SetFeaturesMetadataParameterValues( continue; } - CesiumEncodedFeaturesMetadata::EncodedFeatureIdTexture& texture = + ITwinCesiumEncodedFeaturesMetadata::EncodedFeatureIdTexture& texture = *encodedFeatureIdSet.texture; pMaterial->SetTextureParameterValueByInfo( FMaterialParameterInfo( FName( SafeName + - CesiumEncodedFeaturesMetadata::MaterialTextureSuffix), + ITwinCesiumEncodedFeaturesMetadata::MaterialTextureSuffix), association, index), texture.pTexture->pTexture.Get()); @@ -2470,7 +2488,7 @@ static void SetFeaturesMetadataParameterValues( FMaterialParameterInfo( FName( SafeName + - CesiumEncodedFeaturesMetadata::MaterialNumChannelsSuffix), + ITwinCesiumEncodedFeaturesMetadata::MaterialNumChannelsSuffix), association, index), static_cast(numChannels)); @@ -2485,14 +2503,14 @@ static void SetFeaturesMetadataParameterValues( FMaterialParameterInfo( FName( SafeName + - CesiumEncodedFeaturesMetadata::MaterialChannelsSuffix), + ITwinCesiumEncodedFeaturesMetadata::MaterialChannelsSuffix), association, index), channels); } } - for (const CesiumEncodedFeaturesMetadata::EncodedPropertyTexture& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTexture& propertyTexture : gltfComponent.EncodedMetadata.propertyTextures) { SetPropertyTextureParameterValues( propertyTexture, @@ -2501,7 +2519,7 @@ static void SetFeaturesMetadataParameterValues( index); } - for (const CesiumEncodedFeaturesMetadata::EncodedPropertyTable& + for (const ITwinCesiumEncodedFeaturesMetadata::EncodedPropertyTable& propertyTable : gltfComponent.EncodedMetadata.propertyTables) { SetPropertyTableParameterValues( propertyTable, @@ -2512,12 +2530,12 @@ static void SetFeaturesMetadataParameterValues( } static void SetMetadataFeatureTableParameterValues_DEPRECATED( - const CesiumEncodedMetadataUtility::EncodedMetadataFeatureTable& + const ITwinCesiumEncodedMetadataUtility::EncodedMetadataFeatureTable& encodedFeatureTable, UMaterialInstanceDynamic* pMaterial, EMaterialParameterAssociation association, int32 index) { - for (const CesiumEncodedMetadataUtility::EncodedMetadataProperty& + for (const ITwinCesiumEncodedMetadataUtility::EncodedMetadataProperty& encodedProperty : encodedFeatureTable.encodedProperties) { pMaterial->SetTextureParameterValueByInfo( @@ -2577,13 +2595,13 @@ static void SetMetadataParameterValues_DEPRECATED( for (const FString& featureTextureName : loadResult.EncodedMetadata_DEPRECATED->featureTextureNames) { - CesiumEncodedMetadataUtility::EncodedFeatureTexture* + ITwinCesiumEncodedMetadataUtility::EncodedFeatureTexture* pEncodedFeatureTexture = gltfComponent.EncodedMetadata_DEPRECATED->encodedFeatureTextures .Find(featureTextureName); if (pEncodedFeatureTexture) { - for (CesiumEncodedMetadataUtility::EncodedFeatureTextureProperty& + for (ITwinCesiumEncodedMetadataUtility::EncodedFeatureTextureProperty& encodedProperty : pEncodedFeatureTexture->properties) { pMaterial->SetTextureParameterValueByInfo( @@ -2607,7 +2625,7 @@ static void SetMetadataParameterValues_DEPRECATED( } } - for (CesiumEncodedMetadataUtility::EncodedFeatureIdTexture& + for (ITwinCesiumEncodedMetadataUtility::EncodedFeatureIdTexture& encodedFeatureIdTexture : loadResult.EncodedMetadata_DEPRECATED->encodedFeatureIdTextures) { @@ -2637,7 +2655,7 @@ static void SetMetadataParameterValues_DEPRECATED( index), channelMask); - const CesiumEncodedMetadataUtility::EncodedMetadataFeatureTable* + const ITwinCesiumEncodedMetadataUtility::EncodedMetadataFeatureTable* pEncodedFeatureTable = gltfComponent.EncodedMetadata_DEPRECATED->encodedFeatureTables.Find( encodedFeatureIdTexture.featureTableName); @@ -2651,10 +2669,10 @@ static void SetMetadataParameterValues_DEPRECATED( } } - for (const CesiumEncodedMetadataUtility::EncodedFeatureIdAttribute& + for (const ITwinCesiumEncodedMetadataUtility::EncodedFeatureIdAttribute& encodedFeatureIdAttribute : loadResult.EncodedMetadata_DEPRECATED->encodedFeatureIdAttributes) { - const CesiumEncodedMetadataUtility::EncodedMetadataFeatureTable* + const ITwinCesiumEncodedMetadataUtility::EncodedMetadataFeatureTable* pEncodedFeatureTable = gltfComponent.EncodedMetadata_DEPRECATED->encodedFeatureTables.Find( encodedFeatureIdAttribute.featureTableName); @@ -2784,7 +2802,7 @@ static void loadPrimitiveGameThreadPart( pMaterial, EMaterialParameterAssociation::GlobalParameter, INDEX_NONE); - SetWaterParameterValues( + ITwinCesium::SetWaterParameterValues( model, loadResult, pMaterial, @@ -2852,7 +2870,7 @@ static void loadPrimitiveGameThreadPart( // If there's a "Water" layer, set its parameters int32 waterIndex = pCesiumData->LayerNames.Find("Water"); if (waterIndex >= 0) { - SetWaterParameterValues( + ITwinCesium::SetWaterParameterValues( model, loadResult, pMaterial, @@ -2947,7 +2965,7 @@ static void loadPrimitiveGameThreadPart( if (loadResult.MeshBuildCallbacks.IsValid()) { loadResult.MeshBuildCallbacks.Pin()->OnMeshConstructed( - tile.getTileID(), + tile, pMesh, pMaterial, { @@ -3072,7 +3090,7 @@ UITwinCesiumGltfComponent::UITwinCesiumGltfComponent() : USceneComponent() { } UITwinCesiumGltfComponent::~UITwinCesiumGltfComponent() { - UE_LOG(LogCesium, VeryVerbose, TEXT("~UITwinCesiumGltfComponent")); + UE_LOG(LogITwinCesium, VeryVerbose, TEXT("~UITwinCesiumGltfComponent")); } void UITwinCesiumGltfComponent::UpdateTransformFromCesium( @@ -3238,12 +3256,12 @@ void UITwinCesiumGltfComponent::SetCollisionEnabled( } void UITwinCesiumGltfComponent::BeginDestroy() { - CesiumEncodedFeaturesMetadata::destroyEncodedModelMetadata( + ITwinCesiumEncodedFeaturesMetadata::destroyEncodedModelMetadata( this->EncodedMetadata); PRAGMA_DISABLE_DEPRECATION_WARNINGS if (this->EncodedMetadata_DEPRECATED) { - CesiumEncodedMetadataUtility::destroyEncodedMetadata( + ITwinCesiumEncodedMetadataUtility::destroyEncodedMetadata( *this->EncodedMetadata_DEPRECATED); this->EncodedMetadata_DEPRECATED = std::nullopt; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.h index 309c3cb..f98079f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfComponent.h @@ -41,7 +41,7 @@ struct Rectangle; } USTRUCT() -struct FRasterOverlayTile { +struct FITwinRasterOverlayTile { GENERATED_BODY() UPROPERTY() @@ -96,10 +96,10 @@ class UITwinCesiumGltfComponent : public USceneComponent { FITwinCustomDepthParameters CustomDepthParameters{}; FITwinCesiumModelMetadata Metadata{}; - CesiumEncodedFeaturesMetadata::EncodedModelMetadata EncodedMetadata{}; + ITwinCesiumEncodedFeaturesMetadata::EncodedModelMetadata EncodedMetadata{}; PRAGMA_DISABLE_DEPRECATION_WARNINGS - std::optional + std::optional EncodedMetadata_DEPRECATED = std::nullopt; PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.cpp index d2bfc57..e5c554b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.cpp @@ -31,7 +31,7 @@ UITwinCesiumGltfPrimitiveComponent::~UITwinCesiumGltfPrimitiveComponent() {} void UITwinCesiumGltfPrimitiveComponent::UpdateTransformFromCesium( const glm::dmat4& CesiumToUnrealTransform) { - const FTransform transform = FTransform(VecMath::createMatrix( + const FTransform transform = FTransform(FITwinVecMath::createMatrix( CesiumToUnrealTransform * this->HighPrecisionNodeTransform)); if (this->Mobility == EComponentMobility::Movable) { @@ -69,7 +69,7 @@ void destroyMaterialTexture( FMaterialParameterInfo(name, assocation, index), pTexture, true)) { - CesiumTextureUtility::destroyTexture(pTexture); + ITwinCesiumTextureUtility::destroyTexture(pTexture); } } @@ -135,18 +135,18 @@ void UITwinCesiumGltfPrimitiveComponent::BeginDestroy() { } } - CesiumEncodedFeaturesMetadata::destroyEncodedPrimitiveFeatures( + ITwinCesiumEncodedFeaturesMetadata::destroyEncodedPrimitiveFeatures( this->EncodedFeatures); PRAGMA_DISABLE_DEPRECATION_WARNINGS if (this->EncodedMetadata_DEPRECATED) { - CesiumEncodedMetadataUtility::destroyEncodedMetadataPrimitive( + ITwinCesiumEncodedMetadataUtility::destroyEncodedMetadataPrimitive( *this->EncodedMetadata_DEPRECATED); this->EncodedMetadata_DEPRECATED = std::nullopt; } PRAGMA_ENABLE_DEPRECATION_WARNINGS - CesiumLifetime::destroy(pMaterial); + FITwinCesiumLifetime::destroy(pMaterial); } UStaticMesh* pMesh = this->GetStaticMesh(); @@ -154,10 +154,10 @@ void UITwinCesiumGltfPrimitiveComponent::BeginDestroy() { UBodySetup* pBodySetup = pMesh->GetBodySetup(); if (pBodySetup) { - CesiumLifetime::destroy(pBodySetup); + FITwinCesiumLifetime::destroy(pBodySetup); } - CesiumLifetime::destroy(pMesh); + FITwinCesiumLifetime::destroy(pMesh); } Super::BeginDestroy(); @@ -170,6 +170,6 @@ FBoxSphereBounds UITwinCesiumGltfPrimitiveComponent::CalcBounds( } return std::visit( - CalcBoundsOperation{LocalToWorld, this->HighPrecisionNodeTransform}, + FITwinCalcBoundsOperation{LocalToWorld, this->HighPrecisionNodeTransform}, *this->boundingVolume); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.h index 954b5ef..a6f54db 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumGltfPrimitiveComponent.h @@ -43,12 +43,12 @@ class UITwinCesiumGltfPrimitiveComponent : public UStaticMeshComponent { /** * The encoded representation of the primitive's EXT_mesh_features extension. */ - CesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures EncodedFeatures; + ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures EncodedFeatures; /** * The encoded representation of the primitive's EXT_structural_metadata * extension. */ - CesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata EncodedMetadata; + ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata EncodedMetadata; PRAGMA_DISABLE_DEPRECATION_WARNINGS /** @@ -56,7 +56,7 @@ class UITwinCesiumGltfPrimitiveComponent : public UStaticMeshComponent { */ FITwinCesiumMetadataPrimitive Metadata_DEPRECATED; - std::optional + std::optional EncodedMetadata_DEPRECATED; PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonRasterOverlay.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonRasterOverlay.cpp index 15b27fd..144b8b7 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonRasterOverlay.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonRasterOverlay.cpp @@ -57,8 +57,8 @@ UITwinCesiumIonRasterOverlay::CreateOverlay( void UITwinCesiumIonRasterOverlay::PostLoad() { Super::PostLoad(); - if (CesiumActors::shouldValidateFlags(this)) - CesiumActors::validateActorComponentFlags(this); + if (ITwinCesiumActors::shouldValidateFlags(this)) + ITwinCesiumActors::validateActorComponentFlags(this); #if WITH_EDITOR const int32 CesiumVersion = diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonServer.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonServer.cpp index 4f749ee..11b2ce7 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonServer.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumIonServer.cpp @@ -149,7 +149,7 @@ UITwinCesiumIonServer::GetBackwardCompatibleServer(const FString& apiUrl) { CesiumAsync::Future UITwinCesiumIonServer::ResolveApiUrl() { if (!this->ApiUrl.IsEmpty()) - return getAsyncSystem().createResolvedFuture(); + return ITwinCesium::getAsyncSystem().createResolvedFuture(); if (this->ServerUrl.IsEmpty()) { // We don't even have a server URL, so use the SaaS defaults. @@ -157,14 +157,14 @@ CesiumAsync::Future UITwinCesiumIonServer::ResolveApiUrl() { this->ApiUrl = TEXT("https://api.cesium.com/"); this->Modify(); UEditorLoadingAndSavingUtils::SavePackages({this->GetPackage()}, true); - return getAsyncSystem().createResolvedFuture(); + return ITwinCesium::getAsyncSystem().createResolvedFuture(); } TObjectPtr pServer = this; return CesiumIonClient::Connection::getApiUrl( - getAsyncSystem(), - getAssetAccessor(), + ITwinCesium::getAsyncSystem(), + ITwinCesium::getAssetAccessor(), TCHAR_TO_UTF8(*this->ServerUrl)) .thenInMainThread([pServer](std::optional&& apiUrl) { if (pServer && pServer->ApiUrl.IsEmpty()) { diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.cpp index eaae7ff..3f83c7f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.cpp @@ -16,17 +16,17 @@ #include /*static*/ -AmortizedDestructor CesiumLifetime::amortizedDestructor = AmortizedDestructor(); +FITwinAmortizedDestructor FITwinCesiumLifetime::amortizedDestructor = FITwinAmortizedDestructor(); -/*static*/ void CesiumLifetime::destroy(UObject* pObject) { +/*static*/ void FITwinCesiumLifetime::destroy(UObject* pObject) { amortizedDestructor.destroy(pObject); } /*static*/ void -CesiumLifetime::destroyComponentRecursively(USceneComponent* pComponent) { +FITwinCesiumLifetime::destroyComponentRecursively(USceneComponent* pComponent) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::DestroyComponent) UE_LOG( - LogCesium, + LogITwinCesium, VeryVerbose, TEXT("Destroying scene component recursively")); @@ -56,28 +56,28 @@ CesiumLifetime::destroyComponentRecursively(USceneComponent* pComponent) { pComponent->DestroyComponent(); pComponent->ConditionalBeginDestroy(); - UE_LOG(LogCesium, VeryVerbose, TEXT("Destroying scene component done")); + UE_LOG(LogITwinCesium, VeryVerbose, TEXT("Destroying scene component done")); } -void AmortizedDestructor::Tick(float DeltaTime) { processPending(); } +void FITwinAmortizedDestructor::Tick(float DeltaTime) { processPending(); } -ETickableTickType AmortizedDestructor::GetTickableTickType() const { +ETickableTickType FITwinAmortizedDestructor::GetTickableTickType() const { return ETickableTickType::Always; } -bool AmortizedDestructor::IsTickableWhenPaused() const { return true; } +bool FITwinAmortizedDestructor::IsTickableWhenPaused() const { return true; } -bool AmortizedDestructor::IsTickableInEditor() const { return true; } +bool FITwinAmortizedDestructor::IsTickableInEditor() const { return true; } -TStatId AmortizedDestructor::GetStatId() const { return TStatId(); } +TStatId FITwinAmortizedDestructor::GetStatId() const { return TStatId(); } -void AmortizedDestructor::destroy(UObject* pObject) { +void FITwinAmortizedDestructor::destroy(UObject* pObject) { if (!runDestruction(pObject)) { addToPending(pObject); } } -bool AmortizedDestructor::runDestruction(UObject* pObject) const { +bool FITwinAmortizedDestructor::runDestruction(UObject* pObject) const { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::RunDestruction) if (!pObject) { @@ -108,11 +108,11 @@ bool AmortizedDestructor::runDestruction(UObject* pObject) const { return false; } -void AmortizedDestructor::addToPending(UObject* pObject) { +void FITwinAmortizedDestructor::addToPending(UObject* pObject) { _pending.Add(pObject); } -void AmortizedDestructor::processPending() { +void FITwinAmortizedDestructor::processPending() { std::swap(_nextPending, _pending); _pending.Empty(); @@ -121,7 +121,7 @@ void AmortizedDestructor::processPending() { } } -void AmortizedDestructor::finalizeDestroy(UObject* pObject) const { +void FITwinAmortizedDestructor::finalizeDestroy(UObject* pObject) const { // The freeing/clearing/destroying done here is normally done in these // objects' FinishDestroy method, but unfortunately we can't call that // directly without confusing the garbage collector if and when it _does_ diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.h index 0246248..4d6dabb 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumLifetime.h @@ -10,7 +10,7 @@ class UObject; class UTexture; -class AmortizedDestructor : FTickableGameObject { +class FITwinAmortizedDestructor : FTickableGameObject { public: void Tick(float DeltaTime) override; ETickableTickType GetTickableTickType() const override; @@ -29,11 +29,11 @@ class AmortizedDestructor : FTickableGameObject { TArray> _nextPending; }; -class CesiumLifetime { +class FITwinCesiumLifetime { public: static void destroy(UObject* pObject); static void destroyComponentRecursively(USceneComponent* pComponent); private: - static AmortizedDestructor amortizedDestructor; + static FITwinAmortizedDestructor amortizedDestructor; }; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPickingBlueprintLibrary.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPickingBlueprintLibrary.cpp index 919b4d0..228abf7 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPickingBlueprintLibrary.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPickingBlueprintLibrary.cpp @@ -256,9 +256,9 @@ UITwinCesiumMetadataPickingBlueprintLibrary::FindValidProperty( UITwinCesiumPropertyTableBlueprintLibrary::FindProperty( propertyTables[propertyTableIndex], PropertyName); - const ECesiumPropertyTablePropertyStatus status = + const EITwinCesiumPropertyTablePropertyStatus status = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertyTablePropertyStatus(propWithName); - if (status != ECesiumPropertyTablePropertyStatus::Valid) { + if (status != EITwinCesiumPropertyTablePropertyStatus::Valid) { return nullptr; } return &propWithName; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPrimitive.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPrimitive.cpp index 9b04833..ee7eee8 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPrimitive.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataPrimitive.cpp @@ -25,7 +25,7 @@ UITwinCesiumMetadataPrimitiveBlueprintLibrary::GetFeatureIdAttributes( const TArray featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( *MetadataPrimitive._pPrimitiveFeatures, - ECesiumFeatureIdSetType::Attribute); + EITwinCesiumFeatureIdSetType::Attribute); featureIDAttributes.Reserve(featureIDSets.Num()); for (const FITwinCesiumFeatureIdSet& featureIDSet : featureIDSets) { @@ -48,7 +48,7 @@ UITwinCesiumMetadataPrimitiveBlueprintLibrary::GetFeatureIdTextures( const TArray featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( *MetadataPrimitive._pPrimitiveFeatures, - ECesiumFeatureIdSetType::Texture); + EITwinCesiumFeatureIdSetType::Texture); featureIDTextures.Reserve(featureIDSets.Num()); for (const FITwinCesiumFeatureIdSet& featureIDSet : featureIDSets) { diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataUtilityBlueprintLibrary.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataUtilityBlueprintLibrary.cpp index 6e4fb31..9aeab2a 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataUtilityBlueprintLibrary.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataUtilityBlueprintLibrary.cpp @@ -41,7 +41,7 @@ UITwinCesiumMetadataUtilityBlueprintLibrary::GetMetadataValuesForFace( const TArray& featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( features, - ECesiumFeatureIdSetType::Attribute); + EITwinCesiumFeatureIdSetType::Attribute); if (featureIDSets.Num() == 0) { return TMap(); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataValue.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataValue.cpp index e29ccf8..2abd3c1 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataValue.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumMetadataValue.cpp @@ -8,17 +8,17 @@ using namespace CesiumGltf; -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumMetadataValueBlueprintLibrary::GetBlueprintType( UPARAM(ref) const FITwinCesiumMetadataValue& Value) { return CesiumMetadataValueTypeToBlueprintType(Value._valueType); } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumMetadataValueBlueprintLibrary::GetArrayElementBlueprintType( UPARAM(ref) const FITwinCesiumMetadataValue& Value) { if (!Value._valueType.bIsArray) { - return ECesiumMetadataBlueprintType::None; + return EITwinCesiumMetadataBlueprintType::None; } FITwinCesiumMetadataValueType types(Value._valueType); @@ -34,13 +34,13 @@ FITwinCesiumMetadataValueType UITwinCesiumMetadataValueBlueprintLibrary::GetValu PRAGMA_DISABLE_DEPRECATION_WARNINGS -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED UITwinCesiumMetadataValueBlueprintLibrary::GetTrueType( UPARAM(ref) const FITwinCesiumMetadataValue& Value) { return CesiumMetadataValueTypeToTrueType(Value._valueType); } -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED UITwinCesiumMetadataValueBlueprintLibrary::GetTrueComponentType( UPARAM(ref) const FITwinCesiumMetadataValue& Value) { FITwinCesiumMetadataValueType type = Value._valueType; @@ -144,11 +144,11 @@ FIntPoint UITwinCesiumMetadataValueBlueprintLibrary::GetIntPoint( return std::visit( [&DefaultValue](auto value) -> FIntPoint { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toIntPoint(value, DefaultValue); + return FITwinUnrealMetadataConversions::toIntPoint(value, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toIntPoint(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toIntPoint(*maybeVec2) : DefaultValue; } }, @@ -161,11 +161,11 @@ FVector2D UITwinCesiumMetadataValueBlueprintLibrary::GetVector2D( return std::visit( [&DefaultValue](auto value) -> FVector2D { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toVector2D(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector2D(value, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toVector2D(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toVector2D(*maybeVec2) : DefaultValue; } }, @@ -178,11 +178,11 @@ FIntVector UITwinCesiumMetadataValueBlueprintLibrary::GetIntVector( return std::visit( [&DefaultValue](auto value) -> FIntVector { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toIntVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toIntVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toIntVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toIntVector(*maybeVec3) : DefaultValue; } }, @@ -195,11 +195,11 @@ FVector3f UITwinCesiumMetadataValueBlueprintLibrary::GetVector3f( return std::visit( [&DefaultValue](auto value) -> FVector3f { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toVector3f(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector3f(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toVector3f(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toVector3f(*maybeVec3) : DefaultValue; } }, @@ -212,11 +212,11 @@ FVector UITwinCesiumMetadataValueBlueprintLibrary::GetVector( return std::visit( [&DefaultValue](auto value) -> FVector { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toVector(*maybeVec3) : DefaultValue; } }, @@ -229,11 +229,11 @@ FVector4 UITwinCesiumMetadataValueBlueprintLibrary::GetVector4( return std::visit( [&DefaultValue](auto value) -> FVector4 { if constexpr (CesiumGltf::IsMetadataString::value) { - return UnrealMetadataConversions::toVector4(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector4(value, DefaultValue); } else { auto maybeVec4 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec4 ? UnrealMetadataConversions::toVector4(*maybeVec4) + return maybeVec4 ? FITwinUnrealMetadataConversions::toVector4(*maybeVec4) : DefaultValue; } }, @@ -250,7 +250,7 @@ FMatrix UITwinCesiumMetadataValueBlueprintLibrary::GetMatrix( }, Value._value); - return maybeMat4 ? UnrealMetadataConversions::toMatrix(*maybeMat4) + return maybeMat4 ? FITwinUnrealMetadataConversions::toMatrix(*maybeMat4) : DefaultValue; } @@ -264,12 +264,12 @@ FString UITwinCesiumMetadataValueBlueprintLibrary::GetString( IsMetadataVecN::value || IsMetadataMatN::value || IsMetadataString::value) { - return UnrealMetadataConversions::toString(value); + return FITwinUnrealMetadataConversions::toString(value); } else { auto maybeString = CesiumGltf:: MetadataConversions::convert(value); - return maybeString ? UnrealMetadataConversions::toString(*maybeString) + return maybeString ? FITwinUnrealMetadataConversions::toString(*maybeString) : DefaultValue; } }, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumOriginShiftComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumOriginShiftComponent.cpp index 1395efd..6a43203 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumOriginShiftComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumOriginShiftComponent.cpp @@ -12,11 +12,11 @@ #include "Editor.h" #endif -ECesiumOriginShiftMode UITwinCesiumOriginShiftComponent::GetMode() const { +EITwinCesiumOriginShiftMode UITwinCesiumOriginShiftComponent::GetMode() const { return this->Mode; } -void UITwinCesiumOriginShiftComponent::SetMode(ECesiumOriginShiftMode NewMode) { +void UITwinCesiumOriginShiftComponent::SetMode(EITwinCesiumOriginShiftMode NewMode) { this->Mode = NewMode; } @@ -64,7 +64,7 @@ void UITwinCesiumOriginShiftComponent::TickComponent( if (TickType != ELevelTick::LEVELTICK_All) return; - if (!this->IsActive() || this->Mode == ECesiumOriginShiftMode::Disabled) + if (!this->IsActive() || this->Mode == EITwinCesiumOriginShiftMode::Disabled) return; UITwinCesiumGlobeAnchorComponent* GlobeAnchor = this->GetGlobeAnchor(); @@ -87,7 +87,7 @@ void UITwinCesiumOriginShiftComponent::TickComponent( // If we don't have any known sub-levels, and aren't origin shifting outside // of sub-levels, then bail quickly to save ourselves a little work. if (Sublevels.IsEmpty() && - this->Mode == ECesiumOriginShiftMode::SwitchSubLevelsOnly) { + this->Mode == EITwinCesiumOriginShiftMode::SwitchSubLevelsOnly) { return; } @@ -130,7 +130,7 @@ void UITwinCesiumOriginShiftComponent::TickComponent( bool doOriginShift = Switcher->GetTargetSubLevel() == nullptr && Switcher->GetCurrentSubLevel() == nullptr && - this->Mode != ECesiumOriginShiftMode::SwitchSubLevelsOnly; + this->Mode != EITwinCesiumOriginShiftMode::SwitchSubLevelsOnly; if (doOriginShift) { // We're between sub-levels, but we also only want to shift the origin when @@ -142,10 +142,10 @@ void UITwinCesiumOriginShiftComponent::TickComponent( } if (doOriginShift) { - if (this->Mode == ECesiumOriginShiftMode::ChangeCesiumGeoreference) { + if (this->Mode == EITwinCesiumOriginShiftMode::ChangeCesiumGeoreference) { Georeference->SetOriginEarthCenteredEarthFixed(ActorEcef); } else { - check(false && "Missing ECesiumOriginShiftMode implementation.") + check(false && "Missing EITwinCesiumOriginShiftMode implementation.") } } } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPrimitiveFeatures.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPrimitiveFeatures.cpp index 966d63e..e00daf6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPrimitiveFeatures.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPrimitiveFeatures.cpp @@ -49,7 +49,7 @@ UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSets( const TArray UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( UPARAM(ref) const FITwinCesiumPrimitiveFeatures& PrimitiveFeatures, - ECesiumFeatureIdSetType Type) { + EITwinCesiumFeatureIdSetType Type) { TArray featureIdSets; for (int32 i = 0; i < PrimitiveFeatures._featureIdSets.Num(); i++) { const FITwinCesiumFeatureIdSet& featureIdSet = diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyArrayBlueprintLibrary.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyArrayBlueprintLibrary.cpp index 132199a..ca88e79 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyArrayBlueprintLibrary.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyArrayBlueprintLibrary.cpp @@ -4,13 +4,13 @@ #include "ITwinUnrealMetadataConversions.h" #include -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyArrayBlueprintLibrary::GetElementBlueprintType( UPARAM(ref) const FITwinCesiumPropertyArray& array) { return CesiumMetadataValueTypeToBlueprintType(array._elementType); } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyArrayBlueprintLibrary::GetBlueprintComponentType( UPARAM(ref) const FITwinCesiumPropertyArray& array) { return CesiumMetadataValueTypeToBlueprintType(array._elementType); @@ -53,7 +53,7 @@ FITwinCesiumMetadataValue UITwinCesiumPropertyArrayBlueprintLibrary::GetValue( array._value); } -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED UITwinCesiumPropertyArrayBlueprintLibrary::GetTrueComponentType( UPARAM(ref) const FITwinCesiumPropertyArray& array) { return CesiumMetadataValueTypeToTrueType(array._elementType); @@ -173,7 +173,7 @@ FString UITwinCesiumPropertyArrayBlueprintLibrary::GetString( if (!maybeString) { return defaultValue; } - return UnrealMetadataConversions::toString(*maybeString); + return FITwinUnrealMetadataConversions::toString(*maybeString); }, array._value); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTable.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTable.cpp index d62ff6a..596d3ae 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTable.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTable.cpp @@ -10,7 +10,7 @@ static FITwinCesiumPropertyTableProperty EmptyPropertyTableProperty; FITwinCesiumPropertyTable::FITwinCesiumPropertyTable( const Model& Model, const PropertyTable& PropertyTable) - : _status(ECesiumPropertyTableStatus::ErrorInvalidPropertyTableClass), + : _status(EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTableClass), _name(PropertyTable.name.value_or("").c_str()), _className(PropertyTable.classProperty.c_str()), _count(PropertyTable.count), @@ -18,7 +18,7 @@ FITwinCesiumPropertyTable::FITwinCesiumPropertyTable( PropertyTableView propertyTableView{Model, PropertyTable}; switch (propertyTableView.status()) { case PropertyTableViewStatus::Valid: - _status = ECesiumPropertyTableStatus::Valid; + _status = EITwinCesiumPropertyTableStatus::Valid; break; default: // Status was already set in initializer list. @@ -33,7 +33,7 @@ FITwinCesiumPropertyTable::FITwinCesiumPropertyTable( }); } -/*static*/ ECesiumPropertyTableStatus +/*static*/ EITwinCesiumPropertyTableStatus UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( UPARAM(ref) const FITwinCesiumPropertyTable& PropertyTable) { return PropertyTable._status; @@ -47,7 +47,7 @@ UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableName( /*static*/ int64 UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( UPARAM(ref) const FITwinCesiumPropertyTable& PropertyTable) { - if (PropertyTable._status != ECesiumPropertyTableStatus::Valid) { + if (PropertyTable._status != EITwinCesiumPropertyTableStatus::Valid) { return 0; } @@ -88,10 +88,10 @@ UITwinCesiumPropertyTableBlueprintLibrary::GetMetadataValuesForFeature( for (const auto& pair : PropertyTable._properties) { const FITwinCesiumPropertyTableProperty& property = pair.Value; - ECesiumPropertyTablePropertyStatus status = + EITwinCesiumPropertyTablePropertyStatus status = UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property); - if (status == ECesiumPropertyTablePropertyStatus::Valid) { + if (status == EITwinCesiumPropertyTablePropertyStatus::Valid) { values.Add( pair.Key, UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetValue( @@ -99,7 +99,7 @@ UITwinCesiumPropertyTableBlueprintLibrary::GetMetadataValuesForFeature( FeatureID)); } else if ( status == - ECesiumPropertyTablePropertyStatus::EmptyPropertyWithDefault) { + EITwinCesiumPropertyTablePropertyStatus::EmptyPropertyWithDefault) { values.Add( pair.Key, UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetDefaultValue( @@ -121,10 +121,10 @@ UITwinCesiumPropertyTableBlueprintLibrary::GetMetadataValuesForFeatureAsStrings( for (const auto& pair : PropertyTable._properties) { const FITwinCesiumPropertyTableProperty& property = pair.Value; - ECesiumPropertyTablePropertyStatus status = + EITwinCesiumPropertyTablePropertyStatus status = UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property); - if (status == ECesiumPropertyTablePropertyStatus::Valid) { + if (status == EITwinCesiumPropertyTablePropertyStatus::Valid) { values.Add( pair.Key, UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetString( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTableProperty.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTableProperty.cpp index e7e7f54..5d5f9da 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTableProperty.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTableProperty.cpp @@ -58,57 +58,57 @@ TResult scalarPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback( property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< uint8_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< int16_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< uint16_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< int32_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< uint32_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< int64_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< uint64_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback( property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback( property, std::forward(callback)); @@ -137,61 +137,61 @@ TResult scalarArrayPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback< PropertyArrayView, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback< PropertyArrayView, false, @@ -222,61 +222,61 @@ TResult vecNPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback< glm::vec, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback< glm::vec, false, @@ -305,21 +305,21 @@ TResult vecNPropertyTablePropertyCallback( const std::any& property, const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { - if (valueType.Type == ECesiumMetadataType::Vec2) { + if (valueType.Type == EITwinCesiumMetadataType::Vec2) { return vecNPropertyTablePropertyCallback<2, Normalized, TResult, Callback>( property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec3) { + if (valueType.Type == EITwinCesiumMetadataType::Vec3) { return vecNPropertyTablePropertyCallback<3, Normalized, TResult, Callback>( property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec4) { + if (valueType.Type == EITwinCesiumMetadataType::Vec4) { return vecNPropertyTablePropertyCallback<4, Normalized, TResult, Callback>( property, valueType, @@ -350,61 +350,61 @@ TResult vecNArrayPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback< PropertyArrayView>, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback< PropertyArrayView>, false, @@ -434,7 +434,7 @@ TResult vecNArrayPropertyTablePropertyCallback( const std::any& property, const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { - if (valueType.Type == ECesiumMetadataType::Vec2) { + if (valueType.Type == EITwinCesiumMetadataType::Vec2) { return vecNArrayPropertyTablePropertyCallback< 2, Normalized, @@ -442,7 +442,7 @@ TResult vecNArrayPropertyTablePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec3) { + if (valueType.Type == EITwinCesiumMetadataType::Vec3) { return vecNArrayPropertyTablePropertyCallback< 3, Normalized, @@ -450,7 +450,7 @@ TResult vecNArrayPropertyTablePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec4) { + if (valueType.Type == EITwinCesiumMetadataType::Vec4) { return vecNArrayPropertyTablePropertyCallback< 4, Normalized, @@ -481,61 +481,61 @@ TResult matNPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< glm::mat, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback< glm::mat, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback< glm::mat, false, @@ -564,21 +564,21 @@ TResult matNPropertyTablePropertyCallback( const std::any& property, const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { - if (valueType.Type == ECesiumMetadataType::Mat2) { + if (valueType.Type == EITwinCesiumMetadataType::Mat2) { return matNPropertyTablePropertyCallback<2, Normalized, TResult, Callback>( property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Mat3) { + if (valueType.Type == EITwinCesiumMetadataType::Mat3) { return matNPropertyTablePropertyCallback<3, Normalized, TResult, Callback>( property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Mat4) { + if (valueType.Type == EITwinCesiumMetadataType::Mat4) { return matNPropertyTablePropertyCallback<4, Normalized, TResult, Callback>( property, valueType, @@ -609,61 +609,61 @@ TResult matNArrayPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int64: + case EITwinCesiumMetadataComponentType::Int64: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint64: return propertyTablePropertyCallback< PropertyArrayView>, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTablePropertyCallback< PropertyArrayView>, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float64: + case EITwinCesiumMetadataComponentType::Float64: return propertyTablePropertyCallback< PropertyArrayView>, false, @@ -693,7 +693,7 @@ TResult matNArrayPropertyTablePropertyCallback( const std::any& property, const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { - if (valueType.Type == ECesiumMetadataType::Mat2) { + if (valueType.Type == EITwinCesiumMetadataType::Mat2) { return matNArrayPropertyTablePropertyCallback< 2, Normalized, @@ -701,7 +701,7 @@ TResult matNArrayPropertyTablePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Mat3) { + if (valueType.Type == EITwinCesiumMetadataType::Mat3) { return matNArrayPropertyTablePropertyCallback< 3, Normalized, @@ -709,7 +709,7 @@ TResult matNArrayPropertyTablePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Mat4) { + if (valueType.Type == EITwinCesiumMetadataType::Mat4) { return matNArrayPropertyTablePropertyCallback< 4, Normalized, @@ -726,32 +726,32 @@ TResult arrayPropertyTablePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.Type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: return scalarArrayPropertyTablePropertyCallback< Normalized, TResult, Callback>(property, valueType, std::forward(callback)); - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: return vecNArrayPropertyTablePropertyCallback< Normalized, TResult, Callback>(property, valueType, std::forward(callback)); - case ECesiumMetadataType::Mat2: - case ECesiumMetadataType::Mat3: - case ECesiumMetadataType::Mat4: + case EITwinCesiumMetadataType::Mat2: + case EITwinCesiumMetadataType::Mat3: + case EITwinCesiumMetadataType::Mat4: return matNArrayPropertyTablePropertyCallback< Normalized, TResult, Callback>(property, valueType, std::forward(callback)); - case ECesiumMetadataType::Boolean: + case EITwinCesiumMetadataType::Boolean: return propertyTablePropertyCallback< PropertyArrayView, false, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataType::String: + case EITwinCesiumMetadataType::String: return propertyTablePropertyCallback< PropertyArrayView, false, @@ -781,7 +781,7 @@ TResult propertyTablePropertyCallback( } switch (valueType.Type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: return normalized ? scalarPropertyTablePropertyCallback( property, @@ -791,9 +791,9 @@ TResult propertyTablePropertyCallback( property, valueType, std::forward(callback)); - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: return normalized ? vecNPropertyTablePropertyCallback( property, @@ -803,9 +803,9 @@ TResult propertyTablePropertyCallback( property, valueType, std::forward(callback)); - case ECesiumMetadataType::Mat2: - case ECesiumMetadataType::Mat3: - case ECesiumMetadataType::Mat4: + case EITwinCesiumMetadataType::Mat2: + case EITwinCesiumMetadataType::Mat3: + case EITwinCesiumMetadataType::Mat4: return normalized ? matNPropertyTablePropertyCallback( property, @@ -815,11 +815,11 @@ TResult propertyTablePropertyCallback( property, valueType, std::forward(callback)); - case ECesiumMetadataType::Boolean: + case EITwinCesiumMetadataType::Boolean: return propertyTablePropertyCallback( property, std::forward(callback)); - case ECesiumMetadataType::String: + case EITwinCesiumMetadataType::String: return propertyTablePropertyCallback< std::string_view, false, @@ -832,23 +832,23 @@ TResult propertyTablePropertyCallback( } // namespace -ECesiumPropertyTablePropertyStatus +EITwinCesiumPropertyTablePropertyStatus UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertyTablePropertyStatus( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { return Property._status; } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { return CesiumMetadataValueTypeToBlueprintType(Property._valueType); } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetArrayElementBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { if (!Property._valueType.bIsArray) { - return ECesiumMetadataBlueprintType::None; + return EITwinCesiumMetadataBlueprintType::None; } FITwinCesiumMetadataValueType valueType(Property._valueType); @@ -1045,11 +1045,11 @@ FIntPoint UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetIntPoint( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toIntPoint(value, DefaultValue); + return FITwinUnrealMetadataConversions::toIntPoint(value, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toIntPoint(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toIntPoint(*maybeVec2) : DefaultValue; } }); @@ -1075,11 +1075,11 @@ FVector2D UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector2D( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector2D(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector2D(value, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toVector2D(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toVector2D(*maybeVec2) : DefaultValue; } }); @@ -1105,11 +1105,11 @@ FIntVector UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetIntVector( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toIntVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toIntVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toIntVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toIntVector(*maybeVec3) : DefaultValue; } }); @@ -1135,11 +1135,11 @@ FVector3f UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector3f( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector3f(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector3f(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toVector3f(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toVector3f(*maybeVec3) : DefaultValue; } }); @@ -1165,11 +1165,11 @@ FVector UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toVector(*maybeVec3) : DefaultValue; } }); @@ -1195,11 +1195,11 @@ FVector4 UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector4( auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector4(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector4(value, DefaultValue); } else { auto maybeVec4 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec4 ? UnrealMetadataConversions::toVector4(*maybeVec4) + return maybeVec4 ? FITwinUnrealMetadataConversions::toVector4(*maybeVec4) : DefaultValue; } }); @@ -1228,7 +1228,7 @@ FMatrix UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetMatrix( convert(value); }); - return maybeMat4 ? UnrealMetadataConversions::toMatrix(*maybeMat4) + return maybeMat4 ? FITwinUnrealMetadataConversions::toMatrix(*maybeMat4) : DefaultValue; } @@ -1257,12 +1257,12 @@ FString UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetString( IsMetadataVecN::value || IsMetadataMatN::value || IsMetadataString::value) { - return UnrealMetadataConversions::toString(value); + return FITwinUnrealMetadataConversions::toString(value); } else { auto maybeString = CesiumGltf:: MetadataConversions::convert(value); - return maybeString ? UnrealMetadataConversions::toString(*maybeString) + return maybeString ? FITwinUnrealMetadataConversions::toString(*maybeString) : DefaultValue; } }); @@ -1413,20 +1413,20 @@ UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetDefaultValue( PRAGMA_DISABLE_DEPRECATION_WARNINGS -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintComponentType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { return UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(Property); } -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetTrueType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { return CesiumMetadataValueTypeToTrueType(Property._valueType); } -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetTrueComponentType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property) { FITwinCesiumMetadataValueType type = Property._valueType; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTexture.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTexture.cpp index 017d4be..431731c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTexture.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTexture.cpp @@ -13,13 +13,13 @@ static FITwinCesiumPropertyTextureProperty EmptyPropertyTextureProperty; FITwinCesiumPropertyTexture::FITwinCesiumPropertyTexture( const CesiumGltf::Model& Model, const CesiumGltf::PropertyTexture& PropertyTexture) - : _status(ECesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass), + : _status(EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass), _name(PropertyTexture.name.value_or("").c_str()), _className(PropertyTexture.classProperty.c_str()) { PropertyTextureView propertyTextureView(Model, PropertyTexture); switch (propertyTextureView.status()) { case PropertyTextureViewStatus::Valid: - _status = ECesiumPropertyTextureStatus::Valid; + _status = EITwinCesiumPropertyTextureStatus::Valid; break; default: // Status was already set in initializer list. @@ -34,7 +34,7 @@ FITwinCesiumPropertyTexture::FITwinCesiumPropertyTexture( }); } -/*static*/ const ECesiumPropertyTextureStatus +/*static*/ const EITwinCesiumPropertyTextureStatus UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( UPARAM(ref) const FITwinCesiumPropertyTexture& PropertyTexture) { return PropertyTexture._status; @@ -77,10 +77,10 @@ UITwinCesiumPropertyTextureBlueprintLibrary::GetMetadataValuesForUV( for (const auto& propertyIt : PropertyTexture._properties) { const FITwinCesiumPropertyTextureProperty& property = propertyIt.Value; - ECesiumPropertyTexturePropertyStatus status = + EITwinCesiumPropertyTexturePropertyStatus status = UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property); - if (status == ECesiumPropertyTexturePropertyStatus::Valid) { + if (status == EITwinCesiumPropertyTexturePropertyStatus::Valid) { values.Add( propertyIt.Key, UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetValue( @@ -88,7 +88,7 @@ UITwinCesiumPropertyTextureBlueprintLibrary::GetMetadataValuesForUV( UV)); } else if ( status == - ECesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault) { + EITwinCesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault) { values.Add( propertyIt.Key, UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetDefaultValue( @@ -108,7 +108,7 @@ UITwinCesiumPropertyTextureBlueprintLibrary::GetMetadataValuesFromHit( for (const auto& propertyIt : PropertyTexture._properties) { if (UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(propertyIt.Value) == - ECesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault) { + EITwinCesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault) { values.Add( propertyIt.Key, UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetDefaultValue( @@ -118,7 +118,7 @@ UITwinCesiumPropertyTextureBlueprintLibrary::GetMetadataValuesFromHit( if (UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(propertyIt.Value) != - ECesiumPropertyTexturePropertyStatus::Valid) { + EITwinCesiumPropertyTexturePropertyStatus::Valid) { continue; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTextureProperty.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTextureProperty.cpp index e8d1cdb..85450a7 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTextureProperty.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumPropertyTextureProperty.cpp @@ -62,43 +62,43 @@ TResult scalarPropertyTexturePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTexturePropertyCallback< int8_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTexturePropertyCallback< uint8_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTexturePropertyCallback< int16_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTexturePropertyCallback< uint16_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int32: + case EITwinCesiumMetadataComponentType::Int32: return propertyTexturePropertyCallback< int32_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Uint32: return propertyTexturePropertyCallback< uint32_t, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Float32: + case EITwinCesiumMetadataComponentType::Float32: return propertyTexturePropertyCallback( property, std::forward(callback)); @@ -127,25 +127,25 @@ TResult scalarArrayPropertyTexturePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTexturePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTexturePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTexturePropertyCallback< PropertyArrayView, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTexturePropertyCallback< PropertyArrayView, Normalized, @@ -177,25 +177,25 @@ TResult vecNPropertyTexturePropertyCallback( const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { switch (valueType.ComponentType) { - case ECesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int8: return propertyTexturePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Uint8: return propertyTexturePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Int16: return propertyTexturePropertyCallback< glm::vec, Normalized, TResult, Callback>(property, std::forward(callback)); - case ECesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Uint16: return propertyTexturePropertyCallback< glm::vec, Normalized, @@ -225,7 +225,7 @@ TResult vecNPropertyTexturePropertyCallback( const std::any& property, const FITwinCesiumMetadataValueType& valueType, Callback&& callback) { - if (valueType.Type == ECesiumMetadataType::Vec2) { + if (valueType.Type == EITwinCesiumMetadataType::Vec2) { return vecNPropertyTexturePropertyCallback< 2, Normalized, @@ -233,7 +233,7 @@ TResult vecNPropertyTexturePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec3) { + if (valueType.Type == EITwinCesiumMetadataType::Vec3) { return vecNPropertyTexturePropertyCallback< 3, Normalized, @@ -241,7 +241,7 @@ TResult vecNPropertyTexturePropertyCallback( Callback>(property, valueType, std::forward(callback)); } - if (valueType.Type == ECesiumMetadataType::Vec4) { + if (valueType.Type == EITwinCesiumMetadataType::Vec4) { return vecNPropertyTexturePropertyCallback< 4, Normalized, @@ -259,7 +259,7 @@ TResult propertyTexturePropertyCallback( bool normalized, Callback&& callback) { - if (valueType.bIsArray && valueType.Type != ECesiumMetadataType::Scalar) { + if (valueType.bIsArray && valueType.Type != EITwinCesiumMetadataType::Scalar) { // Only scalar property arrays are supported. return callback(PropertyTexturePropertyView()); @@ -283,7 +283,7 @@ TResult propertyTexturePropertyCallback( } switch (valueType.Type) { - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: return normalized ? scalarPropertyTexturePropertyCallback( property, @@ -296,9 +296,9 @@ TResult propertyTexturePropertyCallback( property, valueType, std::forward(callback)); - case ECesiumMetadataType::Vec2: - case ECesiumMetadataType::Vec3: - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec4: return normalized ? vecNPropertyTexturePropertyCallback( property, @@ -344,24 +344,24 @@ FITwinCesiumPropertyTextureProperty::getImage() const { }); } -ECesiumPropertyTexturePropertyStatus +EITwinCesiumPropertyTexturePropertyStatus UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus( UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property) { return Property._status; } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property) { return CesiumMetadataValueTypeToBlueprintType(Property._valueType); } -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArrayElementBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property) { if (!Property._valueType.bIsArray) { - return ECesiumMetadataBlueprintType::None; + return EITwinCesiumMetadataBlueprintType::None; } FITwinCesiumMetadataValueType valueType(Property._valueType); @@ -564,13 +564,13 @@ FIntPoint UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetIntPoint( } auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toIntPoint( + return FITwinUnrealMetadataConversions::toIntPoint( *maybeValue, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toIntPoint(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toIntPoint(*maybeVec2) : DefaultValue; } }); @@ -594,11 +594,11 @@ FVector2D UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector2D( } auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector2D(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector2D(value, DefaultValue); } else { auto maybeVec2 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec2 ? UnrealMetadataConversions::toVector2D(*maybeVec2) + return maybeVec2 ? FITwinUnrealMetadataConversions::toVector2D(*maybeVec2) : DefaultValue; } }); @@ -622,11 +622,11 @@ FIntVector UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetIntVector( } auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toIntVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toIntVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toIntVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toIntVector(*maybeVec3) : DefaultValue; } }); @@ -650,11 +650,11 @@ FVector UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector( } auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector(value, DefaultValue); } else { auto maybeVec3 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec3 ? UnrealMetadataConversions::toVector(*maybeVec3) + return maybeVec3 ? FITwinUnrealMetadataConversions::toVector(*maybeVec3) : DefaultValue; } }); @@ -678,11 +678,11 @@ FVector4 UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector4( } auto value = *maybeValue; if constexpr (IsMetadataString::value) { - return UnrealMetadataConversions::toVector(value, DefaultValue); + return FITwinUnrealMetadataConversions::toVector(value, DefaultValue); } else { auto maybeVec4 = CesiumGltf:: MetadataConversions::convert(value); - return maybeVec4 ? UnrealMetadataConversions::toVector4(*maybeVec4) + return maybeVec4 ? FITwinUnrealMetadataConversions::toVector4(*maybeVec4) : DefaultValue; } }); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRasterOverlay.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRasterOverlay.cpp index c979fdb..ed3661f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRasterOverlay.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRasterOverlay.cpp @@ -54,13 +54,13 @@ void UITwinCesiumRasterOverlay::AddToTileset() { [this](const CesiumRasterOverlays::RasterOverlayLoadFailureDetails& details) { static_assert( - uint8_t(ECesiumRasterOverlayLoadType::CesiumIon) == + uint8_t(EITwinCesiumRasterOverlayLoadType::CesiumIon) == uint8_t(CesiumRasterOverlays::RasterOverlayLoadType::CesiumIon)); static_assert( - uint8_t(ECesiumRasterOverlayLoadType::TileProvider) == + uint8_t(EITwinCesiumRasterOverlayLoadType::TileProvider) == uint8_t(CesiumRasterOverlays::RasterOverlayLoadType::TileProvider)); static_assert( - uint8_t(ECesiumRasterOverlayLoadType::Unknown) == + uint8_t(EITwinCesiumRasterOverlayLoadType::Unknown) == uint8_t(CesiumRasterOverlays::RasterOverlayLoadType::Unknown)); uint8_t typeValue = uint8_t(details.type); @@ -72,7 +72,7 @@ void UITwinCesiumRasterOverlay::AddToTileset() { FITwinCesiumRasterOverlayLoadFailureDetails ueDetails{}; ueDetails.Overlay = this; - ueDetails.Type = ECesiumRasterOverlayLoadType(typeValue); + ueDetails.Type = EITwinCesiumRasterOverlayLoadType(typeValue); ueDetails.HttpStatusCode = details.pRequest && details.pRequest->response() ? details.pRequest->response()->statusCode() @@ -116,7 +116,7 @@ void UITwinCesiumRasterOverlay::RemoveFromTileset() { // operations in progress and have been fully destroyed. // See IsReadyForFinishDestroy. ++this->_overlaysBeingDestroyed; - this->_pOverlay->getAsyncDestructionCompleteEvent(getAsyncSystem()) + this->_pOverlay->getAsyncDestructionCompleteEvent(ITwinCesium::getAsyncSystem()) .thenInMainThread([this]() { --this->_overlaysBeingDestroyed; }); this->OnRemove(pTileset, this->_pOverlay); @@ -191,8 +191,8 @@ bool UITwinCesiumRasterOverlay::IsReadyForFinishDestroy() { ready &= this->_overlaysBeingDestroyed == 0; if (!ready) { - getAssetAccessor()->tick(); - getAsyncSystem().dispatchMainThreadTasks(); + ITwinCesium::getAssetAccessor()->tick(); + ITwinCesium::getAsyncSystem().dispatchMainThreadTasks(); } return ready; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRuntime.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRuntime.cpp index 93bf0aa..0fd7f7f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRuntime.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumRuntime.cpp @@ -26,13 +26,13 @@ #define LOCTEXT_NAMESPACE "FITwinCesiumRuntimeModule" -DEFINE_LOG_CATEGORY(LogCesium); +DEFINE_LOG_CATEGORY(LogITwinCesium); void FITwinCesiumRuntimeModule::StartupModule() { Cesium3DTilesContent::registerAllTileContentTypes(); std::shared_ptr pLogger = spdlog::default_logger(); - pLogger->sinks() = {std::make_shared()}; + pLogger->sinks() = {std::make_shared()}; FModuleManager::Get().LoadModuleChecked(TEXT("HTTP")); @@ -62,13 +62,13 @@ FITwinCesium3DTilesetIonTroubleshooting OnCesium3DTilesetIonTroubleshooting{}; FITwinCesiumRasterOverlayIonTroubleshooting OnCesiumRasterOverlayIonTroubleshooting{}; -CesiumAsync::AsyncSystem& getAsyncSystem() noexcept { +CesiumAsync::AsyncSystem& ITwinCesium::getAsyncSystem() noexcept { static CesiumAsync::AsyncSystem asyncSystem( std::make_shared()); return asyncSystem; } -namespace { +namespace ITwinCesium { std::string getCacheDatabaseName() { #if PLATFORM_ANDROID @@ -90,7 +90,7 @@ std::string getCacheDatabaseName() { *CesiumDBFile); UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Caching Cesium requests in %s"), *PlatformAbsolutePath); @@ -98,8 +98,6 @@ std::string getCacheDatabaseName() { return TCHAR_TO_UTF8(*PlatformAbsolutePath); } -} // namespace - std::shared_ptr& getCacheDatabase() { static int MaxCacheItems = GetDefault()->MaxCacheItems; @@ -107,7 +105,7 @@ std::shared_ptr& getCacheDatabase() { static std::shared_ptr pCacheDatabase = std::make_shared( spdlog::default_logger(), - getCacheDatabaseName(), + ITwinCesium::getCacheDatabaseName(), MaxCacheItems); return pCacheDatabase; @@ -121,7 +119,9 @@ const std::shared_ptr& getAssetAccessor() { std::make_shared( spdlog::default_logger(), std::make_shared(), - getCacheDatabase(), + ITwinCesium::getCacheDatabase(), RequestsPerCachePrune)); return pAssetAccessor; } + +} //ITwinCesium diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelComponent.cpp index 62b0ec1..c22b1de 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelComponent.cpp @@ -146,7 +146,7 @@ void UITwinCesiumSubLevelComponent::PlaceGeoreferenceOriginAtSubLevelOrigin() { AITwinCesiumGeoreference* pGeoreference = this->ResolveGeoreference(); if (!IsValid(pGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot place the origin because the sub-level does not have a CesiumGeoreference.")); @@ -177,7 +177,7 @@ void UITwinCesiumSubLevelComponent::PlaceGeoreferenceOriginHere() { AITwinCesiumGeoreference* pGeoreference = this->ResolveGeoreference(); if (!IsValid(pGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot place the origin because the sub-level does not have a CesiumGeoreference.")); @@ -211,7 +211,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc AITwinCesiumGeoreference* pGeoreference = this->ResolveGeoreference(); if (!IsValid(pGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "Cannot place the origin because the sub-level does not have a CesiumGeoreference.")); @@ -225,7 +225,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc if (pOwner->IsEditing()) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "The georeference origin cannot be moved while the sub-level is being edited.")); @@ -243,13 +243,13 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc this->OriginHeight)); ITwinGeoTransforms CurrentTransforms( ellipsoid, - VecMath::createVector3D(CurrentOriginEcef), + FITwinVecMath::createVector3D(CurrentOriginEcef), pGeoreference->GetScale() / 100.0); // Construct new geotransforms at the new origin ITwinGeoTransforms NewTransforms( ellipsoid, - VecMath::createVector3D(NewOriginEcef), + FITwinVecMath::createVector3D(NewOriginEcef), pGeoreference->GetScale() / 100.0); // Transform the level instance from the old origin to the new one. @@ -259,7 +259,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc NewTransforms.GetEllipsoidCenteredToAbsoluteUnrealWorldTransform(); glm::dmat4 OldToNew = EcefToNew * OldToEcef; glm::dmat4 OldTransform = - VecMath::createMatrix4D(pOwner->GetActorTransform().ToMatrixWithScale()); + FITwinVecMath::createMatrix4D(pOwner->GetActorTransform().ToMatrixWithScale()); glm::dmat4 NewLevelTransform = OldToNew * OldTransform; FScopedTransaction transaction(FText::FromString("Place Origin At Location")); @@ -280,7 +280,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc pOwner->Modify(); pOwner->SetActorTransform( - FTransform(VecMath::createMatrix(NewLevelTransform))); + FTransform(FITwinVecMath::createMatrix(NewLevelTransform))); // Set the new sub-level georeference origin. this->Modify(); @@ -295,11 +295,11 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc static_cast(pViewportClient); glm::dvec3 ViewLocation = - VecMath::createVector3D(pEditorViewportClient->GetViewLocation()); + FITwinVecMath::createVector3D(pEditorViewportClient->GetViewLocation()); ViewLocation = glm::dvec3(OldToNew * glm::dvec4(ViewLocation, 1.0)); - pEditorViewportClient->SetViewLocation(VecMath::createVector(ViewLocation)); + pEditorViewportClient->SetViewLocation(FITwinVecMath::createVector(ViewLocation)); - glm::dmat4 ViewportRotation = VecMath::createMatrix4D( + glm::dmat4 ViewportRotation = FITwinVecMath::createMatrix4D( pEditorViewportClient->GetViewRotation().Quaternion().ToMatrix()); ViewportRotation = OldToNew * ViewportRotation; @@ -339,7 +339,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc // coordinate system. glm::dmat4 NewToEcef = NewTransforms.GetAbsoluteUnrealWorldToEllipsoidCenteredTransform(); - glm::dmat4 oldRelativeTransform = VecMath::createMatrix4D( + glm::dmat4 oldRelativeTransform = FITwinVecMath::createMatrix4D( (Root->GetRelativeTransform() * OldLevelTransform) .ToMatrixWithScale()); glm::dmat4 NewToOld = glm::affineInverse(OldToNew); @@ -350,7 +350,7 @@ void UITwinCesiumSubLevelComponent::PlaceOriginAtEcef(const FVector& NewOriginEc Tileset->Modify(); Root->Modify(); Root->SetRelativeTransform( - FTransform(VecMath::createMatrix(RelativeTransformInNew)), + FTransform(FITwinVecMath::createMatrix(RelativeTransformInNew)), false, nullptr, ETeleportType::TeleportPhysics); @@ -498,7 +498,7 @@ void UITwinCesiumSubLevelComponent::OnRegister() { ELevelInstanceRuntimeBehavior::LevelStreaming; UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cesium changed the \"Is Spatially Loaded\" or \"Desired Runtime Behavior\" " @@ -555,7 +555,7 @@ ALevelInstance* UITwinCesiumSubLevelComponent::_getLevelInstance() const noexcep ALevelInstance* pOwner = Cast(this->GetOwner()); if (!pOwner) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "A CesiumSubLevelComponent can only be attached a LevelInstance Actor.")); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelSwitcherComponent.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelSwitcherComponent.cpp index 103c2b6..a8c65bc 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelSwitcherComponent.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSubLevelSwitcherComponent.cpp @@ -90,12 +90,12 @@ void UITwinCesiumSubLevelSwitcherComponent::SetTargetSubLevel( if (this->_pTarget != pLevelInstance) { if (pLevelInstance) { UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("New target sub-level %s."), *GetActorLabel(pLevelInstance)); } else { - UE_LOG(LogCesium, Display, TEXT("New target sub-level ")); + UE_LOG(LogITwinCesium, Display, TEXT("New target sub-level ")); } this->_pTarget = pLevelInstance; @@ -230,7 +230,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { // Wait for these transitions to finish before doing anything further. // TODO: maybe we can cancel these transitions somehow? UE_LOG( - LogCesium, + LogITwinCesium, Log, TEXT( "Waiting for sub-level %s to transition out of an intermediate state while unloading it."), @@ -241,7 +241,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { case StreamState::LoadedNotVisible: case StreamState::LoadedVisible: UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Starting unload of sub-level %s."), *GetActorLabel(this->_pCurrent.Get())); @@ -251,7 +251,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { case StreamState::Removed: case StreamState::Unloaded: UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Finished unloading sub-level %s."), *GetActorLabel(this->_pCurrent.Get())); @@ -296,7 +296,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { case StreamState::MakingVisible: // Wait for these transitions to finish before doing anything further. UE_LOG( - LogCesium, + LogITwinCesium, Log, TEXT( "Waiting for sub-level %s to transition out of an intermediate state while loading it."), @@ -308,7 +308,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { case StreamState::LoadedVisible: // Loading complete! UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Finished loading sub-level %s."), *GetActorLabel(this->_pTarget.Get())); @@ -326,7 +326,7 @@ void UITwinCesiumSubLevelSwitcherComponent::_updateSubLevelStateGame() { case StreamState::Unloaded: // Start loading this level UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Starting load of sub-level %s."), *GetActorLabel(this->_pTarget.Get())); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSunSky.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSunSky.cpp index 230d95d..d4d89cc 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSunSky.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumSunSky.cpp @@ -123,7 +123,7 @@ void AITwinCesiumSunSky::OnConstruction(const FTransform& Transform) { Super::OnConstruction(Transform); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Called OnConstruction for CesiumSunSky %s"), *this->GetName()); @@ -132,7 +132,7 @@ void AITwinCesiumSunSky::OnConstruction(const FTransform& Transform) { FVector(0.0, 0.0, 0.0)); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("Spawn new sky sphere: %s"), _wantsSpawnMobileSkySphere ? TEXT("true") : TEXT("false")); @@ -385,7 +385,7 @@ void AITwinCesiumSunSky::PostEditChangeProperty( AITwinCesiumGeoreference* AITwinCesiumSunSky::GetGeoreference() const { if (!IsValid(this->GlobeAnchor)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT("AITwinCesiumSunSky %s does not have a GlobeAnchorComponent"), *this->GetName()); @@ -584,6 +584,6 @@ void AITwinCesiumSunSky::SetSkyAtmosphereGroundRadius( if (Sky && !FMath::IsNearlyEqualByULP(radiusFloat, Sky->BottomRadius)) { Sky->BottomRadius = radiusFloat; Sky->MarkRenderStateDirty(); - UE_LOG(LogCesium, Verbose, TEXT("GroundRadius now %f"), Sky->BottomRadius); + UE_LOG(LogITwinCesium, Verbose, TEXT("GroundRadius now %f"), Sky->BottomRadius); } } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.cpp index 5efc6c0..1a1c608 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.cpp @@ -97,12 +97,12 @@ void legacy_populateMips( struct GetImageFromSource { CesiumGltf::ImageCesium* - operator()(CesiumTextureUtility::GltfImagePtr& imagePtr) { + operator()(ITwinCesiumTextureUtility::GltfImagePtr& imagePtr) { return imagePtr.pImage; } CesiumGltf::ImageCesium* - operator()(CesiumTextureUtility::EmbeddedImageSource& embeddedImage) { + operator()(ITwinCesiumTextureUtility::EmbeddedImageSource& embeddedImage) { return &embeddedImage.image; } @@ -236,7 +236,7 @@ class FITwinCesiumTextureResource : public FTextureResource { public: FITwinCesiumTextureResource( UTexture* pTexture, - CesiumTextureUtility::CesiumTextureSource&& textureSource, + ITwinCesiumTextureUtility::CesiumTextureSource&& textureSource, uint32 width, uint32 height, EPixelFormat format, @@ -257,8 +257,8 @@ class FITwinCesiumTextureResource : public FTextureResource { this->bGreyScaleFormat = (_format == PF_G8) || (_format == PF_BC4); this->bSRGB = sRGB; - CesiumTextureUtility::AsyncCreatedTexture* pAsyncTexture = - std::get_if( + ITwinCesiumTextureUtility::AsyncCreatedTexture* pAsyncTexture = + std::get_if( &this->_textureSource); if (pAsyncTexture) { this->TextureRHI = pAsyncTexture->rhiTextureRef; @@ -353,7 +353,7 @@ class FITwinCesiumTextureResource : public FTextureResource { // Wrap mip0 as a bulk data source. FITwinCesiumTextureData bulkData(*pImage); - FRHIResourceCreateInfo createInfo{TEXT("CesiumTextureUtility")}; + FRHIResourceCreateInfo createInfo{TEXT("ITwinCesiumTextureUtility")}; createInfo.BulkData = &bulkData; createInfo.ExtData = _platformExtData; @@ -427,7 +427,7 @@ class FITwinCesiumTextureResource : public FTextureResource { private: UTexture* _pTexture; - CesiumTextureUtility::CesiumTextureSource _textureSource; + ITwinCesiumTextureUtility::CesiumTextureSource _textureSource; uint32 _width; uint32 _height; @@ -569,7 +569,7 @@ FTexture2DRHIRef CreateRHITexture2D_Async( } } // namespace -namespace CesiumTextureUtility { +namespace ITwinCesiumTextureUtility { GltfImagePtr GltfImageIndex::resolveImage(const CesiumGltf::Model& model) const { @@ -655,7 +655,7 @@ TUniquePtr loadTextureAnyThreadPart( CesiumGltfReader::GltfReader::generateMipMaps(image); if (errorMessage) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT("%s"), UTF8_TO_TCHAR(errorMessage->c_str())); @@ -774,7 +774,7 @@ TUniquePtr loadTextureAnyThreadPart( if (pKtxExtension->source < 0 || pKtxExtension->source >= model.images.size()) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "KTX texture source index must be non-negative and less than %d, but is %d"), @@ -787,7 +787,7 @@ TUniquePtr loadTextureAnyThreadPart( if (pWebpExtension->source < 0 || pWebpExtension->source >= model.images.size()) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "WebP texture source index must be non-negative and less than %d, but is %d"), @@ -799,7 +799,7 @@ TUniquePtr loadTextureAnyThreadPart( } else { if (texture.source < 0 || texture.source >= model.images.size()) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Texture source index must be non-negative and less than %d, but is %d"), @@ -999,6 +999,6 @@ void destroyHalfLoadedTexture(LoadedTextureResult& halfLoaded) { void destroyTexture(UTexture* pTexture) { check(pTexture != nullptr); - CesiumLifetime::destroy(pTexture); + FITwinCesiumLifetime::destroy(pTexture); } -} // namespace CesiumTextureUtility +} // namespace ITwinCesiumTextureUtility diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.h index 29de59f..6cf34e1 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTextureUtility.h @@ -18,7 +18,7 @@ struct ImageCesium; struct Texture; } // namespace CesiumGltf -namespace CesiumTextureUtility { +namespace ITwinCesiumTextureUtility { /** * @brief A texture that has already been asynchronously created. */ @@ -162,4 +162,4 @@ UTexture2D* loadTextureGameThreadPart( void destroyHalfLoadedTexture(LoadedTextureResult& halfLoaded); void destroyTexture(UTexture* pTexture); -} // namespace CesiumTextureUtility +} // namespace ITwinCesiumTextureUtility diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTile.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTile.cpp index af1d1fe..fd16107 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTile.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTile.cpp @@ -26,7 +26,7 @@ bool UITwinCesiumTile::PrimitiveBoxFullyContainsTileBounds( FBoxSphereBounds UITwinCesiumTile::CalcBounds(const FTransform& LocalToWorld) const { FBoxSphereBounds bounds = std::visit( - CalcBoundsOperation{LocalToWorld, this->_tileTransform}, + FITwinCalcBoundsOperation{LocalToWorld, this->_tileTransform}, _tileBounds); return bounds; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluder.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluder.cpp index b4cec56..d21206f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluder.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluder.cpp @@ -8,7 +8,7 @@ using namespace Cesium3DTilesSelection; namespace { auto findExistingExcluder( const std::vector>& excluders, - const CesiumTileExcluderAdapter& excluder) { + const FITwinCesiumTileExcluderAdapter& excluder) { return std::find_if( excluders.begin(), excluders.end(), @@ -48,7 +48,7 @@ void UITwinCesiumTileExcluder::AddToTileset() { CesiumTile->SetupAttachment(CesiumTileset->GetRootComponent()); CesiumTile->RegisterComponent(); - auto pAdapter = std::make_shared( + auto pAdapter = std::make_shared( TWeakObjectPtr(this), CesiumTileset->ResolveGeoreference(), CesiumTile); @@ -72,7 +72,7 @@ void UITwinCesiumTileExcluder::RemoveFromTileset() { excluders.erase(it); } - CesiumLifetime::destroyComponentRecursively(CesiumTile); + FITwinCesiumLifetime::destroyComponentRecursively(CesiumTile); } void UITwinCesiumTileExcluder::Refresh() { diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.cpp index d39fd5b..f0462aa 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.cpp @@ -3,7 +3,7 @@ #include "ITwinCesiumGeoreference.h" #include "ITwinVecMath.h" -bool CesiumTileExcluderAdapter::shouldExclude( +bool FITwinCesiumTileExcluderAdapter::shouldExclude( const Cesium3DTilesSelection::Tile& tile) const noexcept { if (!this->IsExcluderValid) { return false; @@ -13,7 +13,7 @@ bool CesiumTileExcluderAdapter::shouldExclude( return Excluder->ShouldExclude(Tile); } -void CesiumTileExcluderAdapter::startNewFrame() noexcept { +void FITwinCesiumTileExcluderAdapter::startNewFrame() noexcept { if (!Excluder.IsValid() || !IsValid(Tile) || !IsValid(Georeference)) { IsExcluderValid = false; return; @@ -25,7 +25,7 @@ void CesiumTileExcluderAdapter::startNewFrame() noexcept { .GetAbsoluteUnrealWorldToEllipsoidCenteredTransform(); } -CesiumTileExcluderAdapter::CesiumTileExcluderAdapter( +FITwinCesiumTileExcluderAdapter::FITwinCesiumTileExcluderAdapter( TWeakObjectPtr pExcluder, AITwinCesiumGeoreference* pGeoreference, UITwinCesiumTile* pTile) diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.h index 6b957c4..451507d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTileExcluderAdapter.h @@ -9,7 +9,7 @@ namespace Cesium3DTilesSelection { class Tile; } -class CesiumTileExcluderAdapter : public Cesium3DTilesSelection::ITileExcluder { +class FITwinCesiumTileExcluderAdapter : public Cesium3DTilesSelection::ITileExcluder { virtual bool shouldExclude( const Cesium3DTilesSelection::Tile& tile) const noexcept override; virtual void startNewFrame() noexcept override; @@ -21,7 +21,7 @@ class CesiumTileExcluderAdapter : public Cesium3DTilesSelection::ITileExcluder { bool IsExcluderValid; public: - CesiumTileExcluderAdapter( + FITwinCesiumTileExcluderAdapter( TWeakObjectPtr pExcluder, AITwinCesiumGeoreference* pGeoreference, UITwinCesiumTile* pTile); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.cpp index ecd5fe5..42f7fb2 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.cpp @@ -2,15 +2,15 @@ #include "ITwinCesiumTransforms.h" -const double CesiumTransforms::metersToCentimeters = 100.0; -const double CesiumTransforms::centimetersToMeters = 0.01; +const double ITwinCesiumTransforms::metersToCentimeters = 100.0; +const double ITwinCesiumTransforms::centimetersToMeters = 0.01; // Scale Cesium's meters up to Unreal's centimeters. -const glm::dmat4x4 CesiumTransforms::scaleToUnrealWorld = +const glm::dmat4x4 ITwinCesiumTransforms::scaleToUnrealWorld = glm::dmat4x4(glm::dmat3x3(metersToCentimeters)); // Scale down Unreal's centimeters into Cesium's meters. -const glm::dmat4x4 CesiumTransforms::scaleToCesium = +const glm::dmat4x4 ITwinCesiumTransforms::scaleToCesium = glm::dmat4x4(glm::dmat3x3(centimetersToMeters)); // We're initializing with a static function instead of inline to avoid an @@ -26,5 +26,5 @@ static glm::dmat4 createUnrealToOrFromCesium() { // Transform Cesium's right-handed, Z-up coordinate system to Unreal's // left-handed, Z-up coordinate system by inverting the Y coordinate. This same // transformation can also go the other way. -const glm::dmat4x4 CesiumTransforms::unrealToOrFromCesium = +const glm::dmat4x4 ITwinCesiumTransforms::unrealToOrFromCesium = createUnrealToOrFromCesium(); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.h index d4ad25f..ccd891d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumTransforms.h @@ -8,7 +8,7 @@ * Constants useful for transformation between Cesium and Unreal Engine * coordinate systems. */ -class CesiumTransforms { +class ITwinCesiumTransforms { public: /** * The constant to multiply to transform meters to centimeters (100.0). diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.cpp index 8013333..46ea52c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.cpp @@ -7,12 +7,12 @@ using namespace Cesium3DTilesSelection; -CesiumViewExtension::CesiumViewExtension(const FAutoRegister& autoRegister) +FITwinCesiumViewExtension::FITwinCesiumViewExtension(const FAutoRegister& autoRegister) : FSceneViewExtensionBase(autoRegister) {} -CesiumViewExtension::~CesiumViewExtension() {} +FITwinCesiumViewExtension::~FITwinCesiumViewExtension() {} -TileOcclusionState CesiumViewExtension::getPrimitiveOcclusionState( +TileOcclusionState FITwinCesiumViewExtension::getPrimitiveOcclusionState( const FPrimitiveComponentId& id, bool previouslyOccluded, float frameTimeCutoff) const { @@ -57,13 +57,13 @@ TileOcclusionState CesiumViewExtension::getPrimitiveOcclusionState( } } -void CesiumViewExtension::SetupViewFamily(FSceneViewFamily& InViewFamily) {} +void FITwinCesiumViewExtension::SetupViewFamily(FSceneViewFamily& InViewFamily) {} -void CesiumViewExtension::SetupView( +void FITwinCesiumViewExtension::SetupView( FSceneViewFamily& InViewFamily, FSceneView& InView) {} -void CesiumViewExtension::BeginRenderViewFamily( +void FITwinCesiumViewExtension::BeginRenderViewFamily( FSceneViewFamily& InViewFamily) { if (!this->_isEnabled) return; @@ -85,11 +85,11 @@ void CesiumViewExtension::BeginRenderViewFamily( } } -void CesiumViewExtension::PreRenderViewFamily_RenderThread( +void FITwinCesiumViewExtension::PreRenderViewFamily_RenderThread( FRHICommandListImmediate& RHICmdList, FSceneViewFamily& InViewFamily) {} -void CesiumViewExtension::PreRenderView_RenderThread( +void FITwinCesiumViewExtension::PreRenderView_RenderThread( FRHICommandListImmediate& RHICmdList, FSceneView& InView) {} @@ -106,7 +106,7 @@ getOcclusionHistorySet(const FSceneViewState* pViewState) { } // namespace -void CesiumViewExtension::PostRenderViewFamily_RenderThread( +void FITwinCesiumViewExtension::PostRenderViewFamily_RenderThread( FRHICommandListImmediate& RHICmdList, FSceneViewFamily& InViewFamily) { if (!this->_isEnabled) @@ -195,6 +195,6 @@ void CesiumViewExtension::PostRenderViewFamily_RenderThread( } } -void CesiumViewExtension::SetEnabled(bool enabled) { +void FITwinCesiumViewExtension::SetEnabled(bool enabled) { this->_isEnabled = enabled; } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.h index d95910a..9bedf30 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumViewExtension.h @@ -13,7 +13,7 @@ class AITwinCesium3DTileset; -class CesiumViewExtension : public FSceneViewExtensionBase { +class FITwinCesiumViewExtension : public FSceneViewExtensionBase { private: // Occlusion results for a single view. struct PrimitiveOcclusionResult { @@ -96,8 +96,8 @@ class CesiumViewExtension : public FSceneViewExtensionBase { std::atomic _isEnabled = false; public: - CesiumViewExtension(const FAutoRegister& autoRegister); - ~CesiumViewExtension(); + FITwinCesiumViewExtension(const FAutoRegister& autoRegister); + ~FITwinCesiumViewExtension(); Cesium3DTilesSelection::TileOcclusionState getPrimitiveOcclusionState( const FPrimitiveComponentId& id, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumWgs84Ellipsoid.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumWgs84Ellipsoid.cpp index d004608..e36fac3 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumWgs84Ellipsoid.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCesiumWgs84Ellipsoid.cpp @@ -11,7 +11,7 @@ using namespace CesiumUtility; FVector UITwinCesiumWgs84Ellipsoid::GetRadii() { const glm::dvec3& radii = Ellipsoid::WGS84.getRadii(); - return VecMath::createVector(radii); + return FITwinVecMath::createVector(radii); } double UITwinCesiumWgs84Ellipsoid::GetMaximumRadius() { @@ -25,9 +25,9 @@ double UITwinCesiumWgs84Ellipsoid::GetMinimumRadius() { FVector UITwinCesiumWgs84Ellipsoid::ScaleToGeodeticSurface( const FVector& EarthCenteredEarthFixedPosition) { std::optional result = Ellipsoid::WGS84.scaleToGeodeticSurface( - VecMath::createVector3D(EarthCenteredEarthFixedPosition)); + FITwinVecMath::createVector3D(EarthCenteredEarthFixedPosition)); if (result) { - return VecMath::createVector(*result); + return FITwinVecMath::createVector(*result); } else { return FVector(0.0, 0.0, 0.0); } @@ -35,8 +35,8 @@ FVector UITwinCesiumWgs84Ellipsoid::ScaleToGeodeticSurface( FVector UITwinCesiumWgs84Ellipsoid::GeodeticSurfaceNormal( const FVector& EarthCenteredEarthFixedPosition) { - return VecMath::createVector(Ellipsoid::WGS84.geodeticSurfaceNormal( - VecMath::createVector3D(EarthCenteredEarthFixedPosition))); + return FITwinVecMath::createVector(Ellipsoid::WGS84.geodeticSurfaceNormal( + FITwinVecMath::createVector3D(EarthCenteredEarthFixedPosition))); } FVector UITwinCesiumWgs84Ellipsoid::LongitudeLatitudeHeightToEarthCenteredEarthFixed( @@ -46,13 +46,13 @@ FVector UITwinCesiumWgs84Ellipsoid::LongitudeLatitudeHeightToEarthCenteredEarthF LongitudeLatitudeHeight.X, LongitudeLatitudeHeight.Y, LongitudeLatitudeHeight.Z)); - return VecMath::createVector(cartesian); + return FITwinVecMath::createVector(cartesian); } FVector UITwinCesiumWgs84Ellipsoid::EarthCenteredEarthFixedToLongitudeLatitudeHeight( const FVector& EarthCenteredEarthFixedPosition) { std::optional result = Ellipsoid::WGS84.cartesianToCartographic( - VecMath::createVector3D(EarthCenteredEarthFixedPosition)); + FITwinVecMath::createVector3D(EarthCenteredEarthFixedPosition)); if (result) { return FVector( Math::radiansToDegrees(result->longitude), @@ -65,8 +65,8 @@ FVector UITwinCesiumWgs84Ellipsoid::EarthCenteredEarthFixedToLongitudeLatitudeHe FMatrix UITwinCesiumWgs84Ellipsoid::EastNorthUpToEarthCenteredEarthFixed( const FVector& EarthCenteredEarthFixedPosition) { - return VecMath::createMatrix( + return FITwinVecMath::createMatrix( CesiumGeospatial::GlobeTransforms::eastNorthUpToFixedFrame( - VecMath::createVector3D(EarthCenteredEarthFixedPosition), + FITwinVecMath::createVector3D(EarthCenteredEarthFixedPosition), CesiumGeospatial::Ellipsoid::WGS84)); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCreateGltfOptions.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCreateGltfOptions.h index 5d37c8e..6a96eb6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCreateGltfOptions.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinCreateGltfOptions.h @@ -21,7 +21,7 @@ struct CreateModelOptions { const FITwinCesiumFeaturesMetadataDescription* pFeaturesMetadataDescription = nullptr; PRAGMA_DISABLE_DEPRECATION_WARNINGS - const FMetadataDescription* pEncodedMetadataDescription_DEPRECATED = nullptr; + const FITwinMetadataDescription* pEncodedMetadataDescription_DEPRECATED = nullptr; PRAGMA_ENABLE_DEPRECATION_WARNINGS bool alwaysIncludeTangents = false; bool createPhysicsMeshes = true; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGeoTransforms.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGeoTransforms.cpp index 5a3b860..007f23e 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGeoTransforms.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGeoTransforms.cpp @@ -105,13 +105,13 @@ glm::dquat ITwinGeoTransforms::ComputeSurfaceNormalRotationUnreal( void ITwinGeoTransforms::updateTransforms() noexcept { this->_coordinateSystem = createCoordinateSystem(this->_ellipsoid, this->_center, this->_scale); - this->_ecefToUnreal = VecMath::createMatrix( + this->_ecefToUnreal = FITwinVecMath::createMatrix( this->_coordinateSystem.getEcefToLocalTransformation()); - this->_unrealToEcef = VecMath::createMatrix( + this->_unrealToEcef = FITwinVecMath::createMatrix( this->_coordinateSystem.getLocalToEcefTransformation()); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT( "GeoTransforms::updateTransforms with center %f %f %f and ellipsoid radii %f %f %f"), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.cpp index 9669144..9b42c01 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.cpp @@ -6,9 +6,9 @@ #include #include -void GlmLogging::logVector(const std::string& name, const glm::dvec3& vector) { +void ITwinGlmLogging::logVector(const std::string& name, const glm::dvec3& vector) { UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT("%s: %16.6f %16.6f %16.6f"), *FString(name.c_str()), @@ -17,10 +17,10 @@ void GlmLogging::logVector(const std::string& name, const glm::dvec3& vector) { vector.z); } -void GlmLogging::logMatrix(const std::string& name, const glm::dmat4& matrix) { - UE_LOG(LogCesium, Verbose, TEXT("%s:"), *FString(name.c_str())); +void ITwinGlmLogging::logMatrix(const std::string& name, const glm::dmat4& matrix) { + UE_LOG(LogITwinCesium, Verbose, TEXT("%s:"), *FString(name.c_str())); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT(" %16.6f %16.6f %16.6f %16.6f"), matrix[0][0], @@ -28,7 +28,7 @@ void GlmLogging::logMatrix(const std::string& name, const glm::dmat4& matrix) { matrix[2][0], matrix[3][0]); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT(" %16.6f %16.6f %16.6f %16.6f"), matrix[0][1], @@ -36,7 +36,7 @@ void GlmLogging::logMatrix(const std::string& name, const glm::dmat4& matrix) { matrix[2][1], matrix[3][1]); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT(" %16.6f %16.6f %16.6f %16.6f"), matrix[0][2], @@ -44,7 +44,7 @@ void GlmLogging::logMatrix(const std::string& name, const glm::dmat4& matrix) { matrix[2][2], matrix[3][2]); UE_LOG( - LogCesium, + LogITwinCesium, Verbose, TEXT(" %16.6f %16.6f %16.6f %16.6f"), matrix[0][3], diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.h index 3b15355..8e5928b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlmLogging.h @@ -8,10 +8,10 @@ /** * @brief Utility functions for logging GLM data in Unreal */ -class GlmLogging { +class ITwinGlmLogging { public: /** - * Print the given vector as a verbose `LogCesium` + * Print the given vector as a verbose `LogITwinCesium` * message, with unspecified formatting. * * @param name The name that will be part of the message @@ -20,7 +20,7 @@ class GlmLogging { static void logVector(const std::string& name, const glm::dvec3& vector); /** - * Print the given matrix as a verbose `LogCesium` + * Print the given matrix as a verbose `LogITwinCesium` * message, with unspecified formatting. * * @param name The name that will be part of the message diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlobeAwareDefaultPawn.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlobeAwareDefaultPawn.cpp index 0a68f19..c0503a3 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlobeAwareDefaultPawn.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinGlobeAwareDefaultPawn.cpp @@ -154,7 +154,7 @@ void AITwinGlobeAwareDefaultPawn::FlyToLocationECEF( this->FindComponentByClass(); if (!IsValid(FlyTo)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cannot call deprecated FlyToLocationLongitudeLatitudeHeight because the GlobeAwareDefaultPawn does not have a CesiumFlyToComponent.")) @@ -185,7 +185,7 @@ void AITwinGlobeAwareDefaultPawn::FlyToLocationLongitudeLatitudeHeight( this->FindComponentByClass(); if (!IsValid(FlyTo)) { UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Cannot call deprecated FlyToLocationLongitudeLatitudeHeight because the GlobeAwareDefaultPawn does not have a CesiumFlyToComponent.")) @@ -250,14 +250,14 @@ void AITwinGlobeAwareDefaultPawn::PostLoad() { this->AddInstanceComponent(FlyTo); UE_LOG( - LogCesium, + LogITwinCesium, Warning, TEXT( "Added CesiumFlyToComponent to %s in order to preserve backward compatibility."), *this->GetName()); } - FlyTo->RotationToUse = ECesiumFlyToRotation::ControlRotationInEastSouthUp; + FlyTo->RotationToUse = EITwinCesiumFlyToRotation::ControlRotationInEastSouthUp; FlyTo->ProgressCurve = this->FlyToProgressCurve_DEPRECATED; FlyTo->HeightPercentageCurve = this->FlyToAltitudeProfileCurve_DEPRECATED; FlyTo->MaximumHeightByDistanceCurve = @@ -270,7 +270,7 @@ void AITwinGlobeAwareDefaultPawn::PostLoad() { AITwinCesiumGeoreference* AITwinGlobeAwareDefaultPawn::GetGeoreference() const { if (!IsValid(this->GlobeAnchor)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "GlobeAwareDefaultPawn %s does not have a valid GlobeAnchorComponent."), @@ -281,7 +281,7 @@ AITwinCesiumGeoreference* AITwinGlobeAwareDefaultPawn::GetGeoreference() const { AITwinCesiumGeoreference* pGeoreference = this->GlobeAnchor->ResolveGeoreference(); if (!IsValid(pGeoreference)) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT( "GlobeAwareDefaultPawn %s does not have a valid CesiumGeoreference."), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinLoadGltfResult.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinLoadGltfResult.h index 19cb63f..19029be 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinLoadGltfResult.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinLoadGltfResult.h @@ -52,13 +52,13 @@ struct LoadPrimitiveResult { pCollisionMesh = nullptr; std::string name{}; - TUniquePtr baseColorTexture; - TUniquePtr + TUniquePtr baseColorTexture; + TUniquePtr metallicRoughnessTexture; - TUniquePtr normalTexture; - TUniquePtr emissiveTexture; - TUniquePtr occlusionTexture; - TUniquePtr waterMaskTexture; + TUniquePtr normalTexture; + TUniquePtr emissiveTexture; + TUniquePtr occlusionTexture; + TUniquePtr waterMaskTexture; std::unordered_map textureCoordinateParameters; /** * A map of feature ID set names to their corresponding texture coordinate @@ -93,14 +93,14 @@ struct LoadPrimitiveResult { FITwinCesiumPrimitiveMetadata Metadata{}; /** Encodes the EXT_mesh_features on a mesh primitive.*/ - CesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures EncodedFeatures{}; + ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveFeatures EncodedFeatures{}; /** Encodes the EXT_structural_metadata on a mesh primitive.*/ - CesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata EncodedMetadata{}; + ITwinCesiumEncodedFeaturesMetadata::EncodedPrimitiveMetadata EncodedMetadata{}; PRAGMA_DISABLE_DEPRECATION_WARNINGS // For backwards compatibility with CesiumEncodedMetadataComponent. FITwinCesiumMetadataPrimitive Metadata_DEPRECATED{}; - std::optional + std::optional EncodedMetadata_DEPRECATED = std::nullopt; PRAGMA_ENABLE_DEPRECATION_WARNINGS @@ -173,10 +173,10 @@ struct LoadModelResult { FITwinCesiumModelMetadata Metadata{}; // Encodes the EXT_structural_metadata on a glTF model. - CesiumEncodedFeaturesMetadata::EncodedModelMetadata EncodedMetadata{}; + ITwinCesiumEncodedFeaturesMetadata::EncodedModelMetadata EncodedMetadata{}; // For backwards compatibility with CesiumEncodedMetadataComponent. - std::optional + std::optional EncodedMetadata_DEPRECATED{}; }; } // namespace LoadGltfResult diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.cpp index 1ffef9a..b54f41f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.cpp @@ -4,34 +4,34 @@ #include "ITwinCesiumRuntime.h" #include "CoreMinimal.h" -void SpdlogUnrealLoggerSink::sink_it_(const spdlog::details::log_msg& msg) { +void ITwinSpdlogUnrealLoggerSink::sink_it_(const spdlog::details::log_msg& msg) { switch (msg.level) { case SPDLOG_LEVEL_TRACE: - UE_LOG(LogCesium, VeryVerbose, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, VeryVerbose, TEXT("%s"), *this->formatMessage(msg)); break; case SPDLOG_LEVEL_DEBUG: - UE_LOG(LogCesium, Verbose, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, Verbose, TEXT("%s"), *this->formatMessage(msg)); break; case SPDLOG_LEVEL_INFO: - UE_LOG(LogCesium, Display, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, Display, TEXT("%s"), *this->formatMessage(msg)); break; case SPDLOG_LEVEL_WARN: - UE_LOG(LogCesium, Warning, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, Warning, TEXT("%s"), *this->formatMessage(msg)); break; case SPDLOG_LEVEL_ERROR: - UE_LOG(LogCesium, Error, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, Error, TEXT("%s"), *this->formatMessage(msg)); break; case SPDLOG_LEVEL_CRITICAL: - UE_LOG(LogCesium, Fatal, TEXT("%s"), *this->formatMessage(msg)); + UE_LOG(LogITwinCesium, Fatal, TEXT("%s"), *this->formatMessage(msg)); break; } } -void SpdlogUnrealLoggerSink::flush_() { +void ITwinSpdlogUnrealLoggerSink::flush_() { // Nothing to do here } -FString SpdlogUnrealLoggerSink::formatMessage( +FString ITwinSpdlogUnrealLoggerSink::formatMessage( const spdlog::details::log_msg& msg) const { // Frustratingly, spdlog::formatter isn't thread safe. So even though our sink // itself doesn't need to be protected by a mutex, the formatter does. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.h index 6a7e1be..bd1b562 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinSpdlogUnrealLoggerSink.h @@ -12,7 +12,7 @@ * @brief Internal implementation of a spdlog sink that forwards the messages * to Unreal log macros. */ -class SpdlogUnrealLoggerSink +class ITwinSpdlogUnrealLoggerSink : public spdlog::sinks::base_sink { protected: virtual void sink_it_(const spdlog::details::log_msg& msg) override; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinUnrealMetadataConversions.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinUnrealMetadataConversions.cpp index 33e492b..0e14d1b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinUnrealMetadataConversions.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinUnrealMetadataConversions.cpp @@ -2,119 +2,119 @@ #include "ITwinUnrealMetadataConversions.h" -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType CesiumMetadataValueTypeToBlueprintType(FITwinCesiumMetadataValueType ValueType) { if (ValueType.bIsArray) { - return ECesiumMetadataBlueprintType::Array; + return EITwinCesiumMetadataBlueprintType::Array; } - ECesiumMetadataType type = ValueType.Type; - ECesiumMetadataComponentType componentType = ValueType.ComponentType; + EITwinCesiumMetadataType type = ValueType.Type; + EITwinCesiumMetadataComponentType componentType = ValueType.ComponentType; - if (type == ECesiumMetadataType::Boolean) { - return ECesiumMetadataBlueprintType::Boolean; + if (type == EITwinCesiumMetadataType::Boolean) { + return EITwinCesiumMetadataBlueprintType::Boolean; } - if (type == ECesiumMetadataType::String) { - return ECesiumMetadataBlueprintType::String; + if (type == EITwinCesiumMetadataType::String) { + return EITwinCesiumMetadataBlueprintType::String; } - if (type == ECesiumMetadataType::Scalar) { + if (type == EITwinCesiumMetadataType::Scalar) { switch (componentType) { - case ECesiumMetadataComponentType::Uint8: - return ECesiumMetadataBlueprintType::Byte; - case ECesiumMetadataComponentType::Int8: - case ECesiumMetadataComponentType::Int16: - case ECesiumMetadataComponentType::Uint16: - case ECesiumMetadataComponentType::Int32: - return ECesiumMetadataBlueprintType::Integer; - case ECesiumMetadataComponentType::Uint32: - case ECesiumMetadataComponentType::Int64: - return ECesiumMetadataBlueprintType::Integer64; - case ECesiumMetadataComponentType::Float32: - return ECesiumMetadataBlueprintType::Float; - case ECesiumMetadataComponentType::Float64: - return ECesiumMetadataBlueprintType::Float64; - case ECesiumMetadataComponentType::Uint64: + case EITwinCesiumMetadataComponentType::Uint8: + return EITwinCesiumMetadataBlueprintType::Byte; + case EITwinCesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Int32: + return EITwinCesiumMetadataBlueprintType::Integer; + case EITwinCesiumMetadataComponentType::Uint32: + case EITwinCesiumMetadataComponentType::Int64: + return EITwinCesiumMetadataBlueprintType::Integer64; + case EITwinCesiumMetadataComponentType::Float32: + return EITwinCesiumMetadataBlueprintType::Float; + case EITwinCesiumMetadataComponentType::Float64: + return EITwinCesiumMetadataBlueprintType::Float64; + case EITwinCesiumMetadataComponentType::Uint64: default: - return ECesiumMetadataBlueprintType::String; + return EITwinCesiumMetadataBlueprintType::String; } } - if (type == ECesiumMetadataType::Vec2) { + if (type == EITwinCesiumMetadataType::Vec2) { switch (componentType) { - case ECesiumMetadataComponentType::Uint8: - case ECesiumMetadataComponentType::Int8: - case ECesiumMetadataComponentType::Int16: - case ECesiumMetadataComponentType::Uint16: - case ECesiumMetadataComponentType::Int32: - return ECesiumMetadataBlueprintType::IntPoint; + case EITwinCesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Int32: + return EITwinCesiumMetadataBlueprintType::IntPoint; default: - return ECesiumMetadataBlueprintType::Vector2D; + return EITwinCesiumMetadataBlueprintType::Vector2D; } } - if (type == ECesiumMetadataType::Vec3) { + if (type == EITwinCesiumMetadataType::Vec3) { switch (componentType) { - case ECesiumMetadataComponentType::Uint8: - case ECesiumMetadataComponentType::Int8: - case ECesiumMetadataComponentType::Int16: - case ECesiumMetadataComponentType::Uint16: - case ECesiumMetadataComponentType::Int32: - return ECesiumMetadataBlueprintType::IntVector; - case ECesiumMetadataComponentType::Float32: - return ECesiumMetadataBlueprintType::Vector3f; + case EITwinCesiumMetadataComponentType::Uint8: + case EITwinCesiumMetadataComponentType::Int8: + case EITwinCesiumMetadataComponentType::Int16: + case EITwinCesiumMetadataComponentType::Uint16: + case EITwinCesiumMetadataComponentType::Int32: + return EITwinCesiumMetadataBlueprintType::IntVector; + case EITwinCesiumMetadataComponentType::Float32: + return EITwinCesiumMetadataBlueprintType::Vector3f; default: - return ECesiumMetadataBlueprintType::Vector3; + return EITwinCesiumMetadataBlueprintType::Vector3; } } - if (type == ECesiumMetadataType::Vec4) { - return ECesiumMetadataBlueprintType::Vector4; + if (type == EITwinCesiumMetadataType::Vec4) { + return EITwinCesiumMetadataBlueprintType::Vector4; } - if (type == ECesiumMetadataType::Mat2 || type == ECesiumMetadataType::Mat3 || - type == ECesiumMetadataType::Mat4) { - return ECesiumMetadataBlueprintType::Matrix; + if (type == EITwinCesiumMetadataType::Mat2 || type == EITwinCesiumMetadataType::Mat3 || + type == EITwinCesiumMetadataType::Mat4) { + return EITwinCesiumMetadataBlueprintType::Matrix; } - return ECesiumMetadataBlueprintType::None; + return EITwinCesiumMetadataBlueprintType::None; } -ECesiumMetadataBlueprintType CesiumMetadataTrueTypeToBlueprintType( - ECesiumMetadataTrueType_DEPRECATED trueType) { +EITwinCesiumMetadataBlueprintType CesiumMetadataTrueTypeToBlueprintType( + EITwinCesiumMetadataTrueType_DEPRECATED trueType) { switch (trueType) { - case ECesiumMetadataTrueType_DEPRECATED::Boolean_DEPRECATED: - return ECesiumMetadataBlueprintType::Boolean; - case ECesiumMetadataTrueType_DEPRECATED::Uint8_DEPRECATED: - return ECesiumMetadataBlueprintType::Byte; - case ECesiumMetadataTrueType_DEPRECATED::Int8_DEPRECATED: - case ECesiumMetadataTrueType_DEPRECATED::Int16_DEPRECATED: - case ECesiumMetadataTrueType_DEPRECATED::Uint16_DEPRECATED: - case ECesiumMetadataTrueType_DEPRECATED::Int32_DEPRECATED: + case EITwinCesiumMetadataTrueType_DEPRECATED::Boolean_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Boolean; + case EITwinCesiumMetadataTrueType_DEPRECATED::Uint8_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Byte; + case EITwinCesiumMetadataTrueType_DEPRECATED::Int8_DEPRECATED: + case EITwinCesiumMetadataTrueType_DEPRECATED::Int16_DEPRECATED: + case EITwinCesiumMetadataTrueType_DEPRECATED::Uint16_DEPRECATED: + case EITwinCesiumMetadataTrueType_DEPRECATED::Int32_DEPRECATED: // TODO: remove this one - case ECesiumMetadataTrueType_DEPRECATED::Uint32_DEPRECATED: - return ECesiumMetadataBlueprintType::Integer; - case ECesiumMetadataTrueType_DEPRECATED::Int64_DEPRECATED: - return ECesiumMetadataBlueprintType::Integer64; - case ECesiumMetadataTrueType_DEPRECATED::Float32_DEPRECATED: - return ECesiumMetadataBlueprintType::Float; - case ECesiumMetadataTrueType_DEPRECATED::Float64_DEPRECATED: - return ECesiumMetadataBlueprintType::Float64; - case ECesiumMetadataTrueType_DEPRECATED::Uint64_DEPRECATED: - case ECesiumMetadataTrueType_DEPRECATED::String_DEPRECATED: - return ECesiumMetadataBlueprintType::String; - case ECesiumMetadataTrueType_DEPRECATED::Array_DEPRECATED: - return ECesiumMetadataBlueprintType::Array; + case EITwinCesiumMetadataTrueType_DEPRECATED::Uint32_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Integer; + case EITwinCesiumMetadataTrueType_DEPRECATED::Int64_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Integer64; + case EITwinCesiumMetadataTrueType_DEPRECATED::Float32_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Float; + case EITwinCesiumMetadataTrueType_DEPRECATED::Float64_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Float64; + case EITwinCesiumMetadataTrueType_DEPRECATED::Uint64_DEPRECATED: + case EITwinCesiumMetadataTrueType_DEPRECATED::String_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::String; + case EITwinCesiumMetadataTrueType_DEPRECATED::Array_DEPRECATED: + return EITwinCesiumMetadataBlueprintType::Array; default: - return ECesiumMetadataBlueprintType::None; + return EITwinCesiumMetadataBlueprintType::None; } } -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED CesiumMetadataValueTypeToTrueType(FITwinCesiumMetadataValueType ValueType) { if (ValueType.bIsArray) { - return ECesiumMetadataTrueType_DEPRECATED::Array_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Array_DEPRECATED; } CesiumGltf::PropertyType type = CesiumGltf::PropertyType(ValueType.Type); @@ -122,52 +122,52 @@ CesiumMetadataValueTypeToTrueType(FITwinCesiumMetadataValueType ValueType) { CesiumGltf::PropertyComponentType(ValueType.ComponentType); if (type == CesiumGltf::PropertyType::Boolean) { - return ECesiumMetadataTrueType_DEPRECATED::Boolean_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Boolean_DEPRECATED; } if (type == CesiumGltf::PropertyType::Scalar) { switch (componentType) { case CesiumGltf::PropertyComponentType::Uint8: - return ECesiumMetadataTrueType_DEPRECATED::Uint8_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Uint8_DEPRECATED; case CesiumGltf::PropertyComponentType::Int8: - return ECesiumMetadataTrueType_DEPRECATED::Int8_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Int8_DEPRECATED; case CesiumGltf::PropertyComponentType::Uint16: - return ECesiumMetadataTrueType_DEPRECATED::Uint16_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Uint16_DEPRECATED; case CesiumGltf::PropertyComponentType::Int16: - return ECesiumMetadataTrueType_DEPRECATED::Int16_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Int16_DEPRECATED; case CesiumGltf::PropertyComponentType::Uint32: - return ECesiumMetadataTrueType_DEPRECATED::Uint32_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Uint32_DEPRECATED; case CesiumGltf::PropertyComponentType::Int32: - return ECesiumMetadataTrueType_DEPRECATED::Int32_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Int32_DEPRECATED; case CesiumGltf::PropertyComponentType::Int64: - return ECesiumMetadataTrueType_DEPRECATED::Int64_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Int64_DEPRECATED; case CesiumGltf::PropertyComponentType::Uint64: - return ECesiumMetadataTrueType_DEPRECATED::Uint64_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Uint64_DEPRECATED; case CesiumGltf::PropertyComponentType::Float32: - return ECesiumMetadataTrueType_DEPRECATED::Float32_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Float32_DEPRECATED; case CesiumGltf::PropertyComponentType::Float64: - return ECesiumMetadataTrueType_DEPRECATED::Float64_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::Float64_DEPRECATED; default: - return ECesiumMetadataTrueType_DEPRECATED::None_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::None_DEPRECATED; } } if (type == CesiumGltf::PropertyType::String) { - return ECesiumMetadataTrueType_DEPRECATED::String_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::String_DEPRECATED; } - return ECesiumMetadataTrueType_DEPRECATED::None_DEPRECATED; + return EITwinCesiumMetadataTrueType_DEPRECATED::None_DEPRECATED; } /*static*/ FIntPoint -UnrealMetadataConversions::toIntPoint(const glm::ivec2& vec2) { +FITwinUnrealMetadataConversions::toIntPoint(const glm::ivec2& vec2) { return FIntPoint(vec2[0], vec2[1]); } -/*static*/ FIntPoint UnrealMetadataConversions::toIntPoint( +/*static*/ FIntPoint FITwinUnrealMetadataConversions::toIntPoint( const std::string_view& string, const FIntPoint& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); // For some reason, FIntPoint doesn't have an InitFromString method, so // copy the one from FVector. @@ -178,27 +178,27 @@ UnrealMetadataConversions::toIntPoint(const glm::ivec2& vec2) { } /*static*/ FVector2D -UnrealMetadataConversions::toVector2D(const glm::dvec2& vec2) { +FITwinUnrealMetadataConversions::toVector2D(const glm::dvec2& vec2) { return FVector2D(vec2[0], vec2[1]); } -/*static*/ FVector2D UnrealMetadataConversions::toVector2D( +/*static*/ FVector2D FITwinUnrealMetadataConversions::toVector2D( const std::string_view& string, const FVector2D& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); FVector2D result; return result.InitFromString(unrealString) ? result : defaultValue; } /*static*/ FIntVector -UnrealMetadataConversions::toIntVector(const glm::ivec3& vec3) { +FITwinUnrealMetadataConversions::toIntVector(const glm::ivec3& vec3) { return FIntVector(vec3[0], vec3[1], vec3[2]); } -/*static*/ FIntVector UnrealMetadataConversions::toIntVector( +/*static*/ FIntVector FITwinUnrealMetadataConversions::toIntVector( const std::string_view& string, const FIntVector& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); // For some reason, FIntVector doesn't have an InitFromString method, so // copy the one from FVector. int32 X = 0, Y = 0, Z = 0; @@ -209,44 +209,44 @@ UnrealMetadataConversions::toIntVector(const glm::ivec3& vec3) { } /*static*/ FVector3f -UnrealMetadataConversions::toVector3f(const glm::vec3& vec3) { +FITwinUnrealMetadataConversions::toVector3f(const glm::vec3& vec3) { return FVector3f(vec3[0], vec3[1], vec3[2]); } -/*static*/ FVector3f UnrealMetadataConversions::toVector3f( +/*static*/ FVector3f FITwinUnrealMetadataConversions::toVector3f( const std::string_view& string, const FVector3f& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); FVector3f result; return result.InitFromString(unrealString) ? result : defaultValue; } -/*static*/ FVector UnrealMetadataConversions::toVector(const glm::dvec3& vec3) { +/*static*/ FVector FITwinUnrealMetadataConversions::toVector(const glm::dvec3& vec3) { return FVector(vec3[0], vec3[1], vec3[2]); } -/*static*/ FVector UnrealMetadataConversions::toVector( +/*static*/ FVector FITwinUnrealMetadataConversions::toVector( const std::string_view& string, const FVector& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); FVector result; return result.InitFromString(unrealString) ? result : defaultValue; } /*static*/ FVector4 -UnrealMetadataConversions::toVector4(const glm::dvec4& vec4) { +FITwinUnrealMetadataConversions::toVector4(const glm::dvec4& vec4) { return FVector4(vec4[0], vec4[1], vec4[2], vec4[3]); } -/*static*/ FVector4 UnrealMetadataConversions::toVector4( +/*static*/ FVector4 FITwinUnrealMetadataConversions::toVector4( const std::string_view& string, const FVector4& defaultValue) { - FString unrealString = UnrealMetadataConversions::toString(string); + FString unrealString = FITwinUnrealMetadataConversions::toString(string); FVector4 result; return result.InitFromString(unrealString) ? result : defaultValue; } -/*static*/ FMatrix UnrealMetadataConversions::toMatrix(const glm::dmat4& mat4) { +/*static*/ FMatrix FITwinUnrealMetadataConversions::toMatrix(const glm::dmat4& mat4) { // glm is column major, but Unreal is row major. FPlane4d row1( static_cast(mat4[0][0]), @@ -276,11 +276,11 @@ UnrealMetadataConversions::toVector4(const glm::dvec4& vec4) { } /*static*/ FString -UnrealMetadataConversions::toString(const std::string_view& from) { +FITwinUnrealMetadataConversions::toString(const std::string_view& from) { return toString(std::string(from)); } /*static*/ FString -UnrealMetadataConversions::toString(const std::string& from) { +FITwinUnrealMetadataConversions::toString(const std::string& from) { return FString(UTF8_TO_TCHAR(from.data())); } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.cpp index 8508348..c13ca8c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.cpp @@ -10,7 +10,7 @@ #include #include -glm::dmat4 VecMath::createMatrix4D(const FMatrix& m) noexcept { +glm::dmat4 FITwinVecMath::createMatrix4D(const FMatrix& m) noexcept { return glm::dmat4( m.M[0][0], m.M[0][1], @@ -30,10 +30,10 @@ glm::dmat4 VecMath::createMatrix4D(const FMatrix& m) noexcept { m.M[3][3]); } -glm::dmat4 VecMath::createMatrix4D( +glm::dmat4 FITwinVecMath::createMatrix4D( const FMatrix& m, const glm::dvec3& translation) noexcept { - return VecMath::createMatrix4D( + return FITwinVecMath::createMatrix4D( m, translation.x, translation.y, @@ -41,10 +41,10 @@ glm::dmat4 VecMath::createMatrix4D( 1.0); } -glm::dmat4 VecMath::createMatrix4D( +glm::dmat4 FITwinVecMath::createMatrix4D( const FMatrix& m, const glm::dvec4& translation) noexcept { - return VecMath::createMatrix4D( + return FITwinVecMath::createMatrix4D( m, translation.x, translation.y, @@ -52,7 +52,7 @@ glm::dmat4 VecMath::createMatrix4D( translation.w); } -glm::dmat4 VecMath::createMatrix4D( +glm::dmat4 FITwinVecMath::createMatrix4D( const FMatrix& m, double tx, double ty, @@ -77,7 +77,7 @@ glm::dmat4 VecMath::createMatrix4D( tw); } -glm::dmat4 VecMath::createTranslationMatrix4D( +glm::dmat4 FITwinVecMath::createTranslationMatrix4D( double tx, double ty, double tz, @@ -101,24 +101,24 @@ glm::dmat4 VecMath::createTranslationMatrix4D( tw); } -glm::dmat4 VecMath::createRotationMatrix4D(const FRotator& rot) noexcept { +glm::dmat4 FITwinVecMath::createRotationMatrix4D(const FRotator& rot) noexcept { const FMatrix& m = FRotationMatrix::Make(rot); return createMatrix4D(m); } -glm::dvec3 VecMath::createVector3D(const FVector& v) noexcept { +glm::dvec3 FITwinVecMath::createVector3D(const FVector& v) noexcept { return glm::dvec3(v.X, v.Y, v.Z); } -glm::dvec3 VecMath::createVector3D(const FIntVector& v) noexcept { +glm::dvec3 FITwinVecMath::createVector3D(const FIntVector& v) noexcept { return glm::dvec3(v.X, v.Y, v.Z); } -glm::dquat VecMath::createQuaternion(const FQuat& q) noexcept { +glm::dquat FITwinVecMath::createQuaternion(const FQuat& q) noexcept { return glm::dquat(q.W, q.X, q.Y, q.Z); } -FMatrix VecMath::createMatrix(const glm::dmat4& m) noexcept { +FMatrix FITwinVecMath::createMatrix(const glm::dmat4& m) noexcept { return FMatrix( FVector(m[0].x, m[0].y, m[0].z), FVector(m[1].x, m[1].y, m[1].z), @@ -126,7 +126,7 @@ FMatrix VecMath::createMatrix(const glm::dmat4& m) noexcept { FVector(m[3].x, m[3].y, m[3].z)); } -FMatrix VecMath::createMatrix(const glm::dmat3& m) noexcept { +FMatrix FITwinVecMath::createMatrix(const glm::dmat3& m) noexcept { return FMatrix( FVector(m[0].x, m[0].y, m[0].z), FVector(m[1].x, m[1].y, m[1].z), @@ -134,7 +134,7 @@ FMatrix VecMath::createMatrix(const glm::dmat3& m) noexcept { FVector::ZeroVector); } -FMatrix VecMath::createMatrix( +FMatrix FITwinVecMath::createMatrix( const glm::dvec3& column0, const glm::dvec3& column1, const glm::dvec3& column2) noexcept { @@ -145,78 +145,78 @@ FMatrix VecMath::createMatrix( FVector::ZeroVector); } -FVector VecMath::createVector(const glm::dvec4& v) noexcept { +FVector FITwinVecMath::createVector(const glm::dvec4& v) noexcept { return FVector(v.x, v.y, v.z); } -FVector VecMath::createVector(const glm::dvec3& v) noexcept { +FVector FITwinVecMath::createVector(const glm::dvec3& v) noexcept { return FVector(v.x, v.y, v.z); } -FRotator VecMath::createRotator(const glm::dmat4& m) noexcept { +FRotator FITwinVecMath::createRotator(const glm::dmat4& m) noexcept { // Avoid converting to Unreal single-precision types until the very end, so // that all intermediate conversions are performed in double-precision. - return VecMath::createRotator(quat_cast(m)); + return FITwinVecMath::createRotator(quat_cast(m)); } -FRotator VecMath::createRotator(const glm::dmat3& m) noexcept { - return VecMath::createRotator(quat_cast(m)); +FRotator FITwinVecMath::createRotator(const glm::dmat3& m) noexcept { + return FITwinVecMath::createRotator(quat_cast(m)); } -FRotator VecMath::createRotator(const glm::dquat& q) noexcept { +FRotator FITwinVecMath::createRotator(const glm::dquat& q) noexcept { return FRotator(FQuat(q.x, q.y, q.z, q.w)); } -FQuat VecMath::createQuaternion(const glm::dquat& q) noexcept { +FQuat FITwinVecMath::createQuaternion(const glm::dquat& q) noexcept { return FQuat(q.x, q.y, q.z, q.w); } -glm::dvec4 VecMath::add4D(const FVector& f, const FIntVector& i) noexcept { - return glm::dvec4(VecMath::add3D(f, i), 1.0); +glm::dvec4 FITwinVecMath::add4D(const FVector& f, const FIntVector& i) noexcept { + return glm::dvec4(FITwinVecMath::add3D(f, i), 1.0); } -glm::dvec4 VecMath::add4D(const FIntVector& i, const FVector& f) noexcept { - return glm::dvec4(VecMath::add3D(i, f), 1.0); +glm::dvec4 FITwinVecMath::add4D(const FIntVector& i, const FVector& f) noexcept { + return glm::dvec4(FITwinVecMath::add3D(i, f), 1.0); } -glm::dvec4 VecMath::add4D(const glm::dvec4& d, const FIntVector& i) noexcept { - return glm::dvec4(VecMath::add3D(glm::dvec3(d), i), d.w); +glm::dvec4 FITwinVecMath::add4D(const glm::dvec4& d, const FIntVector& i) noexcept { + return glm::dvec4(FITwinVecMath::add3D(glm::dvec3(d), i), d.w); } -glm::dvec3 VecMath::add3D(const FIntVector& i, const FVector& f) noexcept { +glm::dvec3 FITwinVecMath::add3D(const FIntVector& i, const FVector& f) noexcept { return glm::dvec3( static_cast(i.X) + f.X, static_cast(i.Y) + f.Y, static_cast(i.Z) + f.Z); } -glm::dvec3 VecMath::add3D(const FVector& f, const FIntVector& i) noexcept { +glm::dvec3 FITwinVecMath::add3D(const FVector& f, const FIntVector& i) noexcept { return glm::dvec3( static_cast(f.X) + i.X, static_cast(f.Y) + i.Y, static_cast(f.Z) + i.Z); } -glm::dvec3 VecMath::add3D(const glm::dvec3& f, const FIntVector& i) noexcept { +glm::dvec3 FITwinVecMath::add3D(const glm::dvec3& f, const FIntVector& i) noexcept { return glm::dvec3(f.x + i.X, f.y + i.Y, f.z + i.Z); } -glm::dvec4 VecMath::subtract4D(const FVector& f, const FIntVector& i) noexcept { - return glm::dvec4(VecMath::subtract3D(f, i), 1.0); +glm::dvec4 FITwinVecMath::subtract4D(const FVector& f, const FIntVector& i) noexcept { + return glm::dvec4(FITwinVecMath::subtract3D(f, i), 1.0); } -glm::dvec4 VecMath::subtract4D(const FIntVector& i, const FVector& f) noexcept { - return glm::dvec4(VecMath::subtract3D(i, f), 1.0); +glm::dvec4 FITwinVecMath::subtract4D(const FIntVector& i, const FVector& f) noexcept { + return glm::dvec4(FITwinVecMath::subtract3D(i, f), 1.0); } -glm::dvec3 VecMath::subtract3D(const FVector& f, const FIntVector& i) noexcept { +glm::dvec3 FITwinVecMath::subtract3D(const FVector& f, const FIntVector& i) noexcept { return glm::dvec3( static_cast(f.X) - i.X, static_cast(f.Y) - i.Y, static_cast(f.Z) - i.Z); } -glm::dvec3 VecMath::subtract3D(const FIntVector& i, const FVector& f) noexcept { +glm::dvec3 FITwinVecMath::subtract3D(const FIntVector& i, const FVector& f) noexcept { return glm::dvec3( static_cast(i.X) - f.X, static_cast(i.Y) - f.Y, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.h index 48b25ad..0fa5d5d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/ITwinVecMath.h @@ -16,7 +16,7 @@ * computations with `double` precision. * */ -class VecMath { +class FITwinVecMath { public: /** * @brief Create a `glm` 4x4 matrix from the given `FMatrix`. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumCameraManager.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumCameraManager.spec.cpp index 358337c..13cbc8b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumCameraManager.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumCameraManager.spec.cpp @@ -16,7 +16,7 @@ void FITwinCesiumCameraManagerSpec::Define() { Describe("GetDefaultCameraManager", [this]() { It("should get the default camera manager", [this]() { - UWorld* world = CesiumTestHelpers::getGlobalWorldContext(); + UWorld* world = ITwinCesiumTestHelpers::getGlobalWorldContext(); AITwinCesiumCameraManager* cameraManager = AITwinCesiumCameraManager::GetDefaultCameraManager(world); TestNotNull("Returned pointer is valid", cameraManager); @@ -32,7 +32,7 @@ void FITwinCesiumCameraManagerSpec::Define() { Describe("AddCamera", [this]() { It("should add and remove a single camera", [this]() { - UWorld* world = CesiumTestHelpers::getGlobalWorldContext(); + UWorld* world = ITwinCesiumTestHelpers::getGlobalWorldContext(); AITwinCesiumCameraManager* cameraManager = AITwinCesiumCameraManager::GetDefaultCameraManager(world); TestNotNull("Returned pointer is valid", cameraManager); @@ -54,7 +54,7 @@ void FITwinCesiumCameraManagerSpec::Define() { }); It("should fail to remove a camera, when the id is invalid", [this]() { - UWorld* world = CesiumTestHelpers::getGlobalWorldContext(); + UWorld* world = ITwinCesiumTestHelpers::getGlobalWorldContext(); AITwinCesiumCameraManager* cameraManager = AITwinCesiumCameraManager::GetDefaultCameraManager(world); TestNotNull("Returned pointer is valid", cameraManager); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdAttribute.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdAttribute.spec.cpp index 27d6b46..235b9e3 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdAttribute.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdAttribute.spec.cpp @@ -30,7 +30,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); }); It("constructs invalid instance for nonexistent attribute", [this]() { @@ -48,7 +48,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); }); It("constructs invalid instance for attribute with nonexistent accessor", @@ -69,7 +69,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); }); It("constructs invalid instance for attribute with invalid accessor", @@ -93,13 +93,13 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); }); It("constructs valid instance", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 3, 3, 3, 1, 1, 1, 2, 2, 2}; - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -119,7 +119,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); }); }); @@ -143,7 +143,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); TestEqual( "VertexCount", UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetVertexCount( @@ -155,7 +155,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 3, 3, 3, 1, 1, 1, 2, 2, 2}; const int64 vertexCount = static_cast(featureIDs.size()); - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -171,7 +171,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); TestEqual( "VertexCount", UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetVertexCount( @@ -200,7 +200,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAccessor); TestEqual( "FeatureIDForVertex", UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDForVertex( @@ -212,7 +212,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { It("returns -1 for out-of-bounds index", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -228,7 +228,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); TestEqual( "FeatureIDForNegativeVertex", UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureIDForVertex( @@ -246,7 +246,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { It("returns correct value for valid attribute", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 3, 3, 3, 1, 1, 1, 2, 2, 2}; - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -262,7 +262,7 @@ void FITwinCesiumFeatureIdAttributeSpec::Define() { "FeatureIDAttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(featureIDAttribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); for (size_t i = 0; i < featureIDs.size(); i++) { TestEqual( "FeatureIDForVertex", diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdSet.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdSet.spec.cpp index 0227764..15276a6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdSet.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdSet.spec.cpp @@ -36,7 +36,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::None); + EITwinCesiumFeatureIdSetType::None); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -52,7 +52,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -62,7 +62,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { It("constructs set with feature ID attribute", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureID = AddFeatureIDsAsAttributeToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -74,7 +74,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Attribute); + EITwinCesiumFeatureIdSetType::Attribute); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -89,7 +89,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { glm::vec2(0, 0.5), glm::vec2(0.5, 0.5)}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -104,7 +104,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Texture); + EITwinCesiumFeatureIdSetType::Texture); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -121,7 +121,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -142,7 +142,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); TestEqual( "FeatureCount", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureCount(featureIDSet), @@ -174,14 +174,14 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "AttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(attribute), - ECesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); + EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAttribute); TestEqual("AttributeIndex", attribute.getAttributeIndex(), -1); }); It("returns valid instance for attribute feature ID set", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureID = AddFeatureIDsAsAttributeToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -196,7 +196,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "AttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(attribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); TestEqual( "AttributeIndex", attribute.getAttributeIndex(), @@ -223,7 +223,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "TextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( texture), - ECesiumFeatureIdTextureStatus::ErrorInvalidTexture); + EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture); auto featureIDTextureView = texture.getFeatureIdTextureView(); TestEqual( @@ -240,7 +240,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { glm::vec2(0, 0.5), glm::vec2(0.5, 0.5)}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -258,7 +258,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "TextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( texture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); auto featureIDTextureView = texture.getFeatureIdTextureView(); TestEqual( @@ -322,7 +322,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { It("returns correct value for attribute set", [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureID = AddFeatureIDsAsAttributeToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -348,7 +348,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { glm::vec2(0, 0.5), glm::vec2(0.5, 0.5)}; - FeatureId& featureID = AddFeatureIDsAsTextureToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -445,7 +445,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { glm::vec2(0, 1), glm::vec2(1, 0)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureID = AddFeatureIDsAsTextureToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -524,7 +524,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { static_cast(model.accessors.size() - 1); const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureId = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -569,7 +569,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { [this]() { const int64 attributeIndex = 0; const std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureID = AddFeatureIDsAsAttributeToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -593,7 +593,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "AttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(attribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); TestEqual( "GetFeatureTableName", UITwinCesiumFeatureIdAttributeBlueprintLibrary::GetFeatureTableName( @@ -610,7 +610,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { glm::vec2(0, 0.5), glm::vec2(0.5, 0.5)}; - FeatureId& featureID = AddFeatureIDsAsTextureToModel( + FeatureId& featureID = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -637,7 +637,7 @@ void FITwinCesiumFeatureIdSetSpec::Define() { "TextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( texture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); TestEqual( "GetFeatureTableName", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureTableName( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdTexture.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdTexture.spec.cpp index a124349..b31043d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdTexture.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumFeatureIdTexture.spec.cpp @@ -35,7 +35,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::ErrorInvalidTexture); + EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -60,7 +60,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::ErrorInvalidTexture); + EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -88,7 +88,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::ErrorInvalidTexture); + EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -100,7 +100,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { It("constructs valid instance", [this]() { const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -120,7 +120,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -159,7 +159,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -200,7 +200,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); auto featureIDTextureView = featureIDTexture.getFeatureIdTextureView(); TestEqual( @@ -236,7 +236,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); TestEqual( "FeatureID", @@ -248,7 +248,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { It("returns correct value for valid attribute", [this]() { const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -268,7 +268,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { const glm::vec2& texCoord = texCoords[i]; @@ -305,7 +305,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); TestEqual( "FeatureIDForVertex", @@ -318,7 +318,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { It("returns -1 for out-of-bounds index", [this]() { const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -338,7 +338,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); TestEqual( "FeatureIDForNegativeVertex", @@ -358,7 +358,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { It("returns correct value for valid texture", [this]() { const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -378,7 +378,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); for (size_t i = 0; i < featureIDs.size(); i++) { int64 featureID = @@ -414,7 +414,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(0.0, 0.5)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -434,7 +434,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); const std::vector expected{2, 0, 3, 1}; for (size_t i = 0; i < featureIDs.size(); i++) { @@ -490,7 +490,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.Location = FVector_NetQuantize::Zero(); @@ -521,7 +521,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(1, 0)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -549,7 +549,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.Location = FVector_NetQuantize(0, -1, 0); @@ -580,7 +580,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(1, 0)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -608,7 +608,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.Location = FVector_NetQuantize(0, -1, 0); @@ -639,7 +639,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(1, 0)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -667,7 +667,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.FaceIndex = 0; @@ -705,7 +705,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(1, 0)}; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -733,7 +733,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.FaceIndex = 1; @@ -789,7 +789,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { glm::vec2(1, 0), }; const std::vector featureIDs{0, 3, 1, 2}; - FeatureId& featureId = AddFeatureIDsAsTextureToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, featureIDs, @@ -825,7 +825,7 @@ void FITwinCesiumFeatureIdTextureSpec::Define() { "FeatureIDTextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( featureIDTexture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); FHitResult Hit; Hit.FaceIndex = 0; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGeoreference.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGeoreference.spec.cpp index 91777d7..9f90e9f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGeoreference.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGeoreference.spec.cpp @@ -23,7 +23,7 @@ END_DEFINE_SPEC(FITwinCesiumGeoreferenceSpec) void FITwinCesiumGeoreferenceSpec::Define() { BeforeEach([this]() { - UWorld* pWorld = CesiumTestHelpers::getGlobalWorldContext(); + UWorld* pWorld = ITwinCesiumTestHelpers::getGlobalWorldContext(); pGeoreferenceNullIsland = pWorld->SpawnActor(); pGeoreferenceNullIsland->SetOriginLongitudeLatitudeHeight( FVector(0.0, 0.0, 0.0)); @@ -186,7 +186,7 @@ void FITwinCesiumGeoreferenceSpec::Define() { rotationAt90DegreesLongitude, originOf90DegreesLongitudeInNullIslandCoordinates); - CesiumTestHelpers::TestRotatorsAreEquivalent( + ITwinCesiumTestHelpers::TestRotatorsAreEquivalent( this, pGeoreference90Longitude, rotationAt90DegreesLongitude, @@ -206,7 +206,7 @@ void FITwinCesiumGeoreferenceSpec::Define() { rotationAtNullIsland, originOf90DegreesLongitudeInNullIslandCoordinates); - CesiumTestHelpers::TestRotatorsAreEquivalent( + ITwinCesiumTestHelpers::TestRotatorsAreEquivalent( this, pGeoreferenceNullIsland, rotationAtNullIsland, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGlobeAnchor.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGlobeAnchor.spec.cpp index c78ecc9..3409f63 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGlobeAnchor.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGlobeAnchor.spec.cpp @@ -19,7 +19,7 @@ END_DEFINE_SPEC(FITwinCesiumGlobeAnchorSpec) void FITwinCesiumGlobeAnchorSpec::Define() { BeforeEach([this]() { - UWorld* pWorld = CesiumTestHelpers::getGlobalWorldContext(); + UWorld* pWorld = ITwinCesiumTestHelpers::getGlobalWorldContext(); this->pActor = pWorld->SpawnActor(); this->pActor->AddComponentByClass( USceneComponent::StaticClass(), diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.cpp index 9601ccc..b726546 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.cpp @@ -2,7 +2,7 @@ using namespace CesiumGltf; -int32_t AddBufferToModel( +int32_t ITwinCesium::AddBufferToModel( CesiumGltf::Model& model, const std::string& type, const int32_t componentType, @@ -29,7 +29,7 @@ int32_t AddBufferToModel( return static_cast(model.accessors.size() - 1); } -CesiumGltf::FeatureId& AddFeatureIDsAsAttributeToModel( +CesiumGltf::FeatureId& ITwinCesium::AddFeatureIDsAsAttributeToModel( CesiumGltf::Model& model, CesiumGltf::MeshPrimitive& primitive, const std::vector& featureIDs, @@ -58,7 +58,7 @@ CesiumGltf::FeatureId& AddFeatureIDsAsAttributeToModel( return featureID; } -CesiumGltf::FeatureId& AddFeatureIDsAsTextureToModel( +CesiumGltf::FeatureId& ITwinCesium::AddFeatureIDsAsTextureToModel( CesiumGltf::Model& model, CesiumGltf::MeshPrimitive& primitive, const std::vector& featureIDs, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.h index 80728d9..e442088 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumGltfSpecUtility.h @@ -8,6 +8,7 @@ #include #include + /** * @brief Converts the given vector of values into a std::vector of bytes. * @@ -21,6 +22,7 @@ std::vector GetValuesAsBytes(const std::vector& values) { return bytes; } +namespace ITwinCesium { /** * @brief Adds the buffer to the given model, creating a buffer view and * accessor in the process. @@ -31,6 +33,7 @@ int32_t AddBufferToModel( const std::string& type, const int32_t componentType, const std::vector&& values); +} /** * @brief Creates an attribute on the given primitive, including a buffer, @@ -46,7 +49,7 @@ void CreateAttributeForPrimitive( const std::vector& values) { std::vector data = GetValuesAsBytes(values); const int32_t accessor = - AddBufferToModel(model, type, componentType, std::move(data)); + ITwinCesium::AddBufferToModel(model, type, componentType, std::move(data)); primitive.attributes.insert({attributeName, accessor}); } @@ -61,7 +64,7 @@ void CreateIndicesForPrimitive( const int32_t componentType, const std::vector& indices) { std::vector values = GetValuesAsBytes(indices); - const int32_t accessor = AddBufferToModel( + const int32_t accessor = ITwinCesium::AddBufferToModel( model, CesiumGltf::AccessorSpec::Type::SCALAR, componentType, @@ -69,6 +72,7 @@ void CreateIndicesForPrimitive( primitive.indices = accessor; } +namespace ITwinCesium { /** * @brief Adds the feature IDs to the given primitive as a feature ID attribute * in EXT_mesh_features. If the primitive doesn't already contain @@ -101,6 +105,8 @@ CesiumGltf::FeatureId& AddFeatureIDsAsTextureToModel( const std::vector& texCoords, const int64_t texcoordSetIndex); +} + /** * @brief Adds the given values to the given model as a property table property * in EXT_structural_metadata. This also creates a class property definition for diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestCore.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestCore.cpp index 6b009ac..de02624 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestCore.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestCore.cpp @@ -55,7 +55,7 @@ bool TimeLoadingCommand::Update() { // Start test mark, turn updates back on pass.startMark = FPlatformTime::Seconds(); - UE_LOG(LogCesium, Display, TEXT("-- Load start mark -- %s"), *loggingName); + UE_LOG(LogITwinCesium, Display, TEXT("-- Load start mark -- %s"), *loggingName); playContext.setSuspendUpdate(false); @@ -77,17 +77,17 @@ bool TimeLoadingCommand::Update() { if (tilesetsloaded || timedOut) { pass.endMark = timeMark; - UE_LOG(LogCesium, Display, TEXT("-- Load end mark -- %s"), *loggingName); + UE_LOG(LogITwinCesium, Display, TEXT("-- Load end mark -- %s"), *loggingName); if (timedOut) { UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT("TIMED OUT: Loading stopped after %.2f seconds"), pass.elapsedTime); } else { UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Tileset load completed in %.2f seconds"), pass.elapsedTime); @@ -112,7 +112,7 @@ DEFINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER( screenshotName); bool LoadTestScreenshotCommand::Update() { UE_LOG( - LogCesium, + LogITwinCesium, Display, TEXT("Requesting screenshot to /Saved/Screenshots/WindowsEditor...")); @@ -136,7 +136,7 @@ void defaultReportStep(const std::vector& testPasses) { } reportStr += "-----------------------------\n"; - UE_LOG(LogCesium, Display, TEXT("%s"), *reportStr); + UE_LOG(LogITwinCesium, Display, TEXT("%s"), *reportStr); } DEFINE_LATENT_AUTOMATION_COMMAND_ONE_PARAMETER( @@ -177,14 +177,14 @@ DEFINE_LATENT_AUTOMATION_COMMAND_TWO_PARAMETER( bool InitForPlayWhenReady::Update() { if (!GEditor || !GEditor->IsPlayingSessionInEditor()) return false; - UE_LOG(LogCesium, Display, TEXT("Play in Editor ready...")); + UE_LOG(LogITwinCesium, Display, TEXT("Play in Editor ready...")); playContext.initForPlay(creationContext); return true; } void clearCacheDb() { std::shared_ptr pCacheDatabase = - getCacheDatabase(); + ITwinCesium::getCacheDatabase(); pCacheDatabase->clearAll(); } @@ -207,11 +207,11 @@ bool RunLoadTest( // // Programmatically set up the world // - UE_LOG(LogCesium, Display, TEXT("Creating common world objects...")); + UE_LOG(LogITwinCesium, Display, TEXT("Creating common world objects...")); createCommonWorldObjects(context.creationContext); // Configure location specific objects - UE_LOG(LogCesium, Display, TEXT("Setting up location...")); + UE_LOG(LogITwinCesium, Display, TEXT("Setting up location...")); locationSetup(context.creationContext); context.creationContext.trackForPlay(); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestSamples.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestSamples.cpp index 976c806..f71ecf3 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestSamples.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumLoadTestSamples.cpp @@ -51,7 +51,7 @@ void setupForDenver(SceneGenerationContext& context) { // Add Cesium World Terrain AITwinCesium3DTileset* worldTerrainTileset = context.world->SpawnActor(); - worldTerrainTileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + worldTerrainTileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); worldTerrainTileset->SetIonAssetID(1); worldTerrainTileset->SetIonAccessToken(SceneGenerationContext::testIonToken); worldTerrainTileset->SetActorLabel(TEXT("Cesium World Terrain")); @@ -70,7 +70,7 @@ void setupForDenver(SceneGenerationContext& context) { // Aerometrex Denver AITwinCesium3DTileset* aerometrexTileset = context.world->SpawnActor(); - aerometrexTileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + aerometrexTileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); aerometrexTileset->SetIonAssetID(354307); aerometrexTileset->SetIonAccessToken(SceneGenerationContext::testIonToken); aerometrexTileset->SetMaximumScreenSpaceError(2.0); @@ -93,7 +93,7 @@ void setupForMelbourne(SceneGenerationContext& context) { // Add Cesium World Terrain AITwinCesium3DTileset* worldTerrainTileset = context.world->SpawnActor(); - worldTerrainTileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + worldTerrainTileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); worldTerrainTileset->SetIonAssetID(1); worldTerrainTileset->SetIonAccessToken(SceneGenerationContext::testIonToken); worldTerrainTileset->SetActorLabel(TEXT("Cesium World Terrain")); @@ -111,7 +111,7 @@ void setupForMelbourne(SceneGenerationContext& context) { AITwinCesium3DTileset* melbourneTileset = context.world->SpawnActor(); - melbourneTileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + melbourneTileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); melbourneTileset->SetIonAssetID(69380); melbourneTileset->SetIonAccessToken(SceneGenerationContext::testIonToken); melbourneTileset->SetMaximumScreenSpaceError(6.0); @@ -131,7 +131,7 @@ void setupForMontrealPointCloud(SceneGenerationContext& context) { AITwinCesium3DTileset* montrealTileset = context.world->SpawnActor(); - montrealTileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + montrealTileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); montrealTileset->SetIonAssetID(28945); montrealTileset->SetIonAccessToken(SceneGenerationContext::testIonToken); montrealTileset->SetMaximumScreenSpaceError(16.0); @@ -224,7 +224,7 @@ bool FSampleMaxTileLoads::RunTest(const FString& Parameters) { SceneGenerationContext& context, TestPass::TestingParameter parameter) { std::shared_ptr pCacheDatabase = - getCacheDatabase(); + ITwinCesium::getCacheDatabase(); pCacheDatabase->clearAll(); int maxLoadsTarget = std::get(parameter); @@ -249,7 +249,7 @@ bool FSampleMaxTileLoads::RunTest(const FString& Parameters) { reportStr += "\n"; } reportStr += "------------------------------------------------------\n"; - UE_LOG(LogCesium, Display, TEXT("%s"), *reportStr); + UE_LOG(LogITwinCesium, Display, TEXT("%s"), *reportStr); }; std::vector testPasses; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataPickingBlueprintLibrary.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataPickingBlueprintLibrary.spec.cpp index 9a50e74..bfb9c47 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataPickingBlueprintLibrary.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataPickingBlueprintLibrary.spec.cpp @@ -237,7 +237,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; FeatureId& featureId = - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); featureId.propertyTable = static_cast(pModelMetadata->propertyTables.size() - 1); @@ -275,7 +275,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; FeatureId& featureId = - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); featureId.propertyTable = static_cast(pModelMetadata->propertyTables.size() - 1); @@ -322,7 +322,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { static_cast(model.accessors.size() - 1); std::vector featureIDs{0, 0, 0, 1, 1, 1}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); pPrimitiveComponent->PositionAccessor = AccessorView(model, positionAccessorIndex); @@ -370,7 +370,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; FeatureId& featureId = - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, featureIDs, 2, 0); featureId.propertyTable = static_cast(pModelMetadata->propertyTables.size() - 1); @@ -453,14 +453,14 @@ void FITwinCesiumMetadataPickingSpec::Define() { static_cast(model.accessors.size() - 1); std::vector featureIDs0{1, 1, 1, 0, 0, 0}; - FeatureId& featureId0 = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId0 = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs0, 2, 0); std::vector featureIDs1{0, 0, 0, 1, 1, 1}; - FeatureId& featureId1 = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId1 = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs1, @@ -914,7 +914,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns empty map for invalid face index", [this]() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureId = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -956,7 +956,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns empty map for invalid feature ID set index", [this]() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureId = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -1001,7 +1001,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns empty values if feature ID set is not associated with a property table", [this]() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -1045,7 +1045,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns values for first feature ID set by default", [this]() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureId = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, @@ -1124,14 +1124,14 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns values for specified feature ID set", [this]() { std::vector featureIDs0{1, 1, 1, 0, 0, 0}; - FeatureId& featureId0 = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId0 = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs0, 2, 0); std::vector featureIDs1{0, 0, 0, 1, 1, 1}; - FeatureId& featureId1 = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId1 = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs1, @@ -1251,7 +1251,7 @@ void FITwinCesiumMetadataPickingSpec::Define() { It("returns values for first feature ID set by default", [this]() { std::vector featureIDs{0, 0, 0, 1, 1, 1}; - FeatureId& featureId = AddFeatureIDsAsAttributeToModel( + FeatureId& featureId = ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, featureIDs, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataValue.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataValue.spec.cpp index 4e9b774..91bd658 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataValue.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumMetadataValue.spec.cpp @@ -19,11 +19,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value; FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Invalid); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Invalid); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); TestFalse("IsArray", valueType.bIsArray); }); @@ -31,11 +31,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(true); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Boolean); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Boolean); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); TestFalse("IsArray", valueType.bIsArray); }); @@ -43,11 +43,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(1.6); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Scalar); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Scalar); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::Float64); + EITwinCesiumMetadataComponentType::Float64); TestFalse("IsArray", valueType.bIsArray); }); @@ -55,11 +55,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(glm::u8vec4(1, 2, 3, 4)); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Vec4); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Vec4); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); TestFalse("IsArray", valueType.bIsArray); }); @@ -67,11 +67,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(glm::imat2x2(-1, -2, 3, 0)); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Mat2); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Mat2); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::Int32); + EITwinCesiumMetadataComponentType::Int32); TestFalse("IsArray", valueType.bIsArray); }); @@ -79,11 +79,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(std::string_view("Hello")); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::String); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::String); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); TestFalse("IsArray", valueType.bIsArray); }); @@ -92,11 +92,11 @@ void FITwinCesiumMetadataValueSpec::Define() { FITwinCesiumMetadataValue value(arrayView); FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("Type", valueType.Type, ECesiumMetadataType::Scalar); + TestEqual("Type", valueType.Type, EITwinCesiumMetadataType::Scalar); TestEqual( "ComponentType", valueType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); TestTrue("IsArray", valueType.bIsArray); }); }); @@ -1215,11 +1215,11 @@ void FITwinCesiumMetadataValueSpec::Define() { TestEqual( "array element type", elementType.Type, - ECesiumMetadataType::Invalid); + EITwinCesiumMetadataType::Invalid); TestEqual( "array element component type", elementType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); }); It("gets array from array value", [this]() { @@ -1239,11 +1239,11 @@ void FITwinCesiumMetadataValueSpec::Define() { TestEqual( "array element type", elementType.Type, - ECesiumMetadataType::Scalar); + EITwinCesiumMetadataType::Scalar); TestEqual( "array element component type", elementType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); }); }); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumOriginShiftComponent.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumOriginShiftComponent.spec.cpp index fc44d5b..ab7b343 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumOriginShiftComponent.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumOriginShiftComponent.spec.cpp @@ -27,7 +27,7 @@ FDelegateHandle subscriptionPostPIEStarted; END_DEFINE_SPEC(FITwinCesiumOriginShiftComponentSpec) -using namespace CesiumTestHelpers; +using namespace ITwinCesiumTestHelpers; void FITwinCesiumOriginShiftComponentSpec::Define() { BeforeEach([this]() { @@ -122,7 +122,7 @@ void FITwinCesiumOriginShiftComponentSpec::Define() { // Activate georeference origin shifting findInPlay(pOriginShiftComponent) - ->SetMode(ECesiumOriginShiftMode::ChangeCesiumGeoreference); + ->SetMode(EITwinCesiumOriginShiftMode::ChangeCesiumGeoreference); // Move it to 90 degrees longitude. FVector location = FVector( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPrimitiveFeatures.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPrimitiveFeatures.spec.cpp index fb822b2..e9b5782 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPrimitiveFeatures.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPrimitiveFeatures.spec.cpp @@ -57,19 +57,19 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); }); It("constructs with multiple feature ID sets", [this]() { const std::vector attributeIDs{0, 0, 0}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); const std::vector textureIDs{1, 2, 3}; const std::vector texCoords{ glm::vec2(0, 0), glm::vec2(0.34, 0), glm::vec2(0.67, 0)}; - AddFeatureIDsAsTextureToModel( + ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, textureIDs, @@ -90,10 +90,10 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { primitiveFeatures); TestEqual("Number of FeatureIDSets", featureIDSets.Num(), 3); - const std::vector expectedTypes{ - ECesiumFeatureIdSetType::Attribute, - ECesiumFeatureIdSetType::Texture, - ECesiumFeatureIdSetType::Implicit}; + const std::vector expectedTypes{ + EITwinCesiumFeatureIdSetType::Attribute, + EITwinCesiumFeatureIdSetType::Texture, + EITwinCesiumFeatureIdSetType::Implicit}; for (size_t i = 0; i < featureIDSets.Num(); i++) { const FITwinCesiumFeatureIdSet& featureIDSet = @@ -120,14 +120,14 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { pExtension = &pPrimitive->addExtension(); const std::vector attributeIDs{0, 0, 0}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); const std::vector textureIDs{1, 2, 3}; const std::vector texCoords{ glm::vec2(0, 0), glm::vec2(0.34, 0), glm::vec2(0.67, 0)}; - AddFeatureIDsAsTextureToModel( + ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, textureIDs, @@ -148,7 +148,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { const TArray featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( primitiveFeatures, - ECesiumFeatureIdSetType::Attribute); + EITwinCesiumFeatureIdSetType::Attribute); TestEqual("Number of FeatureIDSets", featureIDSets.Num(), 1); const FITwinCesiumFeatureIdSet& featureIDSet = featureIDSets[0]; @@ -156,7 +156,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Attribute); + EITwinCesiumFeatureIdSetType::Attribute); const FITwinCesiumFeatureIdAttribute& attribute = UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDAttribute( @@ -165,7 +165,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "AttributeStatus", UITwinCesiumFeatureIdAttributeBlueprintLibrary:: GetFeatureIDAttributeStatus(attribute), - ECesiumFeatureIdAttributeStatus::Valid); + EITwinCesiumFeatureIdAttributeStatus::Valid); }); It("gets feature ID texture", [this]() { @@ -175,7 +175,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { const TArray featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( primitiveFeatures, - ECesiumFeatureIdSetType::Texture); + EITwinCesiumFeatureIdSetType::Texture); TestEqual("Number of FeatureIDSets", featureIDSets.Num(), 1); const FITwinCesiumFeatureIdSet& featureIDSet = featureIDSets[0]; @@ -183,7 +183,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Texture); + EITwinCesiumFeatureIdSetType::Texture); const FITwinCesiumFeatureIdTexture& texture = UITwinCesiumFeatureIdSetBlueprintLibrary::GetAsFeatureIDTexture( @@ -192,7 +192,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "TextureStatus", UITwinCesiumFeatureIdTextureBlueprintLibrary::GetFeatureIDTextureStatus( texture), - ECesiumFeatureIdTextureStatus::Valid); + EITwinCesiumFeatureIdTextureStatus::Valid); }); It("gets implicit feature ID", [this]() { @@ -202,7 +202,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { const TArray featureIDSets = UITwinCesiumPrimitiveFeaturesBlueprintLibrary::GetFeatureIDSetsOfType( primitiveFeatures, - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); TestEqual("Number of FeatureIDSets", featureIDSets.Num(), 1); const FITwinCesiumFeatureIdSet& featureIDSet = featureIDSets[0]; @@ -210,7 +210,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { "FeatureIDType", UITwinCesiumFeatureIdSetBlueprintLibrary::GetFeatureIDSetType( featureIDSet), - ECesiumFeatureIdSetType::Implicit); + EITwinCesiumFeatureIdSetType::Implicit); }); }); @@ -334,7 +334,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { It("returns -1 for out of bounds feature ID set index", [this]() { std::vector attributeIDs{1, 1, 1, 1, 0, 0, 0}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 2, 0); const std::vector indices{0, 1, 2, 0, 2, 3, 4, 5, 6}; CreateIndicesForPrimitive( @@ -373,7 +373,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { Describe("FeatureIDAttribute", [this]() { It("returns -1 for out-of-bounds face index", [this]() { std::vector attributeIDs{1, 1, 1}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 1, 0); const std::vector indices{0, 1, 2}; CreateIndicesForPrimitive( @@ -406,7 +406,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { It("returns correct values for primitive without indices", [this]() { std::vector attributeIDs{1, 1, 1, 2, 2, 2, 0, 0, 0}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 3, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 3, 0); Accessor& accessor = model.accessors.emplace_back(); accessor.count = 9; @@ -429,7 +429,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { It("returns correct values for primitive with indices", [this]() { std::vector attributeIDs{1, 1, 1, 1, 0, 0, 0}; - AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 2, 0); + ITwinCesium::AddFeatureIDsAsAttributeToModel(model, *pPrimitive, attributeIDs, 2, 0); const std::vector indices{0, 1, 2, 0, 2, 3, 4, 5, 6}; CreateIndicesForPrimitive( @@ -465,7 +465,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { glm::vec2(0, 0), glm::vec2(0, 0), glm::vec2(0, 0)}; - AddFeatureIDsAsTextureToModel( + ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, textureIDs, @@ -513,7 +513,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { glm::vec2(0.75, 0), glm::vec2(0.75, 0), glm::vec2(0.75, 0)}; - AddFeatureIDsAsTextureToModel( + ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, textureIDs, @@ -552,7 +552,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { glm::vec2(0.25, 0), glm::vec2(0.5, 0), glm::vec2(0.75, 0)}; - AddFeatureIDsAsTextureToModel( + ITwinCesium::AddFeatureIDsAsTextureToModel( model, *pPrimitive, textureIDs, @@ -679,7 +679,7 @@ void FITwinCesiumPrimitiveFeaturesSpec::Define() { [this]() { // First feature ID set is attribute std::vector attributeIDs{1, 1, 1, 1, 0, 0, 0}; - AddFeatureIDsAsAttributeToModel( + ITwinCesium::AddFeatureIDsAsAttributeToModel( model, *pPrimitive, attributeIDs, diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyArray.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyArray.spec.cpp index 97ae705..ffd3fe2 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyArray.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyArray.spec.cpp @@ -22,16 +22,16 @@ void FITwinCesiumPropertyArraySpec::Define() { FITwinCesiumMetadataValueType valueType = UITwinCesiumPropertyArrayBlueprintLibrary::GetElementValueType(array); - TestEqual("type", valueType.Type, ECesiumMetadataType::Invalid); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Invalid); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); TestEqual( "blueprint type", UITwinCesiumPropertyArrayBlueprintLibrary::GetElementBlueprintType(array), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); }); It("constructs empty array from empty view", [this]() { @@ -44,16 +44,16 @@ void FITwinCesiumPropertyArraySpec::Define() { FITwinCesiumMetadataValueType valueType = UITwinCesiumPropertyArrayBlueprintLibrary::GetElementValueType(array); - TestEqual("type", valueType.Type, ECesiumMetadataType::Scalar); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Scalar); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); TestEqual( "blueprint type", UITwinCesiumPropertyArrayBlueprintLibrary::GetElementBlueprintType(array), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); }); It("constructs non-empty array", [this]() { @@ -67,16 +67,16 @@ void FITwinCesiumPropertyArraySpec::Define() { FITwinCesiumMetadataValueType valueType = UITwinCesiumPropertyArrayBlueprintLibrary::GetElementValueType(array); - TestEqual("type", valueType.Type, ECesiumMetadataType::Scalar); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Scalar); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); TestEqual( "blueprint type", UITwinCesiumPropertyArrayBlueprintLibrary::GetElementBlueprintType(array), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); }); }); @@ -95,19 +95,19 @@ void FITwinCesiumPropertyArraySpec::Define() { FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("type", valueType.Type, ECesiumMetadataType::Invalid); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Invalid); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); value = UITwinCesiumPropertyArrayBlueprintLibrary::GetValue(array, 1); valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("type", valueType.Type, ECesiumMetadataType::Invalid); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Invalid); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::None); + EITwinCesiumMetadataComponentType::None); }); It("gets value for valid index", [this]() { @@ -127,11 +127,11 @@ void FITwinCesiumPropertyArraySpec::Define() { FITwinCesiumMetadataValueType valueType = UITwinCesiumMetadataValueBlueprintLibrary::GetValueType(value); - TestEqual("type", valueType.Type, ECesiumMetadataType::Scalar); + TestEqual("type", valueType.Type, EITwinCesiumMetadataType::Scalar); TestEqual( "componentType", valueType.ComponentType, - ECesiumMetadataComponentType::Uint8); + EITwinCesiumMetadataComponentType::Uint8); TestEqual( "byte value", diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTable.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTable.spec.cpp index 8b71b77..ffeab87 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTable.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTable.spec.cpp @@ -32,7 +32,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTable); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -48,7 +48,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTableClass); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTableClass); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -64,7 +64,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTableClass); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTableClass); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -90,7 +90,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -118,7 +118,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -136,7 +136,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTable); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable); const auto properties = UITwinCesiumPropertyTableBlueprintLibrary::GetProperties(propertyTable); TestTrue("properties are empty", properties.IsEmpty()); @@ -174,7 +174,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -193,7 +193,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(scalarProperty), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -218,7 +218,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(vec2Property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -258,7 +258,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -277,7 +277,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -295,7 +295,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTable); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable); const auto properties = UITwinCesiumPropertyTableBlueprintLibrary::GetProperties(propertyTable); TestTrue("properties are empty", properties.IsEmpty()); @@ -343,7 +343,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -385,7 +385,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -400,7 +400,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -440,7 +440,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -455,7 +455,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(scalarProperty), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -470,7 +470,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(vec2Property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -489,7 +489,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTable); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -536,7 +536,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -591,7 +591,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -649,7 +649,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -674,7 +674,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::ErrorInvalidPropertyTable); + EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -719,7 +719,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -770,7 +770,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( @@ -824,7 +824,7 @@ void FITwinCesiumPropertyTableSpec::Define() { "PropertyTableStatus", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableStatus( propertyTable), - ECesiumPropertyTableStatus::Valid); + EITwinCesiumPropertyTableStatus::Valid); TestEqual( "Count", UITwinCesiumPropertyTableBlueprintLibrary::GetPropertyTableCount( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTableProperty.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTableProperty.spec.cpp index 9129154..e347e7f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTableProperty.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTableProperty.spec.cpp @@ -21,7 +21,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -44,7 +44,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -66,7 +66,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -99,7 +99,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -107,8 +107,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "ValueType", @@ -118,7 +118,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Integer); + EITwinCesiumMetadataBlueprintType::Integer); TestFalse( "IsNormalized", @@ -133,7 +133,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); // Check that undefined properties return empty values FITwinCesiumMetadataValue value = @@ -180,7 +180,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -188,8 +188,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "ValueType", @@ -199,7 +199,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); TestTrue( "IsNormalized", @@ -214,7 +214,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); }); It("constructs instance for fixed-length array property", [this]() { @@ -245,7 +245,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -253,8 +253,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(size)); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, true); TestTrue( "ValueType", @@ -264,7 +264,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Array); + EITwinCesiumMetadataBlueprintType::Array); TestFalse( "IsNormalized", @@ -278,7 +278,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::Integer); + EITwinCesiumMetadataBlueprintType::Integer); }); It("constructs instance for variable-length array property", [this]() { @@ -310,7 +310,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -318,8 +318,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { size); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, true); TestTrue( "ValueType", @@ -329,7 +329,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Array); + EITwinCesiumMetadataBlueprintType::Array); TestFalse( "IsNormalized", @@ -344,7 +344,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::Integer); + EITwinCesiumMetadataBlueprintType::Integer); }); It("constructs valid instance with additional properties", [this]() { @@ -381,7 +381,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -389,8 +389,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "ValueType", @@ -400,7 +400,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Integer); + EITwinCesiumMetadataBlueprintType::Integer); TestTrue( "IsNormalized", @@ -415,7 +415,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); FITwinCesiumMetadataValue value = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetOffset(property); @@ -495,7 +495,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -503,8 +503,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, true); TestTrue( "ValueType", @@ -514,7 +514,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Array); + EITwinCesiumMetadataBlueprintType::Array); TestTrue( "IsNormalized", @@ -528,7 +528,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::Integer); + EITwinCesiumMetadataBlueprintType::Integer); FITwinCesiumMetadataValue value = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetOffset(property); @@ -665,7 +665,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestFalse( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetBoolean( @@ -690,7 +690,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -726,7 +726,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); std::vector expected{true, false, false, false, true, true, false, true}; @@ -788,7 +788,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -815,7 +815,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetByte(property, 0), @@ -841,7 +841,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -877,7 +877,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -914,7 +914,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -958,7 +958,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -994,7 +994,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetInteger(property, 0), @@ -1020,7 +1020,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1060,7 +1060,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1103,7 +1103,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1147,7 +1147,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1185,7 +1185,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetInteger64( @@ -1213,7 +1213,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1253,7 +1253,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1294,7 +1294,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1338,7 +1338,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1374,7 +1374,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetFloat( @@ -1402,7 +1402,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1438,7 +1438,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1479,7 +1479,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1528,7 +1528,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1554,7 +1554,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetFloat64( @@ -1582,7 +1582,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1622,7 +1622,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1660,7 +1660,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1721,7 +1721,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1768,7 +1768,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1794,7 +1794,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetIntPoint( @@ -1826,7 +1826,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1871,7 +1871,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1912,7 +1912,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1962,7 +1962,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -1995,7 +1995,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector2D( @@ -2027,7 +2027,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2072,7 +2072,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2114,7 +2114,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2176,7 +2176,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2226,7 +2226,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2256,7 +2256,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetIntVector( @@ -2288,7 +2288,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2333,7 +2333,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2375,7 +2375,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2430,7 +2430,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2463,7 +2463,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector3f( @@ -2495,7 +2495,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2540,7 +2540,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2582,7 +2582,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2637,7 +2637,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2667,7 +2667,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector( @@ -2699,7 +2699,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2744,7 +2744,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2786,7 +2786,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2852,7 +2852,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2902,7 +2902,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -2932,7 +2932,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetVector4( @@ -2964,7 +2964,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3009,7 +3009,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3055,7 +3055,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3126,7 +3126,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3176,7 +3176,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3207,7 +3207,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetMatrix( @@ -3249,7 +3249,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3305,7 +3305,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3368,7 +3368,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3421,7 +3421,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3471,7 +3471,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3534,7 +3534,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3585,7 +3585,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3611,7 +3611,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); FITwinCesiumPropertyArray array = UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetArray(property, 0); @@ -3652,7 +3652,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3709,7 +3709,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3726,8 +3726,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "array element type", @@ -3776,7 +3776,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3798,8 +3798,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array), static_cast(expectedArray.size())); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "element type", @@ -3849,7 +3849,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3866,8 +3866,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "array element type", @@ -3898,8 +3898,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array), static_cast(0)); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Invalid, - ECesiumMetadataComponentType::None, + EITwinCesiumMetadataType::Invalid, + EITwinCesiumMetadataComponentType::None, false); TestTrue( "array element type", @@ -3936,7 +3936,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -3953,8 +3953,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); TestTrue( "array element type", @@ -4000,7 +4000,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "PropertyTablePropertyStatus", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty); TestEqual( "Size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4035,7 +4035,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4077,7 +4077,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4085,8 +4085,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < values.size(); i++) { FITwinCesiumMetadataValue value = @@ -4127,7 +4127,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4135,8 +4135,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Float32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Float32, false); for (size_t i = 0; i < values.size(); i++) { FITwinCesiumMetadataValue value = @@ -4174,7 +4174,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4182,8 +4182,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < values.size(); i++) { FITwinCesiumMetadataValue value = @@ -4232,7 +4232,7 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { "status", UITwinCesiumPropertyTablePropertyBlueprintLibrary:: GetPropertyTablePropertyStatus(property), - ECesiumPropertyTablePropertyStatus::Valid); + EITwinCesiumPropertyTablePropertyStatus::Valid); TestEqual( "size", UITwinCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize( @@ -4240,8 +4240,8 @@ void FITwinCesiumPropertyTablePropertySpec::Define() { static_cast(values.size())); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < values.size(); i++) { FITwinCesiumMetadataValue value = diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTexture.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTexture.spec.cpp index 215c515..1d142d1 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTexture.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTexture.spec.cpp @@ -43,7 +43,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); TestTrue( "Properties", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -58,7 +58,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass); TestTrue( "Properties", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -73,7 +73,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTextureClass); TestTrue( "Properties", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -98,7 +98,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -126,7 +126,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -144,7 +144,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); const auto properties = UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties( propertyTexture); @@ -184,7 +184,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); const auto properties = UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties( @@ -199,7 +199,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(scalarProperty), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { std::string label("Property value " + std::to_string(i)); TestEqual( @@ -219,7 +219,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(vec2Property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { std::string label("Property value " + std::to_string(i)); FVector2D expected( @@ -254,7 +254,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); const auto properties = UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties( @@ -269,7 +269,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData); }); }); @@ -282,7 +282,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); const auto properties = UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties( propertyTexture); @@ -333,7 +333,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); const auto propertyNames = UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyNames( @@ -371,7 +371,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -386,7 +386,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); }); It("finds existing properties", [this]() { @@ -422,7 +422,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -437,7 +437,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(scalarProperty), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumPropertyTextureProperty vec2Property = UITwinCesiumPropertyTextureBlueprintLibrary::FindProperty( @@ -447,7 +447,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(vec2Property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); }); }); @@ -461,7 +461,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); + EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTexture); TestTrue( "Properties", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -508,7 +508,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -566,7 +566,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -663,7 +663,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -716,7 +716,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) @@ -794,7 +794,7 @@ void FITwinCesiumPropertyTextureSpec::Define() { "PropertyTextureStatus", UITwinCesiumPropertyTextureBlueprintLibrary::GetPropertyTextureStatus( propertyTexture), - ECesiumPropertyTextureStatus::Valid); + EITwinCesiumPropertyTextureStatus::Valid); TestEqual( "Property Count", UITwinCesiumPropertyTextureBlueprintLibrary::GetProperties(propertyTexture) diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTextureProperty.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTextureProperty.spec.cpp index df10de2..870b96d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTextureProperty.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumPropertyTextureProperty.spec.cpp @@ -26,7 +26,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); FITwinCesiumMetadataValueType expectedType; // Invalid type TestTrue( @@ -44,7 +44,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); FITwinCesiumMetadataValueType expectedType; // Invalid type TestTrue( @@ -61,7 +61,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData); FITwinCesiumMetadataValueType expectedType; // Invalid type TestTrue( @@ -99,11 +99,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "ValueType", @@ -113,7 +113,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); TestFalse( "IsNormalized", @@ -130,7 +130,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); // Check that undefined properties return empty values FITwinCesiumMetadataValue value = @@ -188,11 +188,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "ValueType", @@ -202,7 +202,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); TestTrue( "IsNormalized", @@ -219,7 +219,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); }); It("constructs instance for fixed-length array property", [this]() { @@ -253,11 +253,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, true); TestTrue( "ValueType", @@ -267,7 +267,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Array); + EITwinCesiumMetadataBlueprintType::Array); TestFalse( "IsNormalized", @@ -283,7 +283,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); }); It("constructs valid instance with additional properties", [this]() { @@ -330,11 +330,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType expectedType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "ValueType", @@ -344,7 +344,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "BlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetBlueprintType( property), - ECesiumMetadataBlueprintType::Byte); + EITwinCesiumMetadataBlueprintType::Byte); TestTrue( "IsNormalized", @@ -361,7 +361,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "ArrayElementBlueprintType", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetArrayElementBlueprintType(property), - ECesiumMetadataBlueprintType::None); + EITwinCesiumMetadataBlueprintType::None); FITwinCesiumMetadataValue value = UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetOffset(property); @@ -414,7 +414,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetByte( @@ -451,7 +451,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -495,7 +495,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); std::vector expected{0, 2, 0, 4}; for (size_t i = 0; i < texCoords.size(); i++) { @@ -543,7 +543,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { if (values[i] == noDataValue) { @@ -572,7 +572,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetInteger( @@ -613,7 +613,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -660,7 +660,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); std::vector expected{1, -24, 0, 2456}; for (size_t i = 0; i < texCoords.size(); i++) { @@ -711,7 +711,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { if (values[i] == noDataValue) { @@ -740,7 +740,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetFloat( @@ -781,7 +781,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -821,7 +821,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -871,7 +871,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -891,7 +891,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetFloat64( @@ -929,7 +929,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestTrue( "IsNormalized", @@ -978,7 +978,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -1025,7 +1025,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -1045,7 +1045,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetIntPoint( @@ -1087,7 +1087,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FIntPoint expected(values[i][0], values[i][1]); @@ -1136,7 +1136,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); std::vector expected{1, -24, 0, 2456}; for (size_t i = 0; i < texCoords.size(); i++) { @@ -1189,7 +1189,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FIntPoint expected; @@ -1217,7 +1217,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector2D( @@ -1260,7 +1260,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestTrue( "IsNormalized", @@ -1311,7 +1311,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -1363,7 +1363,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FVector2D expected( @@ -1388,7 +1388,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetIntVector( @@ -1430,7 +1430,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FIntVector expected(values[i][0], values[i][1], values[i][2]); @@ -1479,7 +1479,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); std::vector expected{1, -24, 0, 2456}; for (size_t i = 0; i < texCoords.size(); i++) { @@ -1535,7 +1535,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FIntVector expected; @@ -1563,7 +1563,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector( @@ -1606,7 +1606,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestTrue( "IsNormalized", @@ -1658,7 +1658,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { TestEqual( @@ -1710,7 +1710,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FVector expected( @@ -1735,7 +1735,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); TestEqual( "value", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetVector4( @@ -1778,7 +1778,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestTrue( "IsNormalized", @@ -1835,7 +1835,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { glm::dvec4 expected( @@ -1893,7 +1893,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); for (size_t i = 0; i < texCoords.size(); i++) { FVector4 expected( @@ -1946,7 +1946,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumPropertyArray array = UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArray( @@ -1969,7 +1969,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); FITwinCesiumPropertyArray array = UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArray( @@ -2016,7 +2016,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestEqual( "ArraySize", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArraySize( @@ -2031,8 +2031,8 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "array element type", @@ -2084,7 +2084,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestEqual( "ArraySize", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArraySize( @@ -2099,8 +2099,8 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "array element type", @@ -2131,8 +2131,8 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array), static_cast(0)); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Invalid, - ECesiumMetadataComponentType::None, + EITwinCesiumMetadataType::Invalid, + EITwinCesiumMetadataComponentType::None, false); TestTrue( "array element type", @@ -2172,7 +2172,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); TestEqual( "ArraySize", UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetArraySize( @@ -2187,8 +2187,8 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { int64 arraySize = UITwinCesiumPropertyArrayBlueprintLibrary::GetSize(array); TestEqual("array size", arraySize, *classProperty.count); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Uint8, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Uint8, false); TestTrue( "array element type", @@ -2234,7 +2234,7 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "PropertyTexturePropertyStatus", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); + EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty); FITwinCesiumMetadataValue value = UITwinCesiumPropertyTexturePropertyBlueprintLibrary::GetValue( @@ -2279,11 +2279,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < texCoords.size(); i++) { FITwinCesiumMetadataValue value = @@ -2339,11 +2339,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Float32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Float32, false); for (size_t i = 0; i < texCoords.size(); i++) { FITwinCesiumMetadataValue value = @@ -2396,11 +2396,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < texCoords.size(); i++) { FITwinCesiumMetadataValue value = @@ -2464,11 +2464,11 @@ void FITwinCesiumPropertyTexturePropertySpec::Define() { "status", UITwinCesiumPropertyTexturePropertyBlueprintLibrary:: GetPropertyTexturePropertyStatus(property), - ECesiumPropertyTexturePropertyStatus::Valid); + EITwinCesiumPropertyTexturePropertyStatus::Valid); FITwinCesiumMetadataValueType valueType( - ECesiumMetadataType::Scalar, - ECesiumMetadataComponentType::Int32, + EITwinCesiumMetadataType::Scalar, + EITwinCesiumMetadataComponentType::Int32, false); for (size_t i = 0; i < texCoords.size(); i++) { FITwinCesiumMetadataValue value = diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumSceneGeneration.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumSceneGeneration.cpp index 421242d..7ebedff 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumSceneGeneration.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumSceneGeneration.cpp @@ -77,23 +77,23 @@ bool SceneGenerationContext::areTilesetsDoneLoading() { } void SceneGenerationContext::trackForPlay() { - CesiumTestHelpers::trackForPlay(sunSky); - CesiumTestHelpers::trackForPlay(georeference); - CesiumTestHelpers::trackForPlay(pawn); + ITwinCesiumTestHelpers::trackForPlay(sunSky); + ITwinCesiumTestHelpers::trackForPlay(georeference); + ITwinCesiumTestHelpers::trackForPlay(pawn); std::vector::iterator it; for (it = tilesets.begin(); it != tilesets.end(); ++it) { AITwinCesium3DTileset* tileset = *it; - CesiumTestHelpers::trackForPlay(tileset); + ITwinCesiumTestHelpers::trackForPlay(tileset); } } void SceneGenerationContext::initForPlay( SceneGenerationContext& creationContext) { world = GEditor->PlayWorld; - sunSky = CesiumTestHelpers::findInPlay(creationContext.sunSky); - georeference = CesiumTestHelpers::findInPlay(creationContext.georeference); - pawn = CesiumTestHelpers::findInPlay(creationContext.pawn); + sunSky = ITwinCesiumTestHelpers::findInPlay(creationContext.sunSky); + georeference = ITwinCesiumTestHelpers::findInPlay(creationContext.georeference); + pawn = ITwinCesiumTestHelpers::findInPlay(creationContext.pawn); startPosition = creationContext.startPosition; startRotation = creationContext.startRotation; @@ -105,7 +105,7 @@ void SceneGenerationContext::initForPlay( std::vector::iterator it; for (it = creationTilesets.begin(); it != creationTilesets.end(); ++it) { AITwinCesium3DTileset* creationTileset = *it; - AITwinCesium3DTileset* tileset = CesiumTestHelpers::findInPlay(creationTileset); + AITwinCesium3DTileset* tileset = ITwinCesiumTestHelpers::findInPlay(creationTileset); tilesets.push_back(tileset); } } diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.cpp index 21424ec..a757b30 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.cpp @@ -4,7 +4,7 @@ #include "ITwinCesiumGeoreference.h" #include "Engine/Engine.h" -namespace CesiumTestHelpers { +namespace ITwinCesiumTestHelpers { UWorld* getGlobalWorldContext() { const TIndirectArray& worldContexts = @@ -72,4 +72,4 @@ void trackForPlay(UActorComponent* pEditorComponent) { pEditorComponent->ComponentTags.Add(getUniqueTag(pEditorComponent)); } -} // namespace CesiumTestHelpers +} // namespace ITwinCesiumTestHelpers diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.h index 50322b2..aa7ade6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinCesiumTestHelpers.h @@ -16,7 +16,7 @@ class UWorld; class AITwinCesiumGeoreference; -namespace CesiumTestHelpers { +namespace ITwinCesiumTestHelpers { UWorld* getGlobalWorldContext(); @@ -45,7 +45,7 @@ void waitForImpl( } else if (pWorld->GetTimerManager().GetTimerRemaining(timerHandle) <= 0.0f) { // Timeout UE_LOG( - LogCesium, + LogITwinCesium, Error, TEXT("Timed out waiting for a condition to become true.")); pWorld->GetTimerManager().ClearTimer(timerHandle); @@ -197,4 +197,4 @@ template T* findInPlay(TObjectPtr pEditorObject) { #endif // #if WITH_EDITOR -} // namespace CesiumTestHelpers +} // namespace ITwinCesiumTestHelpers diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGeoTransforms.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGeoTransforms.spec.cpp index d2d6686..76966ee 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGeoTransforms.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGeoTransforms.spec.cpp @@ -9,13 +9,13 @@ using namespace CesiumGeospatial; using namespace CesiumUtility; BEGIN_DEFINE_SPEC( - FGeoTransformsSpec, + FITwinGeoTransformsSpec, "Cesium.Unit.GeoTransforms", EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter) -END_DEFINE_SPEC(FGeoTransformsSpec) +END_DEFINE_SPEC(FITwinGeoTransformsSpec) -void FGeoTransformsSpec::Define() { +void FITwinGeoTransformsSpec::Define() { Describe("TransformLongitudeLatitudeHeightToUnreal", [this]() { It("returns the origin when given the origin LLH", [this]() { ITwinGeoTransforms geotransforms{}; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGlobeAwareDefaultPawn.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGlobeAwareDefaultPawn.spec.cpp index 9522219..ceae425 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGlobeAwareDefaultPawn.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGlobeAwareDefaultPawn.spec.cpp @@ -40,7 +40,7 @@ void FGlobeAwareDefaultPawnSpec::Define() { FTransform::Identity, false)); pFlyTo->RotationToUse = - ECesiumFlyToRotation::ControlRotationInEastSouthUp; + EITwinCesiumFlyToRotation::ControlRotationInEastSouthUp; subscriptionPostPIEStarted = FEditorDelegates::PostPIEStarted.AddLambda( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGoogle3dTilesLoadTest.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGoogle3dTilesLoadTest.cpp index e3d5ab0..95659dc 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGoogle3dTilesLoadTest.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinGoogle3dTilesLoadTest.cpp @@ -69,7 +69,7 @@ void setupForPompidou(SceneGenerationContext& context) { context.sunSky->UpdateSun(); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel(TEXT("Center Pompidou, Paris, France")); @@ -87,7 +87,7 @@ void setupForChrysler(SceneGenerationContext& context) { context.sunSky->UpdateSun(); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel(TEXT("Chrysler Building, NYC")); @@ -105,7 +105,7 @@ void setupForGuggenheim(SceneGenerationContext& context) { context.sunSky->UpdateSun(); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel(TEXT("Guggenheim Museum, Bilbao, Spain")); @@ -123,7 +123,7 @@ void setupForDeathValley(SceneGenerationContext& context) { context.sunSky->UpdateSun(); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel( @@ -142,7 +142,7 @@ void setupForTokyo(SceneGenerationContext& context) { context.sunSky->UpdateSun(); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel(TEXT("Tokyo Tower, Tokyo, Japan")); @@ -157,7 +157,7 @@ void setupForGoogleplex(SceneGenerationContext& context) { 90.0f); AITwinCesium3DTileset* tileset = context.world->SpawnActor(); - tileset->SetTilesetSource(ETilesetSource::FromCesiumIon); + tileset->SetTilesetSource(EITwinTilesetSource::FromCesiumIon); tileset->SetIonAssetID(2275207); tileset->SetIonAccessToken(SceneGenerationContext::testIonToken); tileset->SetActorLabel(TEXT("Google Photorealistic 3D Tiles")); @@ -248,7 +248,7 @@ bool FGoogleTilesMaxTileLoads::RunTest(const FString& Parameters) { SceneGenerationContext& context, TestPass::TestingParameter parameter) { std::shared_ptr pCacheDatabase = - getCacheDatabase(); + ITwinCesium::getCacheDatabase(); pCacheDatabase->clearAll(); int maxLoadsTarget = std::get(parameter); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinSubLevels.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinSubLevels.spec.cpp index 1397f85..e51537f 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinSubLevels.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinSubLevels.spec.cpp @@ -35,7 +35,7 @@ FDelegateHandle subscriptionPostPIEStarted; END_DEFINE_SPEC(FSubLevelsSpec) -using namespace CesiumTestHelpers; +using namespace ITwinCesiumTestHelpers; void FSubLevelsSpec::Define() { BeforeEach([this]() { diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealAssetAccessor.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealAssetAccessor.spec.cpp index 3fcaed3..a74bc8e 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealAssetAccessor.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealAssetAccessor.spec.cpp @@ -8,7 +8,7 @@ #include "ITwinUnrealAssetAccessor.h" BEGIN_DEFINE_SPEC( - FUnrealAssetAccessorSpec, + FITwinUnrealAssetAccessorSpec, "Cesium.Unit.UnrealAssetAccessor", EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter) @@ -21,7 +21,7 @@ void TestAccessorRequest(const FString& Uri, const std::string& expectedData) { bool done = false; ITwinUnrealAssetAccessor accessor{}; - accessor.get(getAsyncSystem(), TCHAR_TO_UTF8(*Uri), {}) + accessor.get(ITwinCesium::getAsyncSystem(), TCHAR_TO_UTF8(*Uri), {}) .thenInMainThread( [&](std::shared_ptr&& pRequest) { const CesiumAsync::IAssetResponse* Response = pRequest->response(); @@ -40,13 +40,13 @@ void TestAccessorRequest(const FString& Uri, const std::string& expectedData) { while (!done) { accessor.tick(); - getAsyncSystem().dispatchMainThreadTasks(); + ITwinCesium::getAsyncSystem().dispatchMainThreadTasks(); } } -END_DEFINE_SPEC(FUnrealAssetAccessorSpec) +END_DEFINE_SPEC(FITwinUnrealAssetAccessorSpec) -void FUnrealAssetAccessorSpec::Define() { +void FITwinUnrealAssetAccessorSpec::Define() { BeforeEach([this]() { Filename = FPaths::ConvertRelativePathToFull( FPaths::CreateTempFilename(*FPaths::ProjectSavedDir())); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealMetadataConversions.spec.cpp b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealMetadataConversions.spec.cpp index 6b1a7ad..9c83963 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealMetadataConversions.spec.cpp +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Private/Tests/ITwinUnrealMetadataConversions.spec.cpp @@ -7,19 +7,19 @@ using namespace CesiumGltf; BEGIN_DEFINE_SPEC( - FUnrealMetadataConversionsSpec, + FITwinUnrealMetadataConversionsSpec, "Cesium.Unit.MetadataConversions", EAutomationTestFlags::ApplicationContextMask | EAutomationTestFlags::ProductFilter) -END_DEFINE_SPEC(FUnrealMetadataConversionsSpec) +END_DEFINE_SPEC(FITwinUnrealMetadataConversionsSpec) -void FUnrealMetadataConversionsSpec::Define() { +void FITwinUnrealMetadataConversionsSpec::Define() { Describe("FIntPoint", [this]() { It("converts from glm::ivec2", [this]() { TestEqual( "value", - UnrealMetadataConversions::toIntPoint(glm::ivec2(-1, 2)), + FITwinUnrealMetadataConversions::toIntPoint(glm::ivec2(-1, 2)), FIntPoint(-1, 2)); }); @@ -27,7 +27,7 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2"); TestEqual( "value", - UnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), + FITwinUnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), FIntPoint(1, 2)); }); @@ -35,13 +35,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1"); TestEqual( "partial input", - UnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), + FITwinUnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), FIntPoint(0)); str = std::string_view("R=0.5 G=0.5"); TestEqual( "bad format", - UnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), + FITwinUnrealMetadataConversions::toIntPoint(str, FIntPoint(0)), FIntPoint(0)); }); }); @@ -50,7 +50,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from glm::dvec2", [this]() { TestEqual( "value", - UnrealMetadataConversions::toVector2D(glm::dvec2(-1.0, 2.0)), + FITwinUnrealMetadataConversions::toVector2D(glm::dvec2(-1.0, 2.0)), FVector2D(-1.0, 2.0)); }); @@ -58,7 +58,7 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1.5 Y=2.5"); TestEqual( "value", - UnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), + FITwinUnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), FVector2D(1.5, 2.5)); }); @@ -66,13 +66,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1"); TestEqual( "partial input", - UnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), + FITwinUnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), FVector2D::Zero()); str = std::string_view("R=0.5 G=0.5"); TestEqual( "bad format", - UnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), + FITwinUnrealMetadataConversions::toVector2D(str, FVector2D::Zero()), FVector2D::Zero()); }); }); @@ -81,7 +81,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from glm::ivec3", [this]() { TestEqual( "value", - UnrealMetadataConversions::toIntVector(glm::ivec3(-1, 2, 4)), + FITwinUnrealMetadataConversions::toIntVector(glm::ivec3(-1, 2, 4)), FIntVector(-1, 2, 4)); }); @@ -89,7 +89,7 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2 Z=4"); TestEqual( "value", - UnrealMetadataConversions::toIntVector(str, FIntVector(0)), + FITwinUnrealMetadataConversions::toIntVector(str, FIntVector(0)), FIntVector(1, 2, 4)); }); @@ -97,13 +97,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2"); TestEqual( "partial input", - UnrealMetadataConversions::toIntVector(str, FIntVector(0)), + FITwinUnrealMetadataConversions::toIntVector(str, FIntVector(0)), FIntVector(0)); str = std::string_view("R=0.5 G=0.5 B=1"); TestEqual( "bad format", - UnrealMetadataConversions::toIntVector(str, FIntVector(0)), + FITwinUnrealMetadataConversions::toIntVector(str, FIntVector(0)), FIntVector(0)); }); }); @@ -112,7 +112,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from glm::vec3", [this]() { TestEqual( "value", - UnrealMetadataConversions::toVector3f(glm::vec3(1.0f, 2.3f, 4.56f)), + FITwinUnrealMetadataConversions::toVector3f(glm::vec3(1.0f, 2.3f, 4.56f)), FVector3f(1.0f, 2.3f, 4.56f)); }); @@ -120,7 +120,7 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2 Z=3"); TestEqual( "value", - UnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), + FITwinUnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), FVector3f(1.0f, 2.0f, 3.0f)); }); @@ -128,13 +128,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2"); TestEqual( "partial input", - UnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), + FITwinUnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), FVector3f(0.0f)); str = std::string_view("R=0.5 G=0.5 B=0.5"); TestEqual( "bad format", - UnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), + FITwinUnrealMetadataConversions ::toVector3f(str, FVector3f::Zero()), FVector3f(0.0f)); }); }); @@ -143,7 +143,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from glm::dvec3", [this]() { TestEqual( "value", - UnrealMetadataConversions::toVector(glm::dvec3(1.0, 2.3, 4.56)), + FITwinUnrealMetadataConversions::toVector(glm::dvec3(1.0, 2.3, 4.56)), FVector(1.0, 2.3, 4.56)); }); @@ -151,7 +151,7 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1.5 Y=2.5 Z=3.5"); TestEqual( "value", - UnrealMetadataConversions::toVector(str, FVector::Zero()), + FITwinUnrealMetadataConversions::toVector(str, FVector::Zero()), FVector(1.5f, 2.5f, 3.5f)); }); @@ -159,13 +159,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2"); TestEqual( "partial input", - UnrealMetadataConversions::toVector(str, FVector::Zero()), + FITwinUnrealMetadataConversions::toVector(str, FVector::Zero()), FVector::Zero()); str = std::string_view("R=0.5 G=0.5 B=0.5"); TestEqual( "bad format", - UnrealMetadataConversions::toVector(str, FVector::Zero()), + FITwinUnrealMetadataConversions::toVector(str, FVector::Zero()), FVector::Zero()); }); }); @@ -174,7 +174,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from glm::dvec4", [this]() { TestEqual( "value", - UnrealMetadataConversions::toVector4( + FITwinUnrealMetadataConversions::toVector4( glm::dvec4(1.0, 2.3, 4.56, 7.89)), FVector4(1.0, 2.3, 4.56, 7.89)); }); @@ -183,13 +183,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1.5 Y=2.5 Z=3.5 W=4.5"); TestEqual( "with W component", - UnrealMetadataConversions::toVector4(str, FVector4::Zero()), + FITwinUnrealMetadataConversions::toVector4(str, FVector4::Zero()), FVector4(1.5, 2.5, 3.5, 4.5)); str = std::string_view("X=1.5 Y=2.5 Z=3.5"); TestEqual( "without W component", - UnrealMetadataConversions::toVector4(str, FVector4::Zero()), + FITwinUnrealMetadataConversions::toVector4(str, FVector4::Zero()), FVector4(1.5, 2.5, 3.5, 1.0)); }); @@ -197,13 +197,13 @@ void FUnrealMetadataConversionsSpec::Define() { std::string_view str("X=1 Y=2"); TestEqual( "partial input", - UnrealMetadataConversions::toVector4(str, FVector4::Zero()), + FITwinUnrealMetadataConversions::toVector4(str, FVector4::Zero()), FVector4::Zero()); str = std::string_view("R=0.5 G=0.5 B=0.5 A=1.0"); TestEqual( "bad format", - UnrealMetadataConversions::toVector4(str, FVector4::Zero()), + FITwinUnrealMetadataConversions::toVector4(str, FVector4::Zero()), FVector4::Zero()); }); }); @@ -224,7 +224,7 @@ void FUnrealMetadataConversionsSpec::Define() { FPlane4d(5.0, 6.0, 7.0, 8.0), FPlane4d(0.0, 1.0, 0.0, 1.0), FPlane4d(1.0, 0.0, 0.0, 1.0)); - TestEqual("value", UnrealMetadataConversions::toMatrix(input), expected); + TestEqual("value", FITwinUnrealMetadataConversions::toMatrix(input), expected); }); }); @@ -232,7 +232,7 @@ void FUnrealMetadataConversionsSpec::Define() { It("converts from std::string_view", [this]() { TestEqual( "std::string_view", - UnrealMetadataConversions::toString(std::string_view("Hello")), + FITwinUnrealMetadataConversions::toString(std::string_view("Hello")), FString("Hello")); }); @@ -240,21 +240,21 @@ void FUnrealMetadataConversionsSpec::Define() { std::string expected("X=1 Y=2"); TestEqual( "vec2", - UnrealMetadataConversions::toString(glm::u8vec2(1, 2)), + FITwinUnrealMetadataConversions::toString(glm::u8vec2(1, 2)), FString(expected.c_str())); expected = "X=" + std::to_string(4.5f) + " Y=" + std::to_string(3.21f) + " Z=" + std::to_string(123.0f); TestEqual( "vec3", - UnrealMetadataConversions::toString(glm::vec3(4.5f, 3.21f, 123.0f)), + FITwinUnrealMetadataConversions::toString(glm::vec3(4.5f, 3.21f, 123.0f)), FString(expected.c_str())); expected = "X=" + std::to_string(1.0f) + " Y=" + std::to_string(2.0f) + " Z=" + std::to_string(3.0f) + " W=" + std::to_string(4.0f); TestEqual( "vec4", - UnrealMetadataConversions::toString( + FITwinUnrealMetadataConversions::toString( glm::vec4(1.0f, 2.0f, 3.0f, 4.0f)), FString(expected.c_str())); }); @@ -272,7 +272,7 @@ void FUnrealMetadataConversionsSpec::Define() { // clang-format on TestEqual( "mat2", - UnrealMetadataConversions::toString(mat2), + FITwinUnrealMetadataConversions::toString(mat2), FString(expected.c_str())); // This is written as transposed because glm::transpose only compiles for @@ -287,7 +287,7 @@ void FUnrealMetadataConversionsSpec::Define() { expected = "[-1 2 3] [4 -5 6] [7 8 -9]"; TestEqual( "mat3", - UnrealMetadataConversions::toString(mat3), + FITwinUnrealMetadataConversions::toString(mat3), FString(expected.c_str())); // This is written as transposed because glm::transpose only compiles for @@ -303,7 +303,7 @@ void FUnrealMetadataConversionsSpec::Define() { expected = "[0 1 2 3] [4 5 6 7] [8 9 10 11] [12 13 14 15]"; TestEqual( "mat4", - UnrealMetadataConversions::toString(mat4), + FITwinUnrealMetadataConversions::toString(mat4), FString(expected.c_str())); }); }); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTileset.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTileset.h index 35d58e8..7116442 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTileset.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTileset.h @@ -30,7 +30,7 @@ class UMaterialInterface; class AITwinCesiumCartographicSelection; class AITwinCesiumCameraManager; class UITwinCesiumBoundingVolumePoolComponent; -class CesiumViewExtension; +class FITwinCesiumViewExtension; struct FITwinCesiumCamera; class ICesiumMeshBuildCallbacks; @@ -52,13 +52,13 @@ DECLARE_MULTICAST_DELEGATE_OneParam( * The delegate for the Acesium3DTileset::OnTilesetLoaded, * which is triggered from UpdateLoadStatus */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompletedLoadTrigger); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FITwinCompletedLoadTrigger); ITWINCESIUMRUNTIME_API extern FITwinCesium3DTilesetLoadFailure OnCesium3DTilesetLoadFailure; UENUM(BlueprintType) -enum class ETilesetSource : uint8 { +enum class EITwinTilesetSource : uint8 { /** * The tileset will be loaded from Cesium Ion using the provided IonAssetID * and IonAccessToken. @@ -72,7 +72,7 @@ enum class ETilesetSource : uint8 { }; UENUM(BlueprintType) -enum class EApplyDpiScaling : uint8 { Yes, No, UseProjectDefault }; +enum class EITwinApplyDpiScaling : uint8 { Yes, No, UseProjectDefault }; UCLASS() class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { @@ -243,7 +243,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { * The custom view extension this tileset uses to pull renderer view * information. */ - TSharedPtr _cesiumViewExtension = + TSharedPtr _cesiumViewExtension = nullptr; public: @@ -335,7 +335,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { EditAnywhere, BlueprintReadWrite, Category = "Cesium|Level of Detail") - EApplyDpiScaling ApplyDpiScaling = EApplyDpiScaling::UseProjectDefault; + EITwinApplyDpiScaling ApplyDpiScaling = EITwinApplyDpiScaling::UseProjectDefault; /** * Whether to preload ancestor tiles. @@ -614,7 +614,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { * A delegate that will be called whenever the tileset is fully loaded. */ UPROPERTY(BlueprintAssignable, Category = "Cesium"); - FCompletedLoadTrigger OnTilesetLoaded; + FITwinCompletedLoadTrigger OnTilesetLoaded; /** * Use a dithering effect when transitioning between tiles of different LODs. @@ -655,7 +655,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { BlueprintSetter = SetTilesetSource, Category = "Cesium", meta = (DisplayName = "Source")) - ETilesetSource TilesetSource = ETilesetSource::FromCesiumIon; + EITwinTilesetSource TilesetSource = EITwinTilesetSource::FromCesiumIon; /** * The URL of this tileset's "tileset.json" file. @@ -667,7 +667,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { BlueprintGetter = GetUrl, BlueprintSetter = SetUrl, Category = "Cesium", - meta = (EditCondition = "TilesetSource==ETilesetSource::FromUrl")) + meta = (EditCondition = "TilesetSource==EITwinTilesetSource::FromUrl")) FString Url = ""; /** @@ -681,7 +681,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { BlueprintSetter = SetIonAssetID, Category = "Cesium", meta = - (EditCondition = "TilesetSource==ETilesetSource::FromCesiumIon", + (EditCondition = "TilesetSource==EITwinTilesetSource::FromCesiumIon", ClampMin = 0)) int64 IonAssetID; @@ -693,7 +693,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { BlueprintGetter = GetIonAccessToken, BlueprintSetter = SetIonAccessToken, Category = "Cesium", - meta = (EditCondition = "TilesetSource==ETilesetSource::FromCesiumIon")) + meta = (EditCondition = "TilesetSource==EITwinTilesetSource::FromCesiumIon")) FString IonAccessToken; UPROPERTY( @@ -711,7 +711,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { BlueprintSetter = SetCesiumIonServer, Category = "Cesium", AdvancedDisplay, - meta = (EditCondition = "TilesetSource==ETilesetSource::FromCesiumIon")) + meta = (EditCondition = "TilesetSource==EITwinTilesetSource::FromCesiumIon")) UITwinCesiumIonServer* CesiumIonServer; /** @@ -911,10 +911,10 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { void SetUseLodTransitions(bool InUseLodTransitions); UFUNCTION(BlueprintGetter, Category = "Cesium") - ETilesetSource GetTilesetSource() const { return TilesetSource; } + EITwinTilesetSource GetTilesetSource() const { return TilesetSource; } UFUNCTION(BlueprintSetter, Category = "Cesium") - void SetTilesetSource(ETilesetSource InSource); + void SetTilesetSource(EITwinTilesetSource InSource); UFUNCTION(BlueprintGetter, Category = "Cesium") FString GetUrl() const { return Url; } @@ -1204,7 +1204,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesium3DTileset : public AActor { _featuresMetadataDescription; PRAGMA_DISABLE_DEPRECATION_WARNINGS - std::optional _metadataDescription_DEPRECATED; + std::optional _metadataDescription_DEPRECATED; PRAGMA_ENABLE_DEPRECATION_WARNINGS // For debug output diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTilesetLoadFailureDetails.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTilesetLoadFailureDetails.h index f2e18d3..5d02a64 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTilesetLoadFailureDetails.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesium3DTilesetLoadFailureDetails.h @@ -8,7 +8,7 @@ class AITwinCesium3DTileset; UENUM(BlueprintType) -enum class ECesium3DTilesetLoadType : uint8 { +enum class EITwinCesium3DTilesetLoadType : uint8 { /** * An unknown load error. */ @@ -39,7 +39,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesium3DTilesetLoadFailureDetails { * The type of request that failed to load. */ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium") - ECesium3DTilesetLoadType Type = ECesium3DTilesetLoadType::Unknown; + EITwinCesium3DTilesetLoadType Type = EITwinCesium3DTilesetLoadType::Unknown; /** * The HTTP status code of the response that led to the failure. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumBingMapsRasterOverlay.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumBingMapsRasterOverlay.h index 8a79696..b96807e 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumBingMapsRasterOverlay.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumBingMapsRasterOverlay.h @@ -7,7 +7,7 @@ #include "ITwinCesiumBingMapsRasterOverlay.generated.h" UENUM(BlueprintType) -enum class EBingMapsStyle : uint8 { +enum class EITwinBingMapsStyle : uint8 { Aerial UMETA(DisplayName = "Aerial"), AerialWithLabelsOnDemand UMETA(DisplayName = "Aerial with Labels"), RoadOnDemand UMETA(DisplayName = "Road"), @@ -38,7 +38,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumBingMapsRasterOverlay * The map style to use. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") - EBingMapsStyle MapStyle = EBingMapsStyle::Aerial; + EITwinBingMapsStyle MapStyle = EITwinBingMapsStyle::Aerial; protected: virtual std::unique_ptr CreateOverlay( diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumEncodedMetadataComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumEncodedMetadataComponent.h index 45ffdb6..c62a86c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumEncodedMetadataComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumEncodedMetadataComponent.h @@ -20,7 +20,7 @@ PRAGMA_DISABLE_DEPRECATION_WARNINGS * */ UENUM() -enum class ECesiumPropertyComponentType_DEPRECATED : uint8 { +enum class EITwinCesiumPropertyComponentType_DEPRECATED : uint8 { Uint8_DEPRECATED, Float_DEPRECATED }; @@ -29,7 +29,7 @@ enum class ECesiumPropertyComponentType_DEPRECATED : uint8 { * @brief The property type. */ UENUM() -enum class ECesiumPropertyType_DEPRECATED : uint8 { +enum class EITwinCesiumPropertyType_DEPRECATED : uint8 { Scalar_DEPRECATED, Vec2_DEPRECATED, Vec3_DEPRECATED, @@ -41,7 +41,7 @@ enum class ECesiumPropertyType_DEPRECATED : uint8 { * id textures, feature id attributes, mixed, or neither. */ UENUM() -enum class ECesiumFeatureTableAccessType_DEPRECATED : uint8 { +enum class EITwinCesiumFeatureTableAccessType_DEPRECATED : uint8 { Unknown_DEPRECATED, Texture_DEPRECATED, Attribute_DEPRECATED, @@ -55,15 +55,15 @@ enum class ECesiumFeatureTableAccessType_DEPRECATED : uint8 { struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FPropertyDescription; + "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinPropertyDescription; /** * @brief Description of a feature table property that should be encoded for * access on the GPU. */ USTRUCT() -struct ITWINCESIUMRUNTIME_API FPropertyDescription { +struct ITWINCESIUMRUNTIME_API FITwinPropertyDescription { GENERATED_USTRUCT_BODY() /** @@ -78,15 +78,15 @@ struct ITWINCESIUMRUNTIME_API FPropertyDescription { * */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumPropertyComponentType_DEPRECATED ComponentType = - ECesiumPropertyComponentType_DEPRECATED::Float_DEPRECATED; + EITwinCesiumPropertyComponentType_DEPRECATED ComponentType = + EITwinCesiumPropertyComponentType_DEPRECATED::Float_DEPRECATED; /** * @brief The property type. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumPropertyType_DEPRECATED Type = - ECesiumPropertyType_DEPRECATED::Scalar_DEPRECATED; + EITwinCesiumPropertyType_DEPRECATED Type = + EITwinCesiumPropertyType_DEPRECATED::Scalar_DEPRECATED; /** * @brief If ComponentType==Uint8, this indicates whether to normalize into a @@ -97,21 +97,21 @@ struct ITWINCESIUMRUNTIME_API FPropertyDescription { Category = "Cesium", Meta = (EditCondition = - "ComponentType==ECesiumPropertyComponentType_DEPRECATED::Uint8_DEPRECATED")) + "ComponentType==EITwinCesiumPropertyComponentType_DEPRECATED::Uint8_DEPRECATED")) bool Normalized = false; }; struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FFeatureTableDescription; + "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinFeatureTableDescription; /** * @brief Description of a feature table containing properties to be encoded * for access on the GPU. */ USTRUCT() -struct ITWINCESIUMRUNTIME_API FFeatureTableDescription { +struct ITWINCESIUMRUNTIME_API FITwinFeatureTableDescription { GENERATED_USTRUCT_BODY() /** @@ -126,8 +126,8 @@ struct ITWINCESIUMRUNTIME_API FFeatureTableDescription { * id textures, feature id attributes, mixed, or neither. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumFeatureTableAccessType_DEPRECATED AccessType = - ECesiumFeatureTableAccessType_DEPRECATED::Unknown_DEPRECATED; + EITwinCesiumFeatureTableAccessType_DEPRECATED AccessType = + EITwinCesiumFeatureTableAccessType_DEPRECATED::Unknown_DEPRECATED; /** * @brief If the AccessType==Texture, this string represents the channel of @@ -138,27 +138,27 @@ struct ITWINCESIUMRUNTIME_API FFeatureTableDescription { Category = "Cesium", Meta = (EditCondition = - "AccessType==ECesiumFeatureTableAccessType_DEPRECATED::Texture_DEPRECATED")) + "AccessType==EITwinCesiumFeatureTableAccessType_DEPRECATED::Texture_DEPRECATED")) FString Channel; /** * @brief Descriptions of the properties to upload to the GPU. */ UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name")) - TArray Properties; + TArray Properties; }; struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FFeatureTexturePropertyDescription; + "CesiumEncodedMetadataComponent and its related properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinFeatureTexturePropertyDescription; /** * @brief Description of a feature texture property that should be uploaded to * the GPU. */ USTRUCT() -struct ITWINCESIUMRUNTIME_API FFeatureTexturePropertyDescription { +struct ITWINCESIUMRUNTIME_API FITwinFeatureTexturePropertyDescription { GENERATED_USTRUCT_BODY() /** @@ -171,15 +171,15 @@ struct ITWINCESIUMRUNTIME_API FFeatureTexturePropertyDescription { // For now, always assumes it is Uint8 /* UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumPropertyComponentType ComponentType = - ECesiumPropertyComponentType::Uint8;*/ + EITwinCesiumPropertyComponentType ComponentType = + EITwinCesiumPropertyComponentType::Uint8;*/ /** * @brief The property type. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumPropertyType_DEPRECATED Type = - ECesiumPropertyType_DEPRECATED::Scalar_DEPRECATED; + EITwinCesiumPropertyType_DEPRECATED Type = + EITwinCesiumPropertyType_DEPRECATED::Scalar_DEPRECATED; /** * @brief If ComponentType==Uint8, this indicates whether to normalize into a @@ -199,15 +199,15 @@ struct ITWINCESIUMRUNTIME_API FFeatureTexturePropertyDescription { struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FFeatureTextureDescription; + "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinFeatureTextureDescription; /** * @brief Description of a feature texture with properties that should be * uploaded to the GPU. */ USTRUCT() -struct ITWINCESIUMRUNTIME_API FFeatureTextureDescription { +struct ITWINCESIUMRUNTIME_API FITwinFeatureTextureDescription { GENERATED_USTRUCT_BODY() /** @@ -220,25 +220,25 @@ struct ITWINCESIUMRUNTIME_API FFeatureTextureDescription { * @brief Descriptions of the properties to upload to the GPU. */ UPROPERTY(EditAnywhere, Category = "Cesium", Meta = (TitleProperty = "Name")) - TArray Properties; + TArray Properties; }; struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FMetadataDescription; + "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinMetadataDescription; struct UE_DEPRECATED( 5.0, - "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use CesiumEncodedFeaturesMetadata instead.") - FMetadataDescription; + "CesiumEncodedMetadataComponent and its related description properties have been deprecated. Use ITwinCesiumEncodedFeaturesMetadata instead.") + FITwinMetadataDescription; /** * @brief Description of metadata from a glTF that should be uploaded to the * GPU for access in materials. */ USTRUCT() -struct ITWINCESIUMRUNTIME_API FMetadataDescription { +struct ITWINCESIUMRUNTIME_API FITwinMetadataDescription { GENERATED_USTRUCT_BODY() /** @@ -248,7 +248,7 @@ struct ITWINCESIUMRUNTIME_API FMetadataDescription { EditAnywhere, Category = "EncodeMetadata", Meta = (TitleProperty = "Name")) - TArray FeatureTables; + TArray FeatureTables; /** * @brief Descriptions of feature textures to upload to the GPU. @@ -257,7 +257,7 @@ struct ITWINCESIUMRUNTIME_API FMetadataDescription { EditAnywhere, Category = "EncodeMetadata", Meta = (TitleProperty = "Name")) - TArray FeatureTextures; + TArray FeatureTextures; }; /** @@ -269,7 +269,7 @@ struct ITWINCESIUMRUNTIME_API FMetadataDescription { * auto-generated using the "Generate Material" button. */ UCLASS(Deprecated) -class ITWINCESIUMRUNTIME_API UDEPRECATED_CesiumEncodedMetadataComponent +class ITWINCESIUMRUNTIME_API UDEPRECATED_ITwinCesiumEncodedMetadataComponent : public UActorComponent { GENERATED_BODY() @@ -293,7 +293,7 @@ class ITWINCESIUMRUNTIME_API UDEPRECATED_CesiumEncodedMetadataComponent #endif // Note: Here, we avoid wrapping the feature tables and feature textures - // inside a FMetadataDescription to avoid further complicating the details + // inside a FITwinMetadataDescription to avoid further complicating the details // panel UI for editing the hierarchy. /** @@ -307,7 +307,7 @@ class ITWINCESIUMRUNTIME_API UDEPRECATED_CesiumEncodedMetadataComponent DeprecatedProperty, DeprecationMessage = "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead.")) - TArray FeatureTables; + TArray FeatureTables; /** * @brief Descriptions of feature textures to upload to the GPU. @@ -320,7 +320,7 @@ class ITWINCESIUMRUNTIME_API UDEPRECATED_CesiumEncodedMetadataComponent DeprecatedProperty, DeprecationMessage = "CesiumEncodedMetadataComponent is deprecated. Use CesiumFeaturesMetadataComponent instead.")) - TArray FeatureTextures; + TArray FeatureTextures; // virtual void Serialize(FArchive& Ar) override; }; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdAttribute.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdAttribute.h index 361c4c1..8f1082d 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdAttribute.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdAttribute.h @@ -16,7 +16,7 @@ struct Accessor; * attribute cannot be accessed, this briefly indicates why. */ UENUM(BlueprintType) -enum class ECesiumFeatureIdAttributeStatus : uint8 { +enum class EITwinCesiumFeatureIdAttributeStatus : uint8 { /* The feature ID attribute is valid. */ Valid = 0, /* The feature ID attribute does not exist in the glTF primitive. */ @@ -42,7 +42,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdAttribute { * attribute. */ FITwinCesiumFeatureIdAttribute() - : _status(ECesiumFeatureIdAttributeStatus::ErrorInvalidAttribute), + : _status(EITwinCesiumFeatureIdAttributeStatus::ErrorInvalidAttribute), _featureIdAccessor(), _attributeIndex(-1) {} @@ -67,7 +67,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdAttribute { int64 getAttributeIndex() const { return this->_attributeIndex; } private: - ECesiumFeatureIdAttributeStatus _status; + EITwinCesiumFeatureIdAttributeStatus _status; CesiumGltf::FeatureIdAccessorType _featureIdAccessor; int64 _attributeIndex; @@ -110,7 +110,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumFeatureIdAttributeBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Features|FeatureIDAttribute") - static ECesiumFeatureIdAttributeStatus GetFeatureIDAttributeStatus( + static EITwinCesiumFeatureIdAttributeStatus GetFeatureIDAttributeStatus( UPARAM(ref) const FITwinCesiumFeatureIdAttribute& FeatureIDAttribute); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdSet.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdSet.h index 52e4704..fe151e4 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdSet.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdSet.h @@ -16,7 +16,7 @@ struct FeatureId; * @brief The type of a feature ID set. */ UENUM(BlueprintType) -enum class ECesiumFeatureIdSetType : uint8 { +enum class EITwinCesiumFeatureIdSetType : uint8 { None, Attribute, Texture, @@ -40,7 +40,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdSet { public: FITwinCesiumFeatureIdSet() - : _featureIDSetType(ECesiumFeatureIdSetType::None), + : _featureIDSetType(EITwinCesiumFeatureIdSetType::None), _featureCount(0), _nullFeatureID(-1) {} @@ -51,7 +51,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdSet { private: FeatureIDType _featureID; - ECesiumFeatureIdSetType _featureIDSetType; + EITwinCesiumFeatureIdSetType _featureIDSetType; int64 _featureCount; int64 _nullFeatureID; int64 _propertyTableIndex; @@ -72,7 +72,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumFeatureIdSetBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Features|FeatureIDSet") - static const ECesiumFeatureIdSetType + static const EITwinCesiumFeatureIdSetType GetFeatureIDSetType(UPARAM(ref) const FITwinCesiumFeatureIdSet& FeatureIDSet); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdTexture.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdTexture.h index 5e9136f..ab37336 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdTexture.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeatureIdTexture.h @@ -20,7 +20,7 @@ struct FeatureIdTexture; * texture cannot be accessed, this briefly indicates why. */ UENUM(BlueprintType) -enum ECesiumFeatureIdTextureStatus { +enum EITwinCesiumFeatureIdTextureStatus { /* The feature ID texture is valid. */ Valid = 0, /* The feature ID texture cannot be found in the glTF, or the texture itself @@ -48,7 +48,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdTexture { * texture. */ FITwinCesiumFeatureIdTexture() - : _status(ECesiumFeatureIdTextureStatus::ErrorInvalidTexture) {} + : _status(EITwinCesiumFeatureIdTextureStatus::ErrorInvalidTexture) {} /** * @brief Constructs a feature ID texture instance. @@ -74,7 +74,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdTexture { } private: - ECesiumFeatureIdTextureStatus _status; + EITwinCesiumFeatureIdTextureStatus _status; CesiumGltf::FeatureIdTextureView _featureIdTextureView; CesiumGltf::TexCoordAccessorType _texCoordAccessor; int64 _textureCoordinateSetIndex; @@ -118,7 +118,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumFeatureIdTextureBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Features|FeatureIDTexture") - static ECesiumFeatureIdTextureStatus GetFeatureIDTextureStatus( + static EITwinCesiumFeatureIdTextureStatus GetFeatureIDTextureStatus( UPARAM(ref) const FITwinCesiumFeatureIdTexture& FeatureIDTexture); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeaturesMetadataComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeaturesMetadataComponent.h index be240f4..1c5f83a 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeaturesMetadataComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFeaturesMetadataComponent.h @@ -51,7 +51,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumFeatureIdSetDescription { * The type of the feature ID set. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumFeatureIdSetType Type = ECesiumFeatureIdSetType::None; + EITwinCesiumFeatureIdSetType Type = EITwinCesiumFeatureIdSetType::None; /** * The name of the property table that this feature ID set corresponds to. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFlyToComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFlyToComponent.h index 0d3002e..ddb3e19 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFlyToComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumFlyToComponent.h @@ -22,7 +22,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE(FITwinCesiumFlightInterrupted); * Indicates which rotation to use for orienting the object during flights. */ UENUM(BlueprintType) -enum class ECesiumFlyToRotation : uint8 { +enum class EITwinCesiumFlyToRotation : uint8 { /** * Uses the relative rotation of the root component of the Actor to which the * CesiumFlyToComponent is attached. @@ -119,7 +119,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumFlyToComponent * Indicates which rotation to use during flights. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") - ECesiumFlyToRotation RotationToUse = ECesiumFlyToRotation::Actor; + EITwinCesiumFlyToRotation RotationToUse = EITwinCesiumFlyToRotation::Actor; /** * A delegate that will be called when the Actor finishes flying. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumGeoreference.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumGeoreference.h index 2d7aa43..193a6c5 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumGeoreference.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumGeoreference.h @@ -17,7 +17,7 @@ class UITwinCesiumSubLevelSwitcherComponent; * The delegate for the AITwinCesiumGeoreference::OnGeoreferenceUpdated, * which is triggered from UpdateGeoreference */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FGeoreferenceUpdated); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FITwinGeoreferenceUpdated); /** * Controls how global geospatial coordinates are mapped to coordinates in the @@ -82,7 +82,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { * modified in a way that affects its computations. */ UPROPERTY(BlueprintAssignable, Category = "Cesium") - FGeoreferenceUpdated OnGeoreferenceUpdated; + FITwinGeoreferenceUpdated OnGeoreferenceUpdated; #pragma region Properties @@ -105,7 +105,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { BlueprintGetter = GetOriginPlacement, BlueprintSetter = SetOriginPlacement, meta = (AllowPrivateAccess)) - EOriginPlacement OriginPlacement = EOriginPlacement::CartographicOrigin; + EITwinOriginPlacement OriginPlacement = EITwinOriginPlacement::CartographicOrigin; /** * The latitude of the custom origin placement in degrees, in the range [-90, @@ -121,7 +121,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { meta = (AllowPrivateAccess, EditCondition = - "OriginPlacement==EOriginPlacement::CartographicOrigin", + "OriginPlacement==EITwinOriginPlacement::CartographicOrigin", ClampMin = -90.0, ClampMax = 90.0)) double OriginLatitude = 39.736401; @@ -140,7 +140,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { meta = (AllowPrivateAccess, EditCondition = - "OriginPlacement==EOriginPlacement::CartographicOrigin", + "OriginPlacement==EITwinOriginPlacement::CartographicOrigin", ClampMin = -180.0, ClampMax = 180.0)) double OriginLongitude = -105.25737; @@ -159,7 +159,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { meta = (AllowPrivateAccess, EditCondition = - "OriginPlacement==EOriginPlacement::CartographicOrigin")) + "OriginPlacement==EITwinOriginPlacement::CartographicOrigin")) double OriginHeight = 2250.0; /** @@ -277,7 +277,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { * much better than setting the Actor's Transform property. */ UFUNCTION(BlueprintGetter) - EOriginPlacement GetOriginPlacement() const; + EITwinOriginPlacement GetOriginPlacement() const; /** * Sets the placement of this Actor's origin (coordinate 0,0,0) within the @@ -292,7 +292,7 @@ class ITWINCESIUMRUNTIME_API AITwinCesiumGeoreference : public AActor { * much better than setting the Actor's Transform property. */ UFUNCTION(BlueprintSetter) - void SetOriginPlacement(EOriginPlacement NewValue); + void SetOriginPlacement(EITwinOriginPlacement NewValue); /** * Gets the latitude of the custom origin placement in degrees, in the range diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMeshBuildCallbacks.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMeshBuildCallbacks.h index 8a3d6f6..e3b0052 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMeshBuildCallbacks.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMeshBuildCallbacks.h @@ -19,40 +19,43 @@ struct FITwinCesiumModelMetadata; struct FITwinCesiumPrimitiveFeatures; namespace CesiumGltf { - struct MeshPrimitive; + struct MeshPrimitive; } // namespace CesiumGltf +namespace Cesium3DTilesSelection { + class Tile; +} using FITwinCesiumToUnrealTexCoordMap = std::unordered_map; class ITWINCESIUMRUNTIME_API ICesiumMeshBuildCallbacks { public: - ICesiumMeshBuildCallbacks(); - virtual ~ICesiumMeshBuildCallbacks(); - - struct FITwinCesiumMeshData - { - const CesiumGltf::MeshPrimitive* pMeshPrimitive; - const FITwinCesiumModelMetadata& Metadata; - const FITwinCesiumPrimitiveFeatures& Features; - FITwinCesiumToUnrealTexCoordMap& GltfToUnrealTexCoordMap; - }; - - /** - * Called at the end of the static mesh component construction. - */ - virtual void OnMeshConstructed( - const Cesium3DTilesSelection::TileID& tileId, - const TWeakObjectPtr& MeshComponent, - const TWeakObjectPtr& pMaterial, - const FITwinCesiumMeshData& CesiumMeshData) = 0; - - /** - * Whether an extra UV layer should be allocated for feature IDs. - */ - virtual bool ShouldAllocateUVForFeatures() const = 0; + ICesiumMeshBuildCallbacks(); + virtual ~ICesiumMeshBuildCallbacks(); + + struct FITwinCesiumMeshData + { + const CesiumGltf::MeshPrimitive* pMeshPrimitive; + const FITwinCesiumModelMetadata& Metadata; + const FITwinCesiumPrimitiveFeatures& Features; + FITwinCesiumToUnrealTexCoordMap& GltfToUnrealTexCoordMap; + }; + + /** + * Called at the end of the static mesh component construction. + */ + virtual void OnMeshConstructed( + const Cesium3DTilesSelection::Tile& Tile, + const TWeakObjectPtr& MeshComponent, + const TWeakObjectPtr& pMaterial, + const FITwinCesiumMeshData& CesiumMeshData) = 0; + + /** + * Whether an extra UV layer should be allocated for feature IDs. + */ + virtual bool ShouldAllocateUVForFeatures() const = 0; private: - static TSharedPtr Singleton; + static TSharedPtr Singleton; }; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataEncodingDetails.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataEncodingDetails.h index 0f6396d..576bf3b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataEncodingDetails.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataEncodingDetails.h @@ -14,13 +14,13 @@ * Unreal textures. */ UENUM() -enum class ECesiumEncodedMetadataComponentType : uint8 { None, Uint8, Float }; +enum class EITwinCesiumEncodedMetadataComponentType : uint8 { None, Uint8, Float }; /** * @brief The type that a metadata property's values will be encoded as. */ UENUM() -enum class ECesiumEncodedMetadataType : uint8 { +enum class EITwinCesiumEncodedMetadataType : uint8 { None, Scalar, Vec2, @@ -33,7 +33,7 @@ enum class ECesiumEncodedMetadataType : uint8 { * converted to a GPU-accessible type, if possible. */ UENUM() -enum class ECesiumEncodedMetadataConversion : uint8 { +enum class EITwinCesiumEncodedMetadataConversion : uint8 { /** * Do nothing. This is typically used for property types that are * completely unable to be coerced. @@ -63,14 +63,14 @@ struct FITwinCesiumMetadataEncodingDetails { GENERATED_USTRUCT_BODY() FITwinCesiumMetadataEncodingDetails() - : Type(ECesiumEncodedMetadataType::None), - ComponentType(ECesiumEncodedMetadataComponentType::None), - Conversion(ECesiumEncodedMetadataConversion::None) {} + : Type(EITwinCesiumEncodedMetadataType::None), + ComponentType(EITwinCesiumEncodedMetadataComponentType::None), + Conversion(EITwinCesiumEncodedMetadataConversion::None) {} FITwinCesiumMetadataEncodingDetails( - ECesiumEncodedMetadataType InType, - ECesiumEncodedMetadataComponentType InComponentType, - ECesiumEncodedMetadataConversion InConversion) + EITwinCesiumEncodedMetadataType InType, + EITwinCesiumEncodedMetadataComponentType InComponentType, + EITwinCesiumEncodedMetadataConversion InConversion) : Type(InType), ComponentType(InComponentType), Conversion(InConversion) {} @@ -79,7 +79,7 @@ struct FITwinCesiumMetadataEncodingDetails { * The GPU-compatible type that this property's values will be encoded as. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumEncodedMetadataType Type; + EITwinCesiumEncodedMetadataType Type; /** * The GPU-compatible component type that this property's values will be @@ -87,7 +87,7 @@ struct FITwinCesiumMetadataEncodingDetails { * supported in Unreal textures. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumEncodedMetadataComponentType ComponentType; + EITwinCesiumEncodedMetadataComponentType ComponentType; /** * The method of conversion used for this property. This describes how the @@ -95,7 +95,7 @@ struct FITwinCesiumMetadataEncodingDetails { * property types are compatible with the methods of conversion. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumEncodedMetadataConversion Conversion; + EITwinCesiumEncodedMetadataConversion Conversion; inline bool operator==(const FITwinCesiumMetadataEncodingDetails& Info) const { return Type == Info.Type && ComponentType == Info.ComponentType && @@ -108,7 +108,7 @@ struct FITwinCesiumMetadataEncodingDetails { } bool HasValidType() const { - return Type != ECesiumEncodedMetadataType::None && - ComponentType != ECesiumEncodedMetadataComponentType::None; + return Type != EITwinCesiumEncodedMetadataType::None && + ComponentType != EITwinCesiumEncodedMetadataComponentType::None; } }; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataPropertyDetails.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataPropertyDetails.h index c04b7f2..ef2d6f1 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataPropertyDetails.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataPropertyDetails.h @@ -16,13 +16,13 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { GENERATED_USTRUCT_BODY() FITwinCesiumMetadataPropertyDetails() - : Type(ECesiumMetadataType::Invalid), - ComponentType(ECesiumMetadataComponentType::None), + : Type(EITwinCesiumMetadataType::Invalid), + ComponentType(EITwinCesiumMetadataComponentType::None), bIsArray(false) {} FITwinCesiumMetadataPropertyDetails( - ECesiumMetadataType InType, - ECesiumMetadataComponentType InComponentType, + EITwinCesiumMetadataType InType, + EITwinCesiumMetadataComponentType InComponentType, bool IsArray) : Type(InType), ComponentType(InComponentType), bIsArray(IsArray) {} @@ -30,7 +30,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { * The type of the metadata property. */ UPROPERTY(EditAnywhere, Category = "Cesium") - ECesiumMetadataType Type = ECesiumMetadataType::Invalid; + EITwinCesiumMetadataType Type = EITwinCesiumMetadataType::Invalid; /** * The component of the metadata property. Only applies when the type is a @@ -41,9 +41,9 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum && Type != ECesiumMetadataType::String")) - ECesiumMetadataComponentType ComponentType = - ECesiumMetadataComponentType::None; + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum && Type != EITwinCesiumMetadataType::String")) + EITwinCesiumMetadataComponentType ComponentType = + EITwinCesiumMetadataComponentType::None; /** * Whether or not this represents an array containing elements of the @@ -76,7 +76,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum && Type != ECesiumMetadataType::String && ComponentType != ECesiumMetadataComponentType::None && ComponentType != ECesiumMetadataComponentType::Float32 && ComponentType != ECesiumMetadataComponentType::Float64")) + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum && Type != EITwinCesiumMetadataType::String && ComponentType != EITwinCesiumMetadataComponentType::None && ComponentType != EITwinCesiumMetadataComponentType::Float32 && ComponentType != EITwinCesiumMetadataComponentType::Float64")) bool bIsNormalized = false; /** @@ -89,7 +89,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum && Type != ECesiumMetadataType::String")) + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum && Type != EITwinCesiumMetadataType::String")) bool bHasOffset = false; /** @@ -102,7 +102,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum && Type != ECesiumMetadataType::String")) + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum && Type != EITwinCesiumMetadataType::String")) bool bHasScale = false; /** @@ -114,7 +114,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum")) + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum")) bool bHasNoDataValue = false; /** @@ -127,7 +127,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataPropertyDetails { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Enum")) + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Enum")) bool bHasDefaultValue = false; inline bool diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValue.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValue.h index a1e4b69..e594bb6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValue.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValue.h @@ -183,19 +183,19 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataValue { */ template explicit FITwinCesiumMetadataValue(const T& Value) : _value(Value), _valueType() { - ECesiumMetadataType type; - ECesiumMetadataComponentType componentType; + EITwinCesiumMetadataType type; + EITwinCesiumMetadataComponentType componentType; bool isArray; if constexpr (CesiumGltf::IsMetadataArray::value) { using ArrayType = typename CesiumGltf::MetadataArrayType::type; type = - ECesiumMetadataType(CesiumGltf::TypeToPropertyType::value); - componentType = ECesiumMetadataComponentType( + EITwinCesiumMetadataType(CesiumGltf::TypeToPropertyType::value); + componentType = EITwinCesiumMetadataComponentType( CesiumGltf::TypeToPropertyType::component); isArray = true; } else { - type = ECesiumMetadataType(CesiumGltf::TypeToPropertyType::value); - componentType = ECesiumMetadataComponentType( + type = EITwinCesiumMetadataType(CesiumGltf::TypeToPropertyType::value); + componentType = EITwinCesiumMetadataComponentType( CesiumGltf::TypeToPropertyType::component); isArray = false; } @@ -240,7 +240,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumMetadataValueBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|Value") - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetBlueprintType(UPARAM(ref) const FITwinCesiumMetadataValue& Value); /** @@ -251,7 +251,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumMetadataValueBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|Value") - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetArrayElementBlueprintType(UPARAM(ref) const FITwinCesiumMetadataValue& Value); /** @@ -278,7 +278,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumMetadataValueBlueprintLibrary (DeprecatedFunction, DeprecationMessage = "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead.")) - static ECesiumMetadataTrueType_DEPRECATED + static EITwinCesiumMetadataTrueType_DEPRECATED GetTrueType(UPARAM(ref) const FITwinCesiumMetadataValue& Value); /** @@ -293,7 +293,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumMetadataValueBlueprintLibrary (DeprecatedFunction, DeprecationMessage = "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead.")) - static ECesiumMetadataTrueType_DEPRECATED + static EITwinCesiumMetadataTrueType_DEPRECATED GetTrueComponentType(UPARAM(ref) const FITwinCesiumMetadataValue& Value); PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValueType.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValueType.h index b96afb6..00063d0 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValueType.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumMetadataValueType.h @@ -12,7 +12,7 @@ * The Blueprint type that can losslessly represent values of a given property. */ UENUM(BlueprintType) -enum class ECesiumMetadataBlueprintType : uint8 { +enum class EITwinCesiumMetadataBlueprintType : uint8 { /* Indicates a value cannot be represented in Blueprints. */ None, /* Indicates a value is best represented as a Boolean. */ @@ -67,7 +67,7 @@ static_assert(int(CesiumGltf::PropertyComponentType::None) == 0); * of a metadata property instead. */ UENUM(BlueprintType) -enum class ECesiumMetadataTrueType_DEPRECATED : uint8 { +enum class EITwinCesiumMetadataTrueType_DEPRECATED : uint8 { None_DEPRECATED = 0, Int8_DEPRECATED, Uint8_DEPRECATED, @@ -87,7 +87,7 @@ enum class ECesiumMetadataTrueType_DEPRECATED : uint8 { // True types are cast, reintepreted, or parsed before being packed into gpu // types when encoding into a texture. -enum class ECesiumMetadataPackedGpuType_DEPRECATED : uint8 { +enum class EITwinCesiumMetadataPackedGpuType_DEPRECATED : uint8 { None_DEPRECATED, Uint8_DEPRECATED, Float_DEPRECATED @@ -97,7 +97,7 @@ enum class ECesiumMetadataPackedGpuType_DEPRECATED : uint8 { * The type of a metadata property in EXT_structural_metadata. */ UENUM(BlueprintType) -enum class ECesiumMetadataType : uint8 { +enum class EITwinCesiumMetadataType : uint8 { Invalid = 0, Scalar = int(CesiumGltf::PropertyType::Scalar), Vec2 = int(CesiumGltf::PropertyType::Vec2), @@ -116,7 +116,7 @@ enum class ECesiumMetadataType : uint8 { * applicable if the property has a Scalar, VecN, or MatN type. */ UENUM(BlueprintType) -enum class ECesiumMetadataComponentType : uint8 { +enum class EITwinCesiumMetadataComponentType : uint8 { None = 0, Int8 = int(CesiumGltf::PropertyComponentType::Int8), Uint8 = int(CesiumGltf::PropertyComponentType::Uint8), @@ -139,13 +139,13 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataValueType { GENERATED_USTRUCT_BODY() FITwinCesiumMetadataValueType() - : Type(ECesiumMetadataType::Invalid), - ComponentType(ECesiumMetadataComponentType::None), + : Type(EITwinCesiumMetadataType::Invalid), + ComponentType(EITwinCesiumMetadataComponentType::None), bIsArray(false) {} FITwinCesiumMetadataValueType( - ECesiumMetadataType InType, - ECesiumMetadataComponentType InComponentType, + EITwinCesiumMetadataType InType, + EITwinCesiumMetadataComponentType InComponentType, bool IsArray = false) : Type(InType), ComponentType(InComponentType), bIsArray(IsArray) {} @@ -153,7 +153,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataValueType { * The type of the metadata property or value. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") - ECesiumMetadataType Type; + EITwinCesiumMetadataType Type; /** * The component of the metadata property or value. Only applies when the type @@ -165,8 +165,8 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataValueType { Category = "Cesium", Meta = (EditCondition = - "Type != ECesiumMetadataType::Invalid && Type != ECesiumMetadataType::Boolean && Type != ECesiumMetadataType::Enum && Type != ECesiumMetadataType::String")) - ECesiumMetadataComponentType ComponentType; + "Type != EITwinCesiumMetadataType::Invalid && Type != EITwinCesiumMetadataType::Boolean && Type != EITwinCesiumMetadataType::Enum && Type != EITwinCesiumMetadataType::String")) + EITwinCesiumMetadataComponentType ComponentType; /** * Whether or not this represents an array containing elements of the @@ -188,20 +188,20 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumMetadataValueType { template static FITwinCesiumMetadataValueType TypeToMetadataValueType() { - ECesiumMetadataType type; - ECesiumMetadataComponentType componentType; + EITwinCesiumMetadataType type; + EITwinCesiumMetadataComponentType componentType; bool isArray; if constexpr (CesiumGltf::IsMetadataArray::value) { using ArrayType = typename CesiumGltf::MetadataArrayType::type; type = - ECesiumMetadataType(CesiumGltf::TypeToPropertyType::value); - componentType = ECesiumMetadataComponentType( + EITwinCesiumMetadataType(CesiumGltf::TypeToPropertyType::value); + componentType = EITwinCesiumMetadataComponentType( CesiumGltf::TypeToPropertyType::component); isArray = true; } else { - type = ECesiumMetadataType(CesiumGltf::TypeToPropertyType::value); - componentType = ECesiumMetadataComponentType( + type = EITwinCesiumMetadataType(CesiumGltf::TypeToPropertyType::value); + componentType = EITwinCesiumMetadataComponentType( CesiumGltf::TypeToPropertyType::component); isArray = false; } @@ -214,36 +214,36 @@ static FITwinCesiumMetadataValueType TypeToMetadataValueType() { * and strings. */ static size_t GetMetadataTypeByteSize( - ECesiumMetadataType Type, - ECesiumMetadataComponentType ComponentType) { + EITwinCesiumMetadataType Type, + EITwinCesiumMetadataComponentType ComponentType) { size_t componentByteSize = 0; - if (ComponentType != ECesiumMetadataComponentType::None) + if (ComponentType != EITwinCesiumMetadataComponentType::None) componentByteSize = CesiumGltf::getSizeOfComponentType( CesiumGltf::PropertyComponentType(ComponentType)); size_t byteSize = componentByteSize; switch (Type) { - case ECesiumMetadataType::Boolean: + case EITwinCesiumMetadataType::Boolean: byteSize = sizeof(bool); break; - case ECesiumMetadataType::Scalar: + case EITwinCesiumMetadataType::Scalar: break; - case ECesiumMetadataType::Vec2: + case EITwinCesiumMetadataType::Vec2: byteSize *= 2; break; - case ECesiumMetadataType::Vec3: + case EITwinCesiumMetadataType::Vec3: byteSize *= 3; break; - case ECesiumMetadataType::Vec4: + case EITwinCesiumMetadataType::Vec4: byteSize *= 4; break; - case ECesiumMetadataType::Mat2: + case EITwinCesiumMetadataType::Mat2: byteSize *= 4; break; - case ECesiumMetadataType::Mat3: + case EITwinCesiumMetadataType::Mat3: byteSize *= 9; break; - case ECesiumMetadataType::Mat4: + case EITwinCesiumMetadataType::Mat4: byteSize *= 16; break; default: diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumOriginShiftComponent.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumOriginShiftComponent.h index c6adbb3..3f8bae7 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumOriginShiftComponent.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumOriginShiftComponent.h @@ -13,7 +13,7 @@ class UITwinCesiumGlobeAnchorComponent; * CesiumOriginShiftComponent is attached moves. */ UENUM(BlueprintType) -enum class ECesiumOriginShiftMode : uint8 { +enum class EITwinCesiumOriginShiftMode : uint8 { /** * This component is disabled and will have no effect. */ @@ -78,7 +78,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumOriginShiftComponent BlueprintSetter = SetMode, Category = "Cesium", Meta = (AllowPrivateAccess)) - ECesiumOriginShiftMode Mode = ECesiumOriginShiftMode::SwitchSubLevelsOnly; + EITwinCesiumOriginShiftMode Mode = EITwinCesiumOriginShiftMode::SwitchSubLevelsOnly; /** * The maximum distance between the origin of the Unreal coordinate system and @@ -106,14 +106,14 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumOriginShiftComponent * component is attached moves. */ UFUNCTION(BlueprintGetter) - ECesiumOriginShiftMode GetMode() const; + EITwinCesiumOriginShiftMode GetMode() const; /** * Sets a value indicating how to shift the origin as the Actor to which this * component is attached moves. */ UFUNCTION(BlueprintSetter) - void SetMode(ECesiumOriginShiftMode NewMode); + void SetMode(EITwinCesiumOriginShiftMode NewMode); /** * Gets the maximum distance between the origin of the Unreal coordinate diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPrimitiveFeatures.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPrimitiveFeatures.h index 47d080d..8a57c01 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPrimitiveFeatures.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPrimitiveFeatures.h @@ -89,7 +89,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPrimitiveFeaturesBlueprintLibrary Category = "Cesium|Primitive|Features") static const TArray GetFeatureIDSetsOfType( UPARAM(ref) const FITwinCesiumPrimitiveFeatures& PrimitiveFeatures, - ECesiumFeatureIdSetType Type); + EITwinCesiumFeatureIdSetType Type); /** * Get the number of vertices in the primitive. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArray.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArray.h index 3ee50d2..f099334 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArray.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArray.h @@ -109,9 +109,9 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyArray { template FITwinCesiumPropertyArray(CesiumGltf::PropertyArrayView value) : _value(value), _elementType() { - ECesiumMetadataType type = - ECesiumMetadataType(CesiumGltf::TypeToPropertyType::value); - ECesiumMetadataComponentType componentType = ECesiumMetadataComponentType( + EITwinCesiumMetadataType type = + EITwinCesiumMetadataType(CesiumGltf::TypeToPropertyType::value); + EITwinCesiumMetadataComponentType componentType = EITwinCesiumMetadataComponentType( CesiumGltf::TypeToPropertyType::component); bool isArray = false; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArrayBlueprintLibrary.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArrayBlueprintLibrary.h index f80faf1..06f40fd 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArrayBlueprintLibrary.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyArrayBlueprintLibrary.h @@ -23,7 +23,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyArrayBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyArray") - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetElementBlueprintType(UPARAM(ref) const FITwinCesiumPropertyArray& array); /** @@ -77,7 +77,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyArrayBlueprintLibrary Meta = (DeprecatedFunction, DeprecationMessage = "Use GetElementBlueprintType instead.")) - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetBlueprintComponentType(UPARAM(ref) const FITwinCesiumPropertyArray& array); /** @@ -92,7 +92,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyArrayBlueprintLibrary (DeprecatedFunction, DeprecationMessage = "CesiumMetadataTrueType is deprecated. Use GetElementValueType instead.")) - static ECesiumMetadataTrueType_DEPRECATED + static EITwinCesiumMetadataTrueType_DEPRECATED GetTrueComponentType(UPARAM(ref) const FITwinCesiumPropertyArray& array); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTable.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTable.h index 9f716e3..0a3f913 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTable.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTable.h @@ -19,7 +19,7 @@ struct PropertyTable; * cannot be accessed, this briefly indicates why. */ UENUM(BlueprintType) -enum class ECesiumPropertyTableStatus : uint8 { +enum class EITwinCesiumPropertyTableStatus : uint8 { /* The property table is valid. */ Valid = 0, /* The property table instance was not initialized from an actual glTF @@ -44,7 +44,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTable { * Construct an empty property table instance. */ FITwinCesiumPropertyTable() - : _status(ECesiumPropertyTableStatus::ErrorInvalidPropertyTable){}; + : _status(EITwinCesiumPropertyTableStatus::ErrorInvalidPropertyTable){}; /** * Constructs a property table from a glTF Property Table. @@ -62,7 +62,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTable { FString getClassName() const { return _className; } private: - ECesiumPropertyTableStatus _status; + EITwinCesiumPropertyTableStatus _status; FString _name; FString _className; @@ -86,7 +86,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTableBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTable") - static ECesiumPropertyTableStatus + static EITwinCesiumPropertyTableStatus GetPropertyTableStatus(UPARAM(ref) const FITwinCesiumPropertyTable& PropertyTable); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTableProperty.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTableProperty.h index 0ed9c61..7256355 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTableProperty.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTableProperty.h @@ -20,7 +20,7 @@ * table property cannot be accessed, this briefly indicates why. */ UENUM(BlueprintType) -enum class ECesiumPropertyTablePropertyStatus : uint8 { +enum class EITwinCesiumPropertyTablePropertyStatus : uint8 { /* The property table property is valid. */ Valid = 0, /* The property table property is empty but has a specified default value. */ @@ -49,7 +49,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTableProperty { * Construct an invalid property with an unknown type. */ FITwinCesiumPropertyTableProperty() - : _status(ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty), + : _status(EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty), _property(), _valueType(), _normalized(false) {} @@ -62,16 +62,16 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTableProperty { template FITwinCesiumPropertyTableProperty( const CesiumGltf::PropertyTablePropertyView& Property) - : _status(ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty), + : _status(EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidProperty), _property(Property), _valueType(), _normalized(Normalized) { switch (Property.status()) { case CesiumGltf::PropertyTablePropertyViewStatus::Valid: - _status = ECesiumPropertyTablePropertyStatus::Valid; + _status = EITwinCesiumPropertyTablePropertyStatus::Valid; break; case CesiumGltf::PropertyTablePropertyViewStatus::EmptyPropertyWithDefault: - _status = ECesiumPropertyTablePropertyStatus::EmptyPropertyWithDefault; + _status = EITwinCesiumPropertyTablePropertyStatus::EmptyPropertyWithDefault; break; case CesiumGltf::PropertyTablePropertyViewStatus::ErrorInvalidPropertyTable: case CesiumGltf::PropertyTablePropertyViewStatus::ErrorNonexistentProperty: @@ -91,7 +91,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTableProperty { // The status was already set in the initializer list. return; default: - _status = ECesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData; + _status = EITwinCesiumPropertyTablePropertyStatus::ErrorInvalidPropertyData; return; } @@ -100,7 +100,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTableProperty { } private: - ECesiumPropertyTablePropertyStatus _status; + EITwinCesiumPropertyTablePropertyStatus _status; std::any _property; @@ -124,7 +124,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTableProperty") - static ECesiumPropertyTablePropertyStatus GetPropertyTablePropertyStatus( + static EITwinCesiumPropertyTablePropertyStatus GetPropertyTablePropertyStatus( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property); /** @@ -136,7 +136,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTableProperty") - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetBlueprintType(UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property); /** @@ -148,7 +148,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTableProperty") - static ECesiumMetadataBlueprintType GetArrayElementBlueprintType( + static EITwinCesiumMetadataBlueprintType GetArrayElementBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property); PRAGMA_DISABLE_DEPRECATION_WARNINGS @@ -163,7 +163,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary Meta = (DeprecatedFunction, DeprecationMessage = "Use GetArrayElementBlueprintType instead.")) - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetBlueprintComponentType(UPARAM(ref) const FITwinCesiumPropertyTableProperty& Property); PRAGMA_ENABLE_DEPRECATION_WARNINGS @@ -192,7 +192,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary (DeprecatedFunction, DeprecationMessage = "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead.")) - static ECesiumMetadataTrueType_DEPRECATED + static EITwinCesiumMetadataTrueType_DEPRECATED GetTrueType(UPARAM(ref) const FITwinCesiumPropertyTableProperty& Value); /** @@ -208,7 +208,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTablePropertyBlueprintLibrary (DeprecatedFunction, DeprecationMessage = "CesiumMetadataTrueType is deprecated. Use GetValueType to get the CesiumMetadataValueType instead.")) - static ECesiumMetadataTrueType_DEPRECATED + static EITwinCesiumMetadataTrueType_DEPRECATED GetTrueComponentType(UPARAM(ref) const FITwinCesiumPropertyTableProperty& Value); PRAGMA_ENABLE_DEPRECATION_WARNINGS diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTexture.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTexture.h index 047a0a6..c2199b0 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTexture.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTexture.h @@ -15,7 +15,7 @@ struct PropertyTexture; }; // namespace CesiumGltf UENUM(BlueprintType) -enum class ECesiumPropertyTextureStatus : uint8 { +enum class EITwinCesiumPropertyTextureStatus : uint8 { /* The property texture is valid. */ Valid = 0, /* The property texture instance was not initialized from an actual glTF @@ -37,7 +37,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTexture { public: FITwinCesiumPropertyTexture() - : _status(ECesiumPropertyTextureStatus::ErrorInvalidPropertyTexture) {} + : _status(EITwinCesiumPropertyTextureStatus::ErrorInvalidPropertyTexture) {} FITwinCesiumPropertyTexture( const CesiumGltf::Model& model, @@ -49,7 +49,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTexture { FString getClassName() const { return _className; } private: - ECesiumPropertyTextureStatus _status; + EITwinCesiumPropertyTextureStatus _status; FString _name; FString _className; @@ -72,7 +72,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTextureBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTexture") - static const ECesiumPropertyTextureStatus + static const EITwinCesiumPropertyTextureStatus GetPropertyTextureStatus(UPARAM(ref) const FITwinCesiumPropertyTexture& PropertyTexture); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTextureProperty.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTextureProperty.h index 6a6955f..badba2c 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTextureProperty.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumPropertyTextureProperty.h @@ -14,7 +14,7 @@ * property texture property cannot be accessed, this briefly indicates why. */ UENUM(BlueprintType) -enum class ECesiumPropertyTexturePropertyStatus : uint8 { +enum class EITwinCesiumPropertyTexturePropertyStatus : uint8 { /* The property texture property is valid. */ Valid = 0, /* The property texture property is empty but has a specified default value. @@ -40,7 +40,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTextureProperty { public: FITwinCesiumPropertyTextureProperty() - : _status(ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty), + : _status(EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty), _property(), _valueType(), _normalized(false) {} @@ -48,21 +48,21 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTextureProperty { template FITwinCesiumPropertyTextureProperty( const CesiumGltf::PropertyTexturePropertyView& Property) - : _status(ECesiumPropertyTexturePropertyStatus::ErrorInvalidProperty), + : _status(EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidProperty), _property(Property), _valueType(), _normalized(Normalized) { switch (Property.status()) { case CesiumGltf::PropertyTexturePropertyViewStatus::Valid: - _status = ECesiumPropertyTexturePropertyStatus::Valid; + _status = EITwinCesiumPropertyTexturePropertyStatus::Valid; break; case CesiumGltf::PropertyTexturePropertyViewStatus:: EmptyPropertyWithDefault: - _status = ECesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault; + _status = EITwinCesiumPropertyTexturePropertyStatus::EmptyPropertyWithDefault; break; case CesiumGltf::PropertyTexturePropertyViewStatus:: ErrorUnsupportedProperty: - _status = ECesiumPropertyTexturePropertyStatus::ErrorUnsupportedProperty; + _status = EITwinCesiumPropertyTexturePropertyStatus::ErrorUnsupportedProperty; return; case CesiumGltf::PropertyTexturePropertyViewStatus:: ErrorInvalidPropertyTexture: @@ -86,7 +86,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTextureProperty { // The status was already set in the initializer list. return; default: - _status = ECesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData; + _status = EITwinCesiumPropertyTexturePropertyStatus::ErrorInvalidPropertyData; return; } @@ -99,7 +99,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumPropertyTextureProperty { const CesiumGltf::ImageCesium* getImage() const; private: - ECesiumPropertyTexturePropertyStatus _status; + EITwinCesiumPropertyTexturePropertyStatus _status; std::any _property; @@ -123,7 +123,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTexturePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTextureProperty") - static ECesiumPropertyTexturePropertyStatus GetPropertyTexturePropertyStatus( + static EITwinCesiumPropertyTexturePropertyStatus GetPropertyTexturePropertyStatus( UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property); /** @@ -135,7 +135,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTexturePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTextureProperty") - static ECesiumMetadataBlueprintType + static EITwinCesiumMetadataBlueprintType GetBlueprintType(UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property); /** @@ -147,7 +147,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumPropertyTexturePropertyBlueprintLibrary BlueprintCallable, BlueprintPure, Category = "Cesium|Metadata|PropertyTextureProperty") - static ECesiumMetadataBlueprintType GetArrayElementBlueprintType( + static EITwinCesiumMetadataBlueprintType GetArrayElementBlueprintType( UPARAM(ref) const FITwinCesiumPropertyTextureProperty& Property); /** diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlay.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlay.h index f05aef7..9fa406e 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlay.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlay.h @@ -31,7 +31,7 @@ ITWINCESIUMRUNTIME_API extern FITwinCesiumRasterOverlayLoadFailure * `prepareRasterInLoadThread` is called. */ USTRUCT(BlueprintType) -struct FRasterOverlayRendererOptions { +struct FITwinRasterOverlayRendererOptions { GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") @@ -72,7 +72,7 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumRasterOverlay : public UActorComponent * have the best quality. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") - FRasterOverlayRendererOptions rendererOptions; + FITwinRasterOverlayRendererOptions rendererOptions; // Sets default values for this component's properties UITwinCesiumRasterOverlay(); diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlayLoadFailureDetails.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlayLoadFailureDetails.h index 2563a3c..ff5836b 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlayLoadFailureDetails.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRasterOverlayLoadFailureDetails.h @@ -8,7 +8,7 @@ class UITwinCesiumRasterOverlay; UENUM(BlueprintType) -enum class ECesiumRasterOverlayLoadType : uint8 { +enum class EITwinCesiumRasterOverlayLoadType : uint8 { /** * An unknown load error. */ @@ -39,7 +39,7 @@ struct ITWINCESIUMRUNTIME_API FITwinCesiumRasterOverlayLoadFailureDetails { * The type of request that failed to load. */ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Cesium") - ECesiumRasterOverlayLoadType Type = ECesiumRasterOverlayLoadType::Unknown; + EITwinCesiumRasterOverlayLoadType Type = EITwinCesiumRasterOverlayLoadType::Unknown; /** * The HTTP status code of the response that led to the failure. diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRuntime.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRuntime.h index fe0ea7f..91125cf 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRuntime.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumRuntime.h @@ -15,7 +15,7 @@ class IAssetAccessor; class ICacheDatabase; } // namespace CesiumAsync -DECLARE_LOG_CATEGORY_EXTERN(LogCesium, Log, All); +DECLARE_LOG_CATEGORY_EXTERN(LogITwinCesium, Log, All); class FITwinCesiumRuntimeModule : public IModuleInterface { public: @@ -46,9 +46,10 @@ DECLARE_MULTICAST_DELEGATE_OneParam( ITWINCESIUMRUNTIME_API extern FITwinCesiumRasterOverlayIonTroubleshooting OnCesiumRasterOverlayIonTroubleshooting; -ITWINCESIUMRUNTIME_API CesiumAsync::AsyncSystem& getAsyncSystem() noexcept; -ITWINCESIUMRUNTIME_API const std::shared_ptr& -getAssetAccessor(); +namespace ITwinCesium +{ + ITWINCESIUMRUNTIME_API CesiumAsync::AsyncSystem& getAsyncSystem() noexcept; + ITWINCESIUMRUNTIME_API const std::shared_ptr& getAssetAccessor(); -ITWINCESIUMRUNTIME_API std::shared_ptr& -getCacheDatabase(); + ITWINCESIUMRUNTIME_API std::shared_ptr& getCacheDatabase(); +} diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTile.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTile.h index e6253aa..253f648 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTile.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTile.h @@ -42,5 +42,5 @@ class ITWINCESIUMRUNTIME_API UITwinCesiumTile : public UPrimitiveComponent { virtual FBoxSphereBounds CalcBounds(const FTransform& LocalToWorld) const override; - friend class CesiumTileExcluderAdapter; + friend class FITwinCesiumTileExcluderAdapter; }; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTileExcluder.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTileExcluder.h index 5674986..7e57783 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTileExcluder.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinCesiumTileExcluder.h @@ -3,7 +3,7 @@ #include "CoreMinimal.h" #include "ITwinCesiumTileExcluder.generated.h" -class CesiumTileExcluderAdapter; +class FITwinCesiumTileExcluderAdapter; /** * An actor component for excluding Cesium Tiles. @@ -21,7 +21,7 @@ UCLASS( class ITWINCESIUMRUNTIME_API UITwinCesiumTileExcluder : public UActorComponent { GENERATED_BODY() private: - CesiumTileExcluderAdapter* pExcluderAdapter; + FITwinCesiumTileExcluderAdapter* pExcluderAdapter; UPROPERTY() UITwinCesiumTile* CesiumTile; diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinGlobeAwareDefaultPawn.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinGlobeAwareDefaultPawn.h index 30d37ad..02aa659 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinGlobeAwareDefaultPawn.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinGlobeAwareDefaultPawn.h @@ -19,13 +19,13 @@ class UITwinCesiumFlyToComponent; * The delegate for when the pawn finishes flying * which is triggered from _handleFlightStep */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCompletedFlight); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FITwinCompletedFlight); /** * The delegate for when the pawn's flying is interrupted * which is triggered from _interruptFlight */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE(FInterruptedFlight); +DECLARE_DYNAMIC_MULTICAST_DELEGATE(FITwinInterruptedFlight); /** * This pawn can be used to easily move around the globe while maintaining a @@ -87,7 +87,7 @@ class ITWINCESIUMRUNTIME_API AITwinGlobeAwareDefaultPawn : public ADefaultPawn { (DeprecatedProperty, DeprecationMessage = "Use OnFlightComplete on CesiumFlyToComponent instead.")) - FCompletedFlight OnFlightComplete_DEPRECATED; + FITwinCompletedFlight OnFlightComplete_DEPRECATED; UPROPERTY( BlueprintAssignable, @@ -95,7 +95,7 @@ class ITWINCESIUMRUNTIME_API AITwinGlobeAwareDefaultPawn : public ADefaultPawn { (DeprecatedProperty, DeprecationMessage = "Use OnFlightInterrupted on CesiumFlyToComponent instead.")) - FInterruptedFlight OnFlightInterrupt_DEPRECATED; + FITwinInterruptedFlight OnFlightInterrupt_DEPRECATED; /** * Gets the transformation from globe's reference frame to the Unreal world diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinOriginPlacement.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinOriginPlacement.h index c4209a9..24e83c6 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinOriginPlacement.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinOriginPlacement.h @@ -11,7 +11,7 @@ * a Georeference. */ UENUM(BlueprintType) -enum class EOriginPlacement : uint8 { +enum class EITwinOriginPlacement : uint8 { /** * Use the tileset's true origin as the Actor's origin. For georeferenced * tilesets, this usually means the Actor's origin will be at the center diff --git a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinUnrealMetadataConversions.h b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinUnrealMetadataConversions.h index 7909474..7076840 100644 --- a/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinUnrealMetadataConversions.h +++ b/Public/Extern/cesium-unreal/Source/ITwinCesiumRuntime/Public/ITwinUnrealMetadataConversions.h @@ -9,7 +9,7 @@ #include #include -enum class ECesiumEncodedMetadataComponentType : uint8; +enum class EITwinCesiumEncodedMetadataComponentType : uint8; /** * @brief Converts a FITwinCesiumMetadataValueType to the best-fitting Blueprints @@ -17,20 +17,20 @@ enum class ECesiumEncodedMetadataComponentType : uint8; * * @param ValueType The input metadata value type. */ -ECesiumMetadataBlueprintType +EITwinCesiumMetadataBlueprintType CesiumMetadataValueTypeToBlueprintType(FITwinCesiumMetadataValueType ValueType); // Deprecated. -ECesiumMetadataBlueprintType CesiumMetadataTrueTypeToBlueprintType( - ECesiumMetadataTrueType_DEPRECATED trueType); +EITwinCesiumMetadataBlueprintType CesiumMetadataTrueTypeToBlueprintType( + EITwinCesiumMetadataTrueType_DEPRECATED trueType); // For backwards compatibility. -ECesiumMetadataTrueType_DEPRECATED +EITwinCesiumMetadataTrueType_DEPRECATED CesiumMetadataValueTypeToTrueType(FITwinCesiumMetadataValueType ValueType); static const std::string VectorComponents = "XYZW"; -struct UnrealMetadataConversions { +struct FITwinUnrealMetadataConversions { public: static FIntPoint toIntPoint(const glm::ivec2& vec2); /** diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinDigitalTwin.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinDigitalTwin.cpp index c7fa3de..b99bf27 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinDigitalTwin.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinDigitalTwin.cpp @@ -128,7 +128,12 @@ void AITwinDigitalTwin::OnRealityDataRetrieved(bool bSuccess, FITwinRealityDataI void AITwinDigitalTwin::UpdateITwin() { - check(!ITwinId.IsEmpty()); + if (ITwinId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinDigitalTwin with no ITwinId cannot be updated")); + return; + } + if (!Children.IsEmpty()) return; diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinGeolocation.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinGeolocation.cpp index 8a2e54d..aab4fc4 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinGeolocation.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinGeolocation.cpp @@ -19,7 +19,7 @@ FITwinGeolocation::FITwinGeolocation(AActor& Parent) LocatedGeoreference->SetActorLabel(TEXT("Located Georeference")); #endif LocatedGeoreference->AttachToActor(&Parent, FAttachmentTransformRules::KeepRelativeTransform); - LocatedGeoreference->SetOriginPlacement(EOriginPlacement::TrueOrigin); // Means "not yet inited". + LocatedGeoreference->SetOriginPlacement(EITwinOriginPlacement::TrueOrigin); // Means "not yet inited". } { FActorSpawnParameters SpawnParams; @@ -29,6 +29,6 @@ FITwinGeolocation::FITwinGeolocation(AActor& Parent) NonLocatedGeoreference->SetActorLabel(TEXT("Non-Located Georeference")); #endif NonLocatedGeoreference->AttachToActor(&Parent, FAttachmentTransformRules::KeepRelativeTransform); - NonLocatedGeoreference->SetOriginPlacement(EOriginPlacement::TrueOrigin); + NonLocatedGeoreference->SetOriginPlacement(EITwinOriginPlacement::TrueOrigin); } } diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinIModel.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinIModel.cpp index 7441477..2c0432b 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinIModel.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinIModel.cpp @@ -63,6 +63,17 @@ class AITwinIModel::FImpl uint32 TilesetLoadedCount = 0; FDelegateHandle OnTilesetLoadFailureHandle; + // Some operations require to first fetch a valid server connection + enum class EOperationUponAuth : uint8 + { + None, + Load, + Update, + }; + EOperationUponAuth PendingOperation = EOperationUponAuth::None; + bool bAutoStartExportIfNeeded = false; + bool bTickCalled = false; + FImpl(AITwinIModel& InOwner) : Owner(InOwner), Internals(InOwner) { @@ -292,12 +303,26 @@ AITwinIModel::AITwinIModel() :Impl(MakePimpl(*this)) { SetRootComponent(CreateDefaultSubobject(TEXT("root"))); + + PrimaryActorTick.bCanEverTick = true; } void AITwinIModel::UpdateIModel() { - check(!IModelId.IsEmpty()); // TODO_AW - check(ServerConnection); // TODO_AW + if (IModelId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinIModel with no IModelId cannot be updated")); + return; + } + + // If no access token has been retrieved yet, make sure we request an authentication and then process + // the actual update. + if (CheckServerConnection() != AITwinServiceActor::EConnectionStatus::Connected) + { + Impl->PendingOperation = FImpl::EOperationUponAuth::Update; + return; + } + bResolvedChangesetIdValid = false; ExportStatus = EITwinExportStatus::Unknown; DestroyTileset(); @@ -305,15 +330,50 @@ void AITwinIModel::UpdateIModel() UpdateSavedViews(); } -void AITwinIModel::GetModel3DInfo(FITwinIModel3DInfo& Info) +void AITwinIModel::AutoExportAndLoad() +{ + if (ensure(LoadingMethod == ELoadingMethod::LM_Automatic + && !IModelId.IsEmpty())) + { + // automatically start the export if necessary. + Impl->bAutoStartExportIfNeeded = true; + UpdateIModel(); + } +} + +void AITwinIModel::GetModel3DInfoInCoordSystem(FITwinIModel3DInfo& OutInfo, EITwinCoordSystem CoordSystem, + bool bGetLegacy3DFTValue /*= false*/) const { - FBox const& IModelBBox = Impl->Internals.SceneMapping.GetIModelBoundingBox(); + FBox const& IModelBBox = Impl->Internals.SceneMapping.GetIModelBoundingBox(CoordSystem); if (IModelBBox.IsValid) { - Info.BoundingBoxMin = IModelBBox.Min; - Info.BoundingBoxMax = IModelBBox.Max; + OutInfo.BoundingBoxMin = IModelBBox.Min; + OutInfo.BoundingBoxMax = IModelBBox.Max; } - Info.ModelCenter = Impl->Internals.SceneMapping.GetModelCenter(); + // The 'ModelCenter' used in 3DFT plugin is defined as the translation of the iModel (which is an offset + // existing in the iModel itself, and can be found in Cesium export by retrieving the translation of the + // root tile). It was mainly (and probably only) to adjust the savedViews in the 3DFT plugin, due to the + // way the coordinate system of the iModel was handled in the legacy 3DFT display engine. + // This offset should *not* be done with Cesium tiles, so we decided to always return zero except if the + // customer explicitly request this former value (and then it would be interesting to know why he does + // this...) + if (bGetLegacy3DFTValue) + { + OutInfo.ModelCenter = Impl->Internals.SceneMapping.GetModelCenter(CoordSystem); + } + else + { + OutInfo.ModelCenter = FVector(0, 0, 0); + } +} + +void AITwinIModel::GetModel3DInfo(FITwinIModel3DInfo& Info) const +{ + // For compatibility with former 3DFT plugin, we work in the iTwin coordinate system here. + // However, we'll retrieve a null ModelCenter to avoid breaking savedViews totally (see comments in + // ATopMenu::#StartCameraMovementToSavedView, which is the C++ version of the blueprint provided in + // default 3DFT level. + GetModel3DInfoInCoordSystem(Info, EITwinCoordSystem::ITwin, false); } namespace ITwin @@ -339,7 +399,7 @@ namespace ITwin void AITwinIModel::LoadModel(FString InExportId) { UpdateWebServices(); - if (!InExportId.IsEmpty()) + if (WebServices && !InExportId.IsEmpty()) { WebServices->GetExportInfo(InExportId); } @@ -389,7 +449,7 @@ void AITwinIModel::OnExportInfosRetrieved(bool bSuccess, FITwinExportInfos const for (FITwinExportInfo const& Info : ExportInfosArray.ExportInfos) { - if (Info.Status == "Complete") + if (Info.Status == TEXT("Complete")) { ExportStatus = EITwinExportStatus::Complete; FActorSpawnParameters SpawnParams; @@ -406,7 +466,7 @@ void AITwinIModel::OnExportInfosRetrieved(bool bSuccess, FITwinExportInfos const // connect mesh creation callback Tileset->SetMeshBuildCallbacks(Impl->SceneMappingBuilder); Tileset->SetGltfTuner(Impl->GltfTuner); - Tileset->SetTilesetSource(ETilesetSource::FromUrl); + Tileset->SetTilesetSource(EITwinTilesetSource::FromUrl); Tileset->SetUrl(Info.MeshUrl); if (!Geolocation) { @@ -429,6 +489,12 @@ void AITwinIModel::OnExportInfosRetrieved(bool bSuccess, FITwinExportInfos const } ExportStatus = EITwinExportStatus::InProgress; } + + if (ExportStatus == EITwinExportStatus::NoneFound && Impl->bAutoStartExportIfNeeded) + { + // in manual mode, automatically start an export if none exists yet + StartExport(); + } } void AITwinIModel::OnExportInfoRetrieved(bool bSuccess, FITwinExportInfo const& ExportInfo) @@ -436,7 +502,7 @@ void AITwinIModel::OnExportInfoRetrieved(bool bSuccess, FITwinExportInfo const& // This callback is called when an export was actually found and LoadModel was called with the latter // => update the IModelID and changeset ID accordingly. if (bSuccess - && ExportInfo.Status == "Complete") + && ExportInfo.Status == TEXT("Complete")) { ExportId = ExportInfo.Id; IModelId = ExportInfo.iModelId; @@ -444,10 +510,22 @@ void AITwinIModel::OnExportInfoRetrieved(bool bSuccess, FITwinExportInfo const& ChangesetId = ExportInfo.ChangesetId; SetResolvedChangesetId(ChangesetId); } - // Actually load the Cesium tileset in case of success + // Actually load the Cesium tileset if the request was successful and the export is complete FITwinExportInfos infos; infos.ExportInfos.Push(ExportInfo); OnExportInfosRetrieved(bSuccess, infos); + + if (!bSuccess || ExportInfo.Status == TEXT("Invalid")) + { + // the export may have been interrupted on the server, or deleted... + ExportStatus = EITwinExportStatus::Unknown; + } + + if (ExportStatus == EITwinExportStatus::InProgress) + { + // Still in progress => test again in 3 seconds + TestExportCompletionAfterDelay(ExportInfo.Id, 3.f); + } } void AITwinIModel::Retune() @@ -457,8 +535,19 @@ void AITwinIModel::Retune() void AITwinIModel::StartExport() { + if (IModelId.IsEmpty()) + { + UE_LOG(LogITwin, Error, TEXT("IModelId is required to start an export")); + return; + } + if (ExportStatus == EITwinExportStatus::InProgress) + { + // do not accumulate exports... + UE_LOG(LogITwin, Display, TEXT("Export is already in progress for ITwinIModel %s"), *IModelId); + return; + } UpdateWebServices(); - if (!IModelId.IsEmpty()) + if (WebServices) { WebServices->StartExport(IModelId, ResolvedChangesetId); } @@ -466,7 +555,22 @@ void AITwinIModel::StartExport() void AITwinIModel::OnExportStarted(bool bSuccess, FString const& InExportId) { + if (!bSuccess) + return; + ExportStatus = EITwinExportStatus::InProgress; + TestExportCompletionAfterDelay(InExportId, 3.f); // 3s +} +void AITwinIModel::TestExportCompletionAfterDelay(FString const& InExportId, float DelayInSeconds) +{ + // Create a ticker to test the new export completion + FTSTicker::GetCoreTicker().AddTicker( + FTickerDelegate::CreateLambda([this, InExportId, _ = TStrongObjectPtr(this)] + (float Delta) -> bool + { + LoadModel(InExportId); + return false; // One tick + }), DelayInSeconds); } void AITwinIModel::UpdateSavedViews() @@ -533,28 +637,38 @@ void AITwinIModel::OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedVi savedViewActor->SavedViewId = SavedViewInfo.Id; } +namespace ITwin +{ + extern bool GetSavedViewFromPlayerController(UWorld const* World, FSavedView& OutSavedView); +} + void AITwinIModel::AddSavedView(const FString& displayName) { - auto camPos = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation(); - auto camRot = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorRotation(); - //convert pos to itwin - camPos /= FVector(100.0, -100.0, 100.0); - //convert rot to itwin - FRotator rot(-90.0, -90.0, 0.0); - camRot = UKismetMathLibrary::ComposeRotators(rot.GetInverse(), camRot); - camRot = camRot.GetInverse(); - camRot.Yaw *= -1.0; + if (IModelId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("IModelId is required to create a new SavedView")); + return; + } + if (ITwinId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinId is required to create a new SavedView")); + return; + } + + FSavedView NewSavedView; + if (!ITwin::GetSavedViewFromPlayerController(GetWorld(), NewSavedView)) + { + return; + } + UpdateWebServices(); - if (WebServices - && !IModelId.IsEmpty() - && !ITwinId.IsEmpty()) + if (WebServices) { - WebServices->AddSavedView(ITwinId, IModelId, { camPos, {0.0,0.0,0.0}, camRot }, - {"",displayName,true}); + WebServices->AddSavedView(ITwinId, IModelId, NewSavedView, { TEXT(""), displayName, true }); } } -void AITwinIModel::OnSavedViewDeleted(bool bSuccess, FString const& Response) +void AITwinIModel::OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) { } @@ -598,15 +712,37 @@ void AITwinIModel::UpdateAfterLoadingUIEvent() } else if (LoadingMethod == ELoadingMethod::LM_Automatic && !IModelId.IsEmpty() && !ChangesetId.IsEmpty()) { - UpdateIModel(); + AutoExportAndLoad(); } } void AITwinIModel::UpdateOnSuccessfulAuthorization() { - UpdateAfterLoadingUIEvent(); + switch (Impl->PendingOperation) + { + case FImpl::EOperationUponAuth::Load: + UpdateAfterLoadingUIEvent(); + break; + case FImpl::EOperationUponAuth::Update: + UpdateIModel(); + break; + case FImpl::EOperationUponAuth::None: + break; + } + Impl->PendingOperation = FImpl::EOperationUponAuth::None; } +void AITwinIModel::OnLoadingUIEvent() +{ + // If no access token has been retrieved yet, make sure we request an authentication and then + // process the actual loading request(s). + if (CheckServerConnection() != AITwinServiceActor::EConnectionStatus::Connected) + { + Impl->PendingOperation = FImpl::EOperationUponAuth::Load; + return; + } + UpdateAfterLoadingUIEvent(); +} #if WITH_EDITOR @@ -620,17 +756,34 @@ void AITwinIModel::PostEditChangeProperty(struct FPropertyChangedEvent& e) || PropertyName == GET_MEMBER_NAME_CHECKED(AITwinIModel, ChangesetId) || PropertyName == GET_MEMBER_NAME_CHECKED(AITwinIModel, ExportId)) { - // If no ServerConnection has been created yet, make sure we request an authentication and then - // process the actual loading request(s). - if (CheckServerConnection() != AITwinServiceActor::EConnectionStatus::Connected) + OnLoadingUIEvent(); + } +} + +#endif // WITH_EDITOR + +void AITwinIModel::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + + if (!Impl->bTickCalled) + { + Impl->bTickCalled = true; + + // just in case the loaded level contains an iModel already configured... + if ((LoadingMethod == ELoadingMethod::LM_Manual && !ExportId.IsEmpty()) + || + (LoadingMethod == ELoadingMethod::LM_Automatic && !IModelId.IsEmpty() && !ChangesetId.IsEmpty())) { - return; + OnLoadingUIEvent(); } - UpdateAfterLoadingUIEvent(); } } -#endif // WITH_EDITOR +bool AITwinIModel::ShouldTickIfViewportsOnly() const +{ + return (GetWorld() && GetWorld()->WorldType == EWorldType::Editor); +} void FITwinIModelInternals::OnElementTimelineModified(FITwinElementTimeline const& ModifiedTimeline) { @@ -840,6 +993,29 @@ static FAutoConsoleCommandWithWorldAndArgs FCmd_ITwinBakeFeaturesInUVs( }) ); +// Console command to create a new saved view +static FAutoConsoleCommandWithWorldAndArgs FCmd_ITwinAddSavedView( + TEXT("cmd.ITwin_AddSavedView"), + TEXT("Create a new ITwin SavedView for all iModels in the scene, using current point of view."), + FConsoleCommandWithWorldAndArgsDelegate::CreateLambda([](const TArray& Args, UWorld* World) +{ + FString SavedViewName; + if (!Args.IsEmpty()) + { + SavedViewName = Args[0]; + } + else + { + UE_LOG(LogTemp, Error, TEXT("A name is required to create a new SavedView")); + return; + } + for (TActorIterator IModelIter(World); IModelIter; ++IModelIter) + { + (*IModelIter)->AddSavedView(SavedViewName); + } +}) +); + // Console command to test visibility animation translucent materials static FAutoConsoleCommandWithWorldAndArgs FCmd_ITwinAllowSynchro4DOpacityAnimation( TEXT("cmd.ITwinAllowSynchro4DOpacityAnimation"), @@ -865,7 +1041,7 @@ static FAutoConsoleCommandWithWorldAndArgs FCmd_ITwinFitIModelInView( FBox AllBBox(ForceInitToZero); for (TActorIterator IModelIter(World); IModelIter; ++IModelIter) { - FBox const& IModelBBox = GetInternals(**IModelIter).SceneMapping.GetIModelBoundingBox(); + FBox const& IModelBBox = GetInternals(**IModelIter).SceneMapping.GetIModelBoundingBox(EITwinCoordSystem::UE); if (IModelBBox.IsValid) { if (AllBBox.IsValid) AllBBox += IModelBBox; diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinRealityData.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinRealityData.cpp index 3b1be45..9a5bc6c 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinRealityData.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinRealityData.cpp @@ -41,7 +41,7 @@ class AITwinRealityData::FImpl #endif Tileset->AttachToActor(&Owner, FAttachmentTransformRules::KeepRelativeTransform); Tileset->SetCreatePhysicsMeshes(false); - Tileset->SetTilesetSource(ETilesetSource::FromUrl); + Tileset->SetTilesetSource(EITwinTilesetSource::FromUrl); Tileset->SetUrl(Info.MeshUrl); if (Info.bGeolocated) @@ -50,10 +50,10 @@ class AITwinRealityData::FImpl Latitude = 0.5 * (Info.ExtentNorthEast.Latitude + Info.ExtentSouthWest.Latitude); Longitude = 0.5 * (Info.ExtentNorthEast.Longitude + Info.ExtentSouthWest.Longitude); Tileset->SetGeoreference(Owner.Geolocation->LocatedGeoreference.Get()); - if (Tileset->GetGeoreference()->GetOriginPlacement() == EOriginPlacement::TrueOrigin) + if (Tileset->GetGeoreference()->GetOriginPlacement() == EITwinOriginPlacement::TrueOrigin) { // Common geolocation is not yet inited, use the location of this reality data. - Tileset->GetGeoreference()->SetOriginPlacement(EOriginPlacement::CartographicOrigin); + Tileset->GetGeoreference()->SetOriginPlacement(EITwinOriginPlacement::CartographicOrigin); Tileset->GetGeoreference()->SetOriginLatitude(Latitude); Tileset->GetGeoreference()->SetOriginLongitude(Longitude); Tileset->GetGeoreference()->SetOriginHeight(0); @@ -161,10 +161,9 @@ void AITwinRealityData::PostEditChangeProperty(FPropertyChangedEvent& e) void AITwinRealityData::UseAsGeolocation() { - check(bGeolocated && Geolocation); - if (Geolocation) + if (ensure(bGeolocated && Geolocation)) { - Geolocation->LocatedGeoreference->SetOriginPlacement(EOriginPlacement::CartographicOrigin); + Geolocation->LocatedGeoreference->SetOriginPlacement(EITwinOriginPlacement::CartographicOrigin); Geolocation->LocatedGeoreference->SetOriginLatitude(Impl->Latitude); Geolocation->LocatedGeoreference->SetOriginLongitude(Impl->Longitude); } diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSavedView.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSavedView.cpp index b869df2..0b5596d 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSavedView.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSavedView.cpp @@ -20,10 +20,20 @@ class AITwinSavedView::FImpl { public: + // Some operations require to first fetch the saved view data: in such case, we postpone the actual + // operation until the authorization and SavedView data is retrieved. + enum class EPendingOperation : uint8 + { + None, + Move, + Rename + }; AITwinSavedView& Owner; bool bSavedViewTransformIsSet = false; - UTimelineComponent* TimelineComponent; - UCurveFloat* CurveFloat; + EPendingOperation PendingOperation = EPendingOperation::None; + UTimelineComponent* TimelineComponent = nullptr; + UCurveFloat* CurveFloat = nullptr; + FImpl(AITwinSavedView& InOwner) :Owner(InOwner) { @@ -46,6 +56,71 @@ class AITwinSavedView::FImpl } }; +namespace +{ + // Conversions from iTwin to UE and vice versa + inline void ITwinCameraToUE( + FVector const& Location_ITwin, FRotator const& Rotation_ITwin, + FVector& Location_UE, FRotator& Rotation_UE) + { + // Convert iTwin camera to UE + Location_UE = Location_ITwin * FVector(100, -100, 100); + + Rotation_UE = Rotation_ITwin; + Rotation_UE.Yaw *= -1; + Rotation_UE = Rotation_UE.GetInverse(); + Rotation_UE = UKismetMathLibrary::ComposeRotators(FRotator(-90, -90, 0), Rotation_UE); + } + + inline void ITwinSavedViewToUE( + FSavedView const& SavedView, + FVector& Location_UE, FRotator& Rotation_UE) + { + ITwinCameraToUE(SavedView.Origin, SavedView.Angles, Location_UE, Rotation_UE); + } + + inline void UECameraToITwin( + FVector const& Location_UE, FRotator const& Rotation_UE, + FVector& Location_ITwin, FRotator& Rotation_ITwin) + { + //UE_LOG(LogTemp, Log, TEXT("Location UE: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), Location_UE.X, Location_UE.Y, Location_UE.Z)); + //UE_LOG(LogTemp, Log, TEXT("Rotation UE: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), Rotation_UE.Yaw, Rotation_UE.Pitch, Rotation_UE.Roll)); + + // Convert position to iTwin + Location_ITwin = Location_UE; + Location_ITwin /= FVector(100.0, -100.0, 100.0); + + // Convert rotation to iTwin + Rotation_ITwin = Rotation_UE; + FRotator const rot(-90.0, -90.0, 0.0); + Rotation_ITwin = UKismetMathLibrary::ComposeRotators(rot.GetInverse(), Rotation_ITwin); + Rotation_ITwin = Rotation_ITwin.GetInverse(); + Rotation_ITwin.Yaw *= -1.0; + + //UE_LOG(LogTemp, Log, TEXT("Location ITwin: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), Location_ITwin.X, Location_ITwin.Y, Location_ITwin.Z)); + //UE_LOG(LogTemp, Log, TEXT("Rotation ITwin: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), Rotation_ITwin.Yaw, Rotation_ITwin.Pitch, Rotation_ITwin.Roll)); + } +} + +namespace ITwin +{ + void UECameraToSavedView(AActor const& Pawn, FSavedView& OutSavedView) + { + UECameraToITwin(Pawn.GetActorLocation(), Pawn.GetActorRotation(), + OutSavedView.Origin, OutSavedView.Angles); + } + + bool GetSavedViewFromPlayerController(UWorld const* World, FSavedView& OutSavedView) + { + APlayerController const* Controller = World ? World->GetFirstPlayerController() : nullptr; + APawn const* Pawn = Controller ? Controller->GetPawn() : nullptr; + if (!Pawn) + return false; + UECameraToSavedView(*Pawn, OutSavedView); + return true; + } +} + AITwinSavedView::AITwinSavedView() :Impl(MakePimpl(*this)) { @@ -63,11 +138,23 @@ void AITwinSavedView::OnTimelineTick(const float& output) GetWorld()->GetFirstPlayerController()->GetPawn()->SetActorRotation(UKismetMathLibrary::RLerp(startRot, svRot, output, true)); } -void AITwinSavedView::OnSavedViewDeleted(bool bSuccess, FString const& Response) +void AITwinSavedView::OnSavedViewDeleted(bool bSuccess, FString const& InSavedViewId, FString const& Response) { - if (!bSuccess) - return; - GetWorld()->DestroyActor(this); + // usually, saved views are owned by a AITwinIModel actor (except those created manually from scratch) + AActor* OwnerActor = GetOwner(); + AITwinServiceActor* OwnerSrvActor = OwnerActor ? Cast(OwnerActor) : nullptr; + + if (bSuccess && ensure(InSavedViewId == this->SavedViewId)) + { + GetWorld()->DestroyActor(this); + } + + UITwinWebServices const* ParentWebServices = OwnerSrvActor ? OwnerSrvActor->GetWebServices() : nullptr; + if (ParentWebServices && ParentWebServices != this->GetWebServices()) + { + // propagate information to parent iModel + ParentWebServices->OnSavedViewDeleted(bSuccess, InSavedViewId, Response); + } } void AITwinSavedView::OnSavedViewRetrieved(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) @@ -77,16 +164,30 @@ void AITwinSavedView::OnSavedViewRetrieved(bool bSuccess, FSavedView const& Save #if WITH_EDITOR SetActorLabel(SavedViewInfo.DisplayName); #endif - //convert iTwin cam to UE - auto svLocation = SavedView.Origin * FVector(100, -100, 100); - auto svRotation = SavedView.Angles; - svRotation.Yaw *= -1; - svRotation = svRotation.GetInverse(); - svRotation = UKismetMathLibrary::ComposeRotators(FRotator(-90, -90, 0), svRotation); - //set actor transform + + // convert iTwin cam to UE + FVector svLocation; + FRotator svRotation; + ITwinSavedViewToUE(SavedView, svLocation, svRotation); + + // set actor transform SetActorLocation(svLocation); SetActorRotation(svRotation); Impl->bSavedViewTransformIsSet = true; + + // Perform pending operation now, if any + switch (Impl->PendingOperation) + { + case FImpl::EPendingOperation::None: + break; + case FImpl::EPendingOperation::Move: + MoveToSavedView(); + break; + case FImpl::EPendingOperation::Rename: + RenameSavedView(); + break; + } + Impl->PendingOperation = FImpl::EPendingOperation::None; } void AITwinSavedView::OnSavedViewEdited(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) @@ -97,105 +198,126 @@ void AITwinSavedView::OnSavedViewEdited(bool bSuccess, FSavedView const& SavedVi #if WITH_EDITOR SetActorLabel(SavedViewInfo.DisplayName); #endif - //Retake - //convert itwin to ue - auto camPos = SavedView.Origin * FVector(100, -100, 100); - auto camRot = SavedView.Angles; - camRot.Yaw *= -1; - camRot = camRot.GetInverse(); - camRot = UKismetMathLibrary::ComposeRotators(FRotator(-90, -90, 0), camRot); + // Retake + // convert itwin to ue + FVector camPos; + FRotator camRot; + ITwinSavedViewToUE(SavedView, camPos, camRot); this->SetActorLocation(camPos); this->SetActorRotation(camRot); } void AITwinSavedView::UpdateSavedView() { - check(!SavedViewId.IsEmpty()); - check(ServerConnection); - if (!Children.IsEmpty()) + if (SavedViewId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinSavedView has no SavedViewId")); return; - - UpdateWebServices(); - if (WebServices && !SavedViewId.IsEmpty()) + } + if (CheckServerConnection() != AITwinServiceActor::EConnectionStatus::Connected) + { + // No authorization yet: postpone the actual update (see UpdateOnSuccessfulAuthorization) + return; + } + if (WebServices) + { WebServices->GetSavedView(SavedViewId); + } } void AITwinSavedView::MoveToSavedView() { - check(Impl->bSavedViewTransformIsSet); - if (!Impl->bSavedViewTransformIsSet) + if (SavedViewId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinSavedView has no SavedViewId - cannot move to it")); return; - if (!GetWorld() || - !GetWorld()->GetFirstPlayerController() || - !GetWorld()->GetFirstPlayerController()->GetPawn()) + } + UWorld const* World = GetWorld(); + APlayerController* Controller = World ? World->GetFirstPlayerController() : nullptr; + APawn* Pawn = Controller ? Controller->GetPawn() : nullptr; + if (!Pawn) + return; + + if (!Impl->bSavedViewTransformIsSet) + { + // fetch the saved view data before we can move to it + Impl->PendingOperation = FImpl::EPendingOperation::Move; + UpdateSavedView(); return; + } auto camPos = GetActorLocation(); auto camRot = GetActorRotation(); - GetWorld()->GetFirstPlayerController()->GetPawn()->bUseControllerRotationPitch = 0; - GetWorld()->GetFirstPlayerController()->GetPawn()->bUseControllerRotationYaw = 0; + Pawn->bUseControllerRotationPitch = 0; + Pawn->bUseControllerRotationYaw = 0; Impl->TimelineComponent->PlayFromStart(); + + checkSlow(GetWorld()->GetFirstPlayerController() == Controller && Controller->GetPawn() == Pawn); camRot.Roll = 0; - GetWorld()->GetFirstPlayerController()->GetPawn()->bUseControllerRotationPitch = 1; - GetWorld()->GetFirstPlayerController()->GetPawn()->bUseControllerRotationYaw = 1; - GetWorld()->GetFirstPlayerController()->SetControlRotation(camRot); + Pawn->bUseControllerRotationPitch = 1; + Pawn->bUseControllerRotationYaw = 1; + Controller->SetControlRotation(camRot); } void AITwinSavedView::DeleteSavedView() { - check(!SavedViewId.IsEmpty()); - check(ServerConnection); + if (SavedViewId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinSavedView with no SavedViewId cannot be deleted")); + return; + } UpdateWebServices(); - if (WebServices && !SavedViewId.IsEmpty()) + if (WebServices) + { WebServices->DeleteSavedView(SavedViewId); + } } void AITwinSavedView::RenameSavedView() { - check(!SavedViewId.IsEmpty()); - check(ServerConnection); - check(Impl->bSavedViewTransformIsSet); + if (SavedViewId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinSavedView with no SavedViewId cannot be renamed")); + return; + } if (!Impl->bSavedViewTransformIsSet) + { + // fetch the saved view data before we can rename it + Impl->PendingOperation = FImpl::EPendingOperation::Rename; + UpdateSavedView(); return; - auto camPos = GetActorLocation(); - auto camRot = GetActorRotation(); - UE_LOG(LogTemp, Log, TEXT("GetActorLocation UE: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), camPos.X, camPos.Y, camPos.Z)); - UE_LOG(LogTemp, Log, TEXT("GetActorRotation UE: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), camRot.Yaw, camRot.Pitch, camRot.Roll)); - //convert pos to itwin - camPos /= FVector(100.0, -100.0, 100.0); - //convert rot to itwin - FRotator rot(-90.0, -90.0, 0.0); - camRot = UKismetMathLibrary::ComposeRotators(rot.GetInverse(), camRot); - camRot = camRot.GetInverse(); - camRot.Yaw *= -1.0; - UE_LOG(LogTemp, Log, TEXT("GetActorLocation ITWIN: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), camPos.X, camPos.Y, camPos.Z)); - UE_LOG(LogTemp, Log, TEXT("GetActorRotation ITWIN: %s"), *FString::Printf(TEXT("[%.2f,%.2f,%.2f]"), camRot.Yaw, camRot.Pitch, camRot.Roll)); + } + + FVector camPos_ITwin; + FRotator camRot_ITwin; + UECameraToITwin(GetActorLocation(), GetActorRotation(), camPos_ITwin, camRot_ITwin); + UpdateWebServices(); - if (WebServices && !SavedViewId.IsEmpty() && !DisplayName.IsEmpty()) + if (WebServices && !DisplayName.IsEmpty()) { - WebServices->EditSavedView({ camPos, FVector(0.0, 0.0, 0.0), camRot }, + WebServices->EditSavedView({ camPos_ITwin, FVector(0.0, 0.0, 0.0), camRot_ITwin }, { SavedViewId, DisplayName, true }); } } void AITwinSavedView::RetakeSavedView() { - check(!SavedViewId.IsEmpty()); - check(ServerConnection); - FString displayName = GetActorNameOrLabel(); - auto camPos = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation(); - auto camRot = GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorRotation(); - //convert pos to itwin - camPos /= FVector(100.0, -100.0, 100.0); - //convert rot to itwin - FRotator rot(-90.0, -90.0, 0.0); - camRot = UKismetMathLibrary::ComposeRotators(rot.GetInverse(), camRot); - camRot = camRot.GetInverse(); - camRot.Yaw *= -1.0; + if (SavedViewId.IsEmpty()) + { + UE_LOG(LogTemp, Error, TEXT("ITwinSavedView with no SavedViewId cannot be edited")); + return; + } + + FSavedView ModifiedSV; + if (!ITwin::GetSavedViewFromPlayerController(GetWorld(), ModifiedSV)) + { + return; + } + FString const displayName = GetActorNameOrLabel(); + UpdateWebServices(); - if (WebServices && !SavedViewId.IsEmpty() && !displayName.IsEmpty()) + if (WebServices && !displayName.IsEmpty()) { - WebServices->EditSavedView({ camPos, FVector(0.0, 0.0, 0.0), camRot }, - { SavedViewId, displayName, true }); + WebServices->EditSavedView(ModifiedSV, { SavedViewId, displayName, true }); } } diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMapping.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMapping.h index c5d3645..cad8ce6 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMapping.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMapping.h @@ -12,6 +12,7 @@ #include // see TCesiumTileID later on #include #include +#include #include #include #include @@ -242,9 +243,13 @@ class FITwinSceneMapping /// Global bounding box for the whole model - very coarse, as it it filled from all known tiles, /// taking the lowest LODs into account. This could be improved by evaluating it from the tiles currently /// displayed... - FBox IModelBBox; - /// ModelCenter is defined as the translation of the iModel - FVector ModelCenter = FVector(0, 0, 0); + FBox IModelBBox_ITwin; + FBox IModelBBox_UE; // same, but in Unreal Engine coordinate system + /// ModelCenter, in iTwin world, is defined as the translation of the iModel ; this data is directly + /// retrieved from the iModel. + FVector ModelCenter_ITwin = FVector(0, 0, 0); + FVector ModelCenter_UE = FVector(0, 0, 0); // same, but in Unreal Engine coordinate system + bool bHasSetModelCenter = false; public: std::unordered_map KnownTiles; @@ -269,11 +274,11 @@ class FITwinSceneMapping const std::unordered_map& GetKnownBBoxes() const { return KnownBBoxes; } - FBox const& GetIModelBoundingBox() const { - return IModelBBox; + FBox const& GetIModelBoundingBox(EITwinCoordSystem CoordSystem) const { + return (CoordSystem == EITwinCoordSystem::UE) ? IModelBBox_UE: IModelBBox_ITwin; } - FVector const& GetModelCenter() const { - return ModelCenter; + FVector const& GetModelCenter(EITwinCoordSystem CoordSystem) const { + return (CoordSystem == EITwinCoordSystem::UE) ? ModelCenter_UE : ModelCenter_ITwin; } static void SetupFeatureIdUVIndex(FITwinSceneTile& SceneTile, diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.cpp index 671e4a5..410a978 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.cpp @@ -28,11 +28,12 @@ //======================================================================================= void FITwinSceneMappingBuilder::OnMeshConstructed( - const Cesium3DTilesSelection::TileID& tileId, + const Cesium3DTilesSelection::Tile& Tile, const TWeakObjectPtr& MeshComponent, const TWeakObjectPtr& pMaterial, const FITwinCesiumMeshData& CesiumData) { + auto const tileId = Tile.getTileID(); FITwinSceneTile& sceneTile = sceneMapping_.KnownTiles[tileId]; const int64 FeatureIDSetIndex = 0; // always look in 1st set (_FEATURE_ID_0) @@ -51,13 +52,37 @@ void FITwinSceneMappingBuilder::OnMeshConstructed( auto MeshBox = StaticMesh->GetBoundingBox(); auto const& Transform = MeshComponent->GetComponentTransform(); - // Update global bounding box + // Update global bounding box, both in Unreal and "ITwin" coordinate system + // Beware the code for ITwin coordinate system should not be modified without testing saved views with + // the default level of the former 3DFT plugin! if (MeshBox.IsValid) { - sceneMapping_.IModelBBox += Transform.TransformPosition(MeshBox.Min); - sceneMapping_.IModelBBox += Transform.TransformPosition(MeshBox.Max); + sceneMapping_.IModelBBox_UE += Transform.TransformPosition(MeshBox.Min); + sceneMapping_.IModelBBox_UE += Transform.TransformPosition(MeshBox.Max); + + // For iTwin coordinate system: swap Y with Z (compensate what is done previously) + std::swap(MeshBox.Min.Y, MeshBox.Min.Z); + std::swap(MeshBox.Max.Y, MeshBox.Max.Z); + sceneMapping_.IModelBBox_ITwin += MeshBox.Min; + sceneMapping_.IModelBBox_ITwin += MeshBox.Max; + } + sceneMapping_.ModelCenter_UE = Transform.GetTranslation(); + + if (!sceneMapping_.bHasSetModelCenter) + { + // the ModelCenter, as used in 3DFT plugin, can be retrieved by fetching the translation of the + // root tile + // here again, please do not change this code without testing saved views in 3DFT level... + auto const* rootTile = &Tile; + while (rootTile->getParent() != nullptr) + { + rootTile = rootTile->getParent(); + } + auto const& tsfTranslation = rootTile->getTransform()[3]; + sceneMapping_.ModelCenter_ITwin = FVector(tsfTranslation[0], tsfTranslation[1], tsfTranslation[2]); + // no need to evaluate it for every tile: the result will be constant, obviously. + sceneMapping_.bHasSetModelCenter = true; } - sceneMapping_.ModelCenter = Transform.GetTranslation(); const FITwinCesiumPrimitiveFeatures& Features(CesiumData.Features); const FITwinCesiumPropertyTableProperty* pElementProperty = diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.h index 062b5c6..af83d71 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinSceneMappingBuilder.h @@ -15,16 +15,16 @@ class FITwinSceneMapping; class FITwinSceneMappingBuilder : public ICesiumMeshBuildCallbacks { public: - FITwinSceneMappingBuilder(FITwinSceneMapping& sceneMapping); + FITwinSceneMappingBuilder(FITwinSceneMapping& sceneMapping); - void OnMeshConstructed( - const Cesium3DTilesSelection::TileID& tileId, - const TWeakObjectPtr& MeshComponent, - const TWeakObjectPtr& pMaterial, - const FITwinCesiumMeshData& CesiumData) override; + virtual void OnMeshConstructed( + const Cesium3DTilesSelection::Tile& Tile, + const TWeakObjectPtr& MeshComponent, + const TWeakObjectPtr& pMaterial, + const FITwinCesiumMeshData& CesiumData) override; - bool ShouldAllocateUVForFeatures() const override; + virtual bool ShouldAllocateUVForFeatures() const override; private: - FITwinSceneMapping& sceneMapping_; + FITwinSceneMapping& sceneMapping_; }; diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinServiceActor.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinServiceActor.cpp index cb0305c..aad5bee 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinServiceActor.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinServiceActor.cpp @@ -38,7 +38,9 @@ void AITwinServiceActor::UpdateWebServices() const bool bHasValidWebServices = WebServices && WebServices->IsValidLowLevel(); const bool bHasChangedConnection = bHasValidWebServices && !WebServices->HasSameConnection(ServerConnection.Get()); - if (!bHasValidWebServices || bHasChangedConnection) + const bool bHasObserver = + bHasValidWebServices && WebServices->HasObserver(this); + if (!bHasValidWebServices || bHasChangedConnection || !bHasObserver) { WebServices = NewObject(this); WebServices->SetServerConnection(ServerConnection); @@ -46,6 +48,16 @@ void AITwinServiceActor::UpdateWebServices() } } +const UITwinWebServices* AITwinServiceActor::GetWebServices() const +{ + return WebServices.Get(); +} + +UITwinWebServices* AITwinServiceActor::GetMutableWebServices() +{ + return WebServices.Get(); +} + const TCHAR* AITwinServiceActor::GetObserverName() const { // NB: ideally, I would not have overridden it (but GENERATED_BODY() macro seems to impose that the class diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinAuthorizationManager.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinAuthorizationManager.cpp index f15a8a3..3c1da04 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinAuthorizationManager.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinAuthorizationManager.cpp @@ -80,7 +80,8 @@ namespace ITwin } } -/*static*/ ITwin::AppIDArray FAuthorizationCredentials::ITwinAppIDs; +/*static*/ +ITwin::AppIDArray FAuthorizationCredentials::ITwinAppIDs; /*static*/ void FITwinAuthorizationManager::SetITwinAppIDArray(ITwin::AppIDArray const& ITwinAppIDs) @@ -468,7 +469,7 @@ void FITwinAuthorizationManager::CheckAuthorization() return; } - checkf(!bHasBoundAuthPort, TEXT("Authorization process already in progress...")); + ensureMsgf(!bHasBoundAuthPort, TEXT("Authorization process already in progress...")); const FString state = GenerateRandomCharacters(10); const FString verifier = GenerateRandomCharacters(128); diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServices.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServices.cpp index 50d7e34..79b27c4 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServices.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServices.cpp @@ -38,6 +38,9 @@ namespace ITwin { extern FString GetITwinAppId(EITwinEnvironment Env); + + + constexpr uint32 NO_REQUEST{ 0xFFFFFFFF }; } namespace @@ -145,7 +148,10 @@ namespace { return FRotator(0, 0, 0); } - return FRotator(JsonObject->GetNumberField("pitch"), JsonObject->GetNumberField("yaw"), JsonObject->GetNumberField("roll")); + return FRotator( + JsonObject->GetNumberField("pitch"), + JsonObject->GetNumberField("yaw"), + JsonObject->GetNumberField("roll")); } } @@ -333,7 +339,14 @@ class UITwinWebServices::FImpl mutable FMutex mutex_; std::shared_ptr< std::atomic_bool > isThisValid_ = std::make_shared< std::atomic_bool >(true); // same principle as in #FReusableJsonQueries::FImpl IITwinWebServicesObserver* observer_ = nullptr; - FString lastError_; + + struct LastError + { + FString msg_; + RequestID requestId_ = ITwin::NO_REQUEST; + }; + LastError lastError_; + RequestID nextRequestId_ = 0; // Some data (mostly tokens) are unique per environment - thus their management is centralized using SharedMngrPtr = FITwinAuthorizationManager::SharedInstance; @@ -514,22 +527,37 @@ void UITwinWebServices::SetObserver(IITwinWebServicesObserver* InObserver) Impl->observer_ = InObserver; } -void UITwinWebServices::SetLastError(FString const& InError) +bool UITwinWebServices::HasObserver(IITwinWebServicesObserver const* Observer) const +{ + return Impl->observer_ == Observer; +} + +void UITwinWebServices::SetLastError(FString const& InError, RequestID InRequestID) { FImpl::FLock Lock(Impl->mutex_); - Impl->lastError_ = InError; + Impl->lastError_.msg_ = InError; + Impl->lastError_.requestId_ = InRequestID; } FString UITwinWebServices::GetLastError() const { FImpl::FLock Lock(Impl->mutex_); - return Impl->lastError_; + return Impl->lastError_.msg_; +} + +FString UITwinWebServices::GetRequestError(RequestID InRequestId) const +{ + FImpl::FLock Lock(Impl->mutex_); + if (Impl->lastError_.requestId_ == InRequestId) + return Impl->lastError_.msg_; + else + return {}; } bool UITwinWebServices::ConsumeLastError(FString& OutError) { FImpl::FLock Lock(Impl->mutex_); - OutError = Impl->lastError_; + OutError = Impl->lastError_.msg_; Impl->lastError_ = {}; return !OutError.IsEmpty(); } @@ -544,10 +572,12 @@ struct UITwinWebServices::FITwinAPIRequestInfo FString ContentString; TMap CustomHeaders; + + bool bAllowEmptyResponse = false; // E.g. true for DeleteSavedView }; template -void UITwinWebServices::TProcessHttpRequest( +UITwinWebServices::RequestID UITwinWebServices::TProcessHttpRequest( FITwinAPIRequestInfo const& RequestInfo, FunctorType&& InFunctor, DelegateAsFunctor&& InResultFunctor) @@ -559,13 +589,21 @@ void UITwinWebServices::TProcessHttpRequest( // client. if (!TryGetServerConnection(false)) { - return; + return ITwin::NO_REQUEST; } FString const authToken = GetAuthToken(); if (authToken.IsEmpty()) { - return; + return ITwin::NO_REQUEST; } + + // build a unique request ID + RequestID newRequestID(ITwin::NO_REQUEST); + { + FImpl::FLock Lock(Impl->mutex_); + newRequestID = Impl->nextRequestId_++; + } + const auto request = FHttpModule::Get().CreateRequest(); request->SetVerb(RequestInfo.Verb); request->SetURL(GetITwinAPIRootUrl(this->Environment) + RequestInfo.UrlSuffix); @@ -596,7 +634,9 @@ void UITwinWebServices::TProcessHttpRequest( [this, IsValidLambda = this->Impl->isThisValid_, ResultCallback = Forward(InResultFunctor), - ResponseProcessor = Forward(InFunctor)] + ResponseProcessor = Forward(InFunctor), + bAllowEmptyResponse = RequestInfo.bAllowEmptyResponse, + requestId = newRequestID] (FHttpRequestPtr request, FHttpResponsePtr response, bool connectedSuccessfully) { if (!(*IsValidLambda)) @@ -606,9 +646,9 @@ void UITwinWebServices::TProcessHttpRequest( } bool bValidResponse = false; FString requestError; - Be::CleanUpGuard setErrorGuard([this, &bValidResponse, &requestError, &ResultCallback] + Be::CleanUpGuard setErrorGuard([this, &bValidResponse, &requestError, &ResultCallback, requestId] { - this->SetLastError(requestError); + this->SetLastError(requestError, requestId); if (!bValidResponse) { ResultCallback(false, {}); @@ -627,10 +667,17 @@ void UITwinWebServices::TProcessHttpRequest( { bValidResponse = ResponseProcessor(ResultData, *responseJson); } + else if (bAllowEmptyResponse) + { + // some request expect no response (DeleteSavedView, typically) + bValidResponse = ResponseProcessor(ResultData, {}); + } ScopedWorkingWebServices WorkingInstanceSetter(this); ResultCallback(bValidResponse, ResultData); }); request->ProcessRequest(); + + return newRequestID; } void UITwinWebServices::GetITwinInfo(FString ITwinId) @@ -803,7 +850,7 @@ void UITwinWebServices::GetExports(FString IModelId, FString ChangesetId) {}, {}, { - // The following headers have been added folowing suggestion by Daniel Iborra. + // The following headers have been added following suggestion by Daniel Iborra. // This header is supposed to filter exports, but it is not implemented yet on server. // Therefore we need to keep our own filter on the response for now. {TEXT("exportType"), TEXT("CESIUM")}, @@ -821,19 +868,31 @@ void UITwinWebServices::GetExports(FString IModelId, FString ChangesetId) { return false; } + // intermediate structure to sort exports by date + struct FCesiumExport + { + FITwinExportInfo Info; + FString LastModified; + }; + TArray CesiumExports; + CesiumExports.Reserve(exportsJson->Num()); for (const auto& ExportValue : *exportsJson) { const auto& ExportObject = ExportValue->AsObject(); const auto& RequestObject = ExportObject->GetObjectField("request"); if (RequestObject->GetStringField("exportType") == "CESIUM" && RequestObject->HasField("exportTypeVersion")) { - FITwinExportInfo Export = { + FCesiumExport& ExportWithDate = CesiumExports.Emplace_GetRef(); + FITwinExportInfo& Export(ExportWithDate.Info); + Export = { ExportObject->GetStringField("id"), ExportObject->GetStringField("displayName"), ExportObject->GetStringField("status"), RequestObject->GetStringField("iModelId"), + RequestObject->GetStringField("contextId"), RequestObject->GetStringField("changesetId") }; + ExportWithDate.LastModified = ExportObject->GetStringField("lastModified"); if (Export.Status == "Complete") { auto MeshJsonObject = GetChildObject(ExportObject, "_links/mesh"); @@ -842,9 +901,17 @@ void UITwinWebServices::GetExports(FString IModelId, FString ChangesetId) Export.MeshUrl = MeshJsonObject->GetStringField("href").Replace(TEXT("?"), TEXT("/tileset.json?")); } } - Infos.ExportInfos.Push(Export); } } + // sort by decreasing modification time + CesiumExports.StableSort([](FCesiumExport const& A, FCesiumExport const& B) { + return A.LastModified > B.LastModified; + }); + Infos.ExportInfos.Reserve(CesiumExports.Num()); + for (FCesiumExport const& ExportWithDate : CesiumExports) + { + Infos.ExportInfos.Push(ExportWithDate.Info); + } return true; }, [this](bool bResult, FITwinExportInfos const& ResultData) @@ -1081,10 +1148,24 @@ void UITwinWebServices::GetRealityData3DInfo(FString ITwinId, FString RealityDat }); } +namespace +{ + inline FString GetSavedViewData_Json(FSavedView const& SavedView) + { + const auto& camPos = SavedView.Origin; + const auto& camRot = SavedView.Angles; + return FString::Printf(TEXT("\"savedViewData\":{\"itwin3dView\":{" \ + "\"origin\":[%.2f,%.2f,%.2f]," \ + "\"extents\":[0.00,0.00,0.00]," \ + "\"angles\":{\"yaw\":%.2f,\"pitch\":%.2f,\"roll\":%.2f}," \ + "\"camera\":{\"lens\":0.0,\"focusDist\":0.0,\"eye\":[%.2f,%.2f,%.2f]}}}"), + camPos.X, camPos.Y, camPos.Z, camRot.Yaw, camRot.Pitch, camRot.Roll, + camPos.X, camPos.Y, camPos.Z); + } +} + void UITwinWebServices::AddSavedView(FString ITwinId, FString IModelId, FSavedView SavedView, FSavedViewInfo SavedViewInfo) { - const auto& camPos = SavedView.Origin; - const auto& camRot = SavedView.Angles; const FITwinAPIRequestInfo savedViewsRequestInfo = { TEXT("POST"), TEXT("/savedviews/"), @@ -1092,8 +1173,9 @@ void UITwinWebServices::AddSavedView(FString ITwinId, FString IModelId, FSavedVi /*** additional settings for POST ***/ TEXT("application/json"), - FString::Printf(TEXT("{\"iTwinId\":\"%s\",\"iModelId\":\"%s\",\"savedViewData\":{\"itwin3dView\":{\"origin\":[%.2f,%.2f,%.2f],\"extents\":[0.00,0.00,0.00],\"angles\":{\"yaw\":%.2f,\"pitch\":%.2f,\"roll\":%.2f},\"camera\":{\"lens\":0.0,\"focusDist\":0.0,\"eye\":[%.2f,%.2f,%.2f]}}},\"displayName\":\"%s\",\"shared\":true,\"tagIds\":[]}"), - *ITwinId, *IModelId, camPos.X, camPos.Y, camPos.Z, camRot.Yaw, camRot.Pitch, camRot.Roll, camPos.X, camPos.Y, camPos.Z, *SavedViewInfo.DisplayName) + FString::Printf(TEXT("{\"iTwinId\":\"%s\",\"iModelId\":\"%s\",%s," \ + "\"displayName\":\"%s\",\"shared\":true,\"tagIds\":[]}"), + *ITwinId, *IModelId, *GetSavedViewData_Json(SavedView), *SavedViewInfo.DisplayName) }; TProcessHttpRequest( savedViewsRequestInfo, @@ -1112,23 +1194,39 @@ void UITwinWebServices::AddSavedView(FString ITwinId, FString IModelId, FSavedVi }, [this](bool bResult, FSavedViewInfo const& ResultData) { - this->OnAddSavedViewComplete.Broadcast(bResult, ResultData); - if (this->Impl->observer_) - { - this->Impl->observer_->OnSavedViewAdded(bResult, ResultData); - } + this->OnSavedViewAdded(bResult, ResultData); } ); } +void UITwinWebServices::OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo) +{ + OnAddSavedViewComplete.Broadcast(bSuccess, SavedViewInfo); + if (Impl->observer_) + { + Impl->observer_->OnSavedViewAdded(bSuccess, SavedViewInfo); + } +} + void UITwinWebServices::DeleteSavedView(FString SavedViewId) { const FITwinAPIRequestInfo savedViewsRequestInfo = { TEXT("DELETE"), TEXT("/savedviews/" + SavedViewId), TEXT("application/vnd.bentley.itwin-platform.v1+json"), + {}, + {}, + {}, + true /*bAllowEmptyResponse*/ }; - TProcessHttpRequest( + + // store request ID which will be used + RequestID delRequestID(ITwin::NO_REQUEST); + { + FImpl::FLock Lock(Impl->mutex_); + delRequestID = Impl->nextRequestId_; + } + RequestID const requestID = TProcessHttpRequest( savedViewsRequestInfo, [](FString& ErrorCode, FJsonObject const& responseJson) -> bool { @@ -1142,22 +1240,33 @@ void UITwinWebServices::DeleteSavedView(FString SavedViewId) ErrorCode = {}; return true; }, - [this](bool bResult, FString const& strResponse) + [this, delRequestID, SavedViewId](bool bResult, FString const& strResponse) { - this->OnDeleteSavedViewComplete.Broadcast(bResult, strResponse); - if (this->Impl->observer_) + // in DeleteSavedView, the callbacks expect an error message (in case of failure) + // => if none if provided, and if the last error recorded corresponds to our request, use the + // latter as response. + FString OutResponse = strResponse; + if (!bResult && OutResponse.IsEmpty()) { - this->Impl->observer_->OnSavedViewDeleted(bResult, strResponse); + OutResponse = GetRequestError(delRequestID); } + this->OnSavedViewDeleted(bResult, SavedViewId, OutResponse); } ); + ensureMsgf(delRequestID == requestID, TEXT("mismatch in request ID - error might be lost")); +} + +void UITwinWebServices::OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) const +{ + OnDeleteSavedViewComplete.Broadcast(bSuccess, SavedViewId, Response); + if (Impl->observer_) + { + Impl->observer_->OnSavedViewDeleted(bSuccess, SavedViewId, Response); + } } void UITwinWebServices::EditSavedView(FSavedView SavedView, FSavedViewInfo SavedViewInfo) { - const auto Request = FHttpModule::Get().CreateRequest(); - const auto& camPos = SavedView.Origin; - const auto& camRot = SavedView.Angles; const FITwinAPIRequestInfo savedViewsRequestInfo = { TEXT("PATCH"), TEXT("/savedviews/" + SavedViewInfo.Id), @@ -1165,8 +1274,8 @@ void UITwinWebServices::EditSavedView(FSavedView SavedView, FSavedViewInfo Saved /*** additional settings for PATCH ***/ TEXT("application/json"), - FString::Printf(TEXT("{\"savedViewData\":{\"itwin3dView\":{\"origin\":[%.2f,%.2f,%.2f],\"extents\":[0.00,0.00,0.00],\"angles\":{\"yaw\":%.2f,\"pitch\":%.2f,\"roll\":%.2f},\"camera\":{\"lens\":0.0,\"focusDist\":0.0,\"eye\":[%.2f,%.2f,%.2f]}}},\"displayName\":\"%s\",\"shared\":true,\"tagIds\":[]}"), - camPos.X, camPos.Y, camPos.Z, camRot.Yaw, camRot.Pitch, camRot.Roll, camPos.X, camPos.Y, camPos.Z, *SavedViewInfo.DisplayName) + FString::Printf(TEXT("{%s,\"displayName\":\"%s\",\"shared\":true,\"tagIds\":[]}"), + *GetSavedViewData_Json(SavedView), *SavedViewInfo.DisplayName) }; struct FEditSavedViewData @@ -1190,8 +1299,15 @@ void UITwinWebServices::EditSavedView(FSavedView SavedView, FSavedViewInfo Saved const auto& JsonEye = JsonView->GetObjectField("camera"); - EditSVData.SavedView = { GetFVector(JsonEye, "eye"), GetFVector(JsonView, "extents"), GetFRotator(JsonView, "angles") }; - EditSVData.SavedViewInfo = { view->GetStringField("id"), view->GetStringField("displayName"), view->GetBoolField("shared") }; + EditSVData.SavedView = { + GetFVector(JsonEye, "eye"), + GetFVector(JsonView, "extents"), + GetFRotator(JsonView, "angles") + }; + EditSVData.SavedViewInfo = { + view->GetStringField("id"), + view->GetStringField("displayName"), + view->GetBoolField("shared") }; return true; }, [this](bool bResult, FEditSavedViewData const& EditSVData) diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServicesObserver.cpp b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServicesObserver.cpp index ccea934..99dbd3c 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServicesObserver.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Private/ITwinWebServices/ITwinWebServicesObserver.cpp @@ -61,7 +61,7 @@ void FITwinDefaultWebServicesObserver::OnSavedViewAdded(bool bSuccess, FSavedVie { checkf(false, TEXT("%s does not handle SavedViews"), GetObserverName()); } -void FITwinDefaultWebServicesObserver::OnSavedViewDeleted(bool bSuccess, FString const& Response) +void FITwinDefaultWebServicesObserver::OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) { checkf(false, TEXT("%s does not handle SavedViews"), GetObserverName()); } diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinCoordSystem.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinCoordSystem.h new file mode 100644 index 0000000..f46c743 --- /dev/null +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinCoordSystem.h @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------+ +| +| $Source: ITwinCoordSystem.h $ +| +| $Copyright: (c) 2024 Bentley Systems, Incorporated. All rights reserved. $ +| ++--------------------------------------------------------------------------------------*/ + +#pragma once + +#include "CoreMinimal.h" + +#include + + +UENUM(BlueprintType) +enum class EITwinCoordSystem : uint8 +{ + ITwin, + UE UMETA(DisplayName = "Unreal") +}; diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinIModel.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinIModel.h index ac340e5..43ddea4 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinIModel.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinIModel.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include @@ -97,7 +98,10 @@ class ITWINRUNTIME_API AITwinIModel : public AITwinServiceActor #if WITH_EDITOR virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; #endif - + + virtual void Tick(float DeltaTime) override; + virtual bool ShouldTickIfViewportsOnly() const override; + //! To be called at least once after ServerConnection, IModelId, ChangesetId have been set. //! This will query the mesh export service for a corresponding export, and if complete one is found, //! It will spawn the corresponding Cesium tileset. @@ -109,7 +113,12 @@ class ITWINRUNTIME_API AITwinIModel : public AITwinServiceActor UFUNCTION(Category = "iTwin|Info", BlueprintCallable) - void GetModel3DInfo(FITwinIModel3DInfo& Info); + void GetModel3DInfo(FITwinIModel3DInfo& Info) const; + + UFUNCTION(Category = "iTwin|Info", + BlueprintCallable) + void GetModel3DInfoInCoordSystem(FITwinIModel3DInfo& OutInfo, EITwinCoordSystem CoordSystem, + bool bGetLegacy3DFTValue = false) const; UFUNCTION(Category = "iTwin|Load", BlueprintCallable) @@ -118,8 +127,10 @@ class ITWINRUNTIME_API AITwinIModel : public AITwinServiceActor UPROPERTY(Category = "iTwin|Load", BlueprintAssignable) FOnIModelLoaded OnIModelLoaded; - + //! Start a new export of the iModel by the mesh export service. + //! If the export is successfully started, the actor will regularly check for its completion and the + //! tileset will be loaded automatically as soon as the export is complete. UFUNCTION(Category = "iTwin|Load", CallInEditor, BlueprintCallable) @@ -148,7 +159,12 @@ class ITWINRUNTIME_API AITwinIModel : public AITwinServiceActor void OnSavedViewsRetrieved(bool bSuccess, FSavedViewInfos SavedViews); private: + void AutoExportAndLoad(); + void TestExportCompletionAfterDelay(FString const& InExportId, float DelayInSeconds); + void SetResolvedChangesetId(FString const& InChangesetId); + + void OnLoadingUIEvent(); void UpdateAfterLoadingUIEvent(); void DestroyTileset(); @@ -163,7 +179,7 @@ class ITWINRUNTIME_API AITwinIModel : public AITwinServiceActor virtual void OnSavedViewInfosRetrieved(bool bSuccess, FSavedViewInfos const& Infos) override; virtual void OnSavedViewRetrieved(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; virtual void OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo) override; - virtual void OnSavedViewDeleted(bool bSuccess, FString const& Response) override; + virtual void OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) override; virtual void OnSavedViewEdited(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; /// overridden from FITwinDefaultWebServicesObserver: diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinSavedView.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinSavedView.h index abfd25f..0fedf06 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinSavedView.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinSavedView.h @@ -86,7 +86,7 @@ class ITWINRUNTIME_API AITwinSavedView : public AITwinServiceActor /// overridden from IITwinWebServicesObserver: virtual void OnSavedViewRetrieved(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; virtual void OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo) override; - virtual void OnSavedViewDeleted(bool bSuccess, FString const& Response) override; + virtual void OnSavedViewDeleted(bool bSuccess, FString const& InSavedViewId, FString const& Response) override; virtual void OnSavedViewEdited(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; /// overridden from FITwinDefaultWebServicesObserver diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinServiceActor.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinServiceActor.h index 16f8883..89c4d56 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinServiceActor.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinServiceActor.h @@ -36,6 +36,13 @@ class ITWINRUNTIME_API AITwinServiceActor : public AActor, public FITwinDefaultW AITwinServiceActor(); virtual void Destroyed() override; + UFUNCTION(Category = "iTwin", + BlueprintCallable) + const UITwinWebServices* GetWebServices() const; + + UFUNCTION(Category = "iTwin", + BlueprintCallable) + UITwinWebServices* GetMutableWebServices(); protected: UPROPERTY() diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServices.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServices.h index 29e4f3e..7bc7443 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServices.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServices.h @@ -26,7 +26,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnGetExportsComplete, bool, bSucce DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnGetExportInfoComplete, bool, bSuccess, FITwinExportInfo, Export); DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnStartExportComplete, bool, bSuccess, FString, ExportId); DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnAddSavedViewComplete, bool, bSuccess, FSavedViewInfo, SavedViewInfo); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnDeleteSavedViewComplete, bool, bSuccess, FString, Response); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnDeleteSavedViewComplete, bool, bSuccess, FString, SavedViewId, FString, Response); DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnEditSavedViewComplete, bool, bSuccess, FSavedView, SavedView, FSavedViewInfo, SavedViewInfo); DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnGetSavedViewsComplete, bool, bSuccess, FSavedViewInfos, SavedViews); DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FOnGetSavedViewComplete, bool, bSuccess, FSavedView, SavedView, FSavedViewInfo, SavedViewInfo); @@ -87,9 +87,11 @@ class ITWINRUNTIME_API UITwinWebServices : public UObject, public IITwinAuthoriz UFUNCTION(BlueprintCallable, Category = "iTwin Web Services") void AddSavedView(FString ITwinId, FString IModelId, FSavedView SavedView, FSavedViewInfo SavedViewInfo); + void OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo); UFUNCTION(BlueprintCallable, Category = "iTwin Web Services") void DeleteSavedView(FString SavedViewId); + void OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) const; UFUNCTION(BlueprintCallable, Category = "iTwin Web Services") void EditSavedView(FSavedView SavedView, FSavedViewInfo SavedViewInfo); @@ -156,6 +158,7 @@ class ITWINRUNTIME_API UITwinWebServices : public UObject, public IITwinAuthoriz bool HasSameConnection(AITwinServerConnection const* Connection) const; void SetObserver(IITwinWebServicesObserver* InObserver); + bool HasObserver(IITwinWebServicesObserver const* Observer) const; static void SetITwinAppIDArray(ITwin::AppIDArray const& iTwinAppIDs); @@ -177,17 +180,24 @@ class ITWINRUNTIME_API UITwinWebServices : public UObject, public IITwinAuthoriz void OnAuthDoneImpl(bool bSuccess, FString const& Error, bool bBroadcastResult = true); virtual void OnAuthorizationDone(bool bSuccess, FString const& Error) override; - FString GetAuthToken() const; - void SetLastError(FString const& InError); - void DoGetiModelChangesets(FString const& iModelId, bool bRestrictToLatest); + /// This Request ID is relative to each instance of UITwinWebServices, it is *not* a global unique + /// identifier for requests (hence it should be kept it private...) + /// For now its only purpose is to test if the last error message was created for current request or not. + using RequestID = uint32; + + void SetLastError(FString const& InError, RequestID InRequestId); + + //! Returns the error stored for the given request, if any. + FString GetRequestError(RequestID InRequestId) const; + struct FITwinAPIRequestInfo; template - void TProcessHttpRequest( + RequestID TProcessHttpRequest( FITwinAPIRequestInfo const& RequestInfo, FunctorType&& InFunctor, DelegateAsFunctor&& InResultFunctor); diff --git a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServicesObserver.h b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServicesObserver.h index da71cda..9d1dbcb 100644 --- a/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServicesObserver.h +++ b/Public/UnrealProjects/ITwinTestApp/Plugins/ITwinForUnreal/Source/ITwinRuntime/Public/ITwinWebServices/ITwinWebServicesObserver.h @@ -45,7 +45,7 @@ class ITWINRUNTIME_API IITwinWebServicesObserver : public IITwinAuthorizationObs virtual void OnSavedViewInfosRetrieved(bool bSuccess, FSavedViewInfos const& Infos) = 0; virtual void OnSavedViewRetrieved(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) = 0; virtual void OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo) = 0; - virtual void OnSavedViewDeleted(bool bSuccess, FString const& Response) = 0; + virtual void OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) = 0; virtual void OnSavedViewEdited(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) = 0; }; @@ -70,7 +70,7 @@ class ITWINRUNTIME_API FITwinDefaultWebServicesObserver : public IITwinWebServic virtual void OnSavedViewInfosRetrieved(bool bSuccess, FSavedViewInfos const& Infos) override; virtual void OnSavedViewRetrieved(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; virtual void OnSavedViewAdded(bool bSuccess, FSavedViewInfo const& SavedViewInfo) override; - virtual void OnSavedViewDeleted(bool bSuccess, FString const& Response) override; + virtual void OnSavedViewDeleted(bool bSuccess, FString const& SavedViewId, FString const& Response) override; virtual void OnSavedViewEdited(bool bSuccess, FSavedView const& SavedView, FSavedViewInfo const& SavedViewInfo) override; protected: diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/IModelSelectionMenuScript.cpp b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/IModelSelectionMenuScript.cpp index 816b8a3..429a0dc 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/IModelSelectionMenuScript.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/IModelSelectionMenuScript.cpp @@ -38,9 +38,15 @@ void AIModelSelectionMenuScript::OnLoadIModel(FString InIModelId, FString InExpo void AIModelSelectionMenuScript::IModelLoaded(bool bSuccess) { - FITwinIModel3DInfo IModel3dInfo; - IModel->GetModel3DInfo(IModel3dInfo); - TopPanel->SetIModelInfo(ITwinId, IModelId, IModel3dInfo); + // for compatibility with former 3DFT plugin, we hold the 2 versions + FITwinIModel3DInfo IModel3dInfo_iTwin, IModel3dInfo_UE; + + IModel->GetModel3DInfoInCoordSystem(IModel3dInfo_iTwin, EITwinCoordSystem::ITwin); + TopPanel->SetIModelInfo(ITwinId, IModelId, IModel3dInfo_iTwin); + + IModel->GetModel3DInfoInCoordSystem(IModel3dInfo_UE, EITwinCoordSystem::UE); + TopPanel->SetIModel3DInfoInCoordSystem(IModel3dInfo_UE, EITwinCoordSystem::UE); + TopPanel->GetAllSavedViews(); TopPanel->ZoomOnIModel(); } diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/ITwinSelector.cpp b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/ITwinSelector.cpp index 1565800..8afbac3 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/ITwinSelector.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/ITwinSelector.cpp @@ -132,12 +132,12 @@ void AITwinSelector::GetExportInfoComplete(bool bSuccess, FITwinExportInfo Expor { FString State; GetExportState(State, Export); - if (State == "Complete") + if (State == TEXT("Complete")) { LoadIModel(); return; } - if (State == "Invalid") + if (State == TEXT("Invalid")) { UI->ShowPanel(2); return; diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenu.cpp b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenu.cpp index d1ed083..3d3c188 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenu.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenu.cpp @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include @@ -37,19 +39,45 @@ void ATopMenu::SetIModelInfo(const FString& InITwinId, const FString& InIModelId { ITwinId = InITwinId; IModelId = InIModelId; - IModel3dInfo = IModelInfo; + SetIModel3DInfoInCoordSystem(IModelInfo, EITwinCoordSystem::ITwin); +} + +void ATopMenu::SetIModel3DInfoInCoordSystem(const FITwinIModel3DInfo& IModelInfo, EITwinCoordSystem CoordSystem) +{ + // see comment in #StartCameraMovementToSavedView + ensureMsgf(CoordSystem == EITwinCoordSystem::UE || IModelInfo.ModelCenter == FVector(0, 0, 0), + TEXT("No offset needed for SavedViews with Cesium tiles")); + + FITwinIModel3DInfo& DstInfo = (CoordSystem == EITwinCoordSystem::UE) + ? IModel3dInfo_UE + : IModel3dInfo_ITwin; + DstInfo = IModelInfo; } void ATopMenu::GetAllSavedViews() { - AITwinIModel const& IModel = *Cast(UGameplayStatics::GetActorOfClass(GetWorld(), AITwinIModel::StaticClass())); - ITwinWebService->OnGetSavedViewsComplete.AddDynamic(&IModel, &AITwinIModel::OnSavedViewsRetrieved); + AITwinIModel* IModel = Cast(UGameplayStatics::GetActorOfClass(GetWorld(), AITwinIModel::StaticClass())); + if (ensure(IModel != nullptr)) + { + ITwinWebService->OnGetSavedViewsComplete.AddDynamic(IModel, &AITwinIModel::OnSavedViewsRetrieved); + + UITwinWebServices* IModelWebServices = IModel->GetMutableWebServices(); + if (IModelWebServices) + { + // bind the add/delete saved view callback so that we update the list of saved views in the UI + IModelWebServices->OnAddSavedViewComplete.AddDynamic(this, &ATopMenu::SavedViewAdded); + IModelWebServices->OnDeleteSavedViewComplete.AddDynamic(this, &ATopMenu::SavedViewDeleted); + } + } ITwinWebService->GetAllSavedViews(ITwinId, IModelId); } void ATopMenu::ZoomOnIModel() { + // working in ITwin coordinate system here like in former 3DFT plugin would make no sense at all here... + auto const& IModel3dInfo = GetIModel3DInfoInCoordSystem(EITwinCoordSystem::UE); + GetWorld()->GetFirstPlayerController()->GetPawnOrSpectator()->SetActorLocation( IModel3dInfo.ModelCenter // "0.5" is empirical, let's not be too far from the center of things, iModels tend to have @@ -89,6 +117,24 @@ void ATopMenu::GetSavedView(bool bSuccess, FSavedView SavedView, FSavedViewInfo }), BlendTime, false); } +void ATopMenu::SavedViewAdded(bool bSuccess, FSavedViewInfo SavedViewInfo) +{ + if (bSuccess) + { + UI->AddSavedView(SavedViewInfo.DisplayName, SavedViewInfo.Id); + } +} + +void ATopMenu::SavedViewDeleted(bool bSuccess, FString SavedViewId, FString Response) +{ + if (!bSuccess) + { + // we could display the error message... + return; + } + UI->RemoveSavedView(SavedViewId); +} + void ATopMenu::OnZoom() { ZoomOnIModel(); @@ -98,7 +144,15 @@ void ATopMenu::StartCameraMovementToSavedView(float& OutBlendTime, ACameraActor* { OutBlendTime = BlendTime; FVector UEPos; - ITwinPositionToUE(UEPos, SavedView.Origin, {0.0,0.0,0.0}); + // Note that we work in iTwin coordinate system here, and then convert to UE, as done in former + // 3DFT plugin: + auto const& IModel3dInfo = GetIModel3DInfoInCoordSystem(EITwinCoordSystem::ITwin); + // With Cesium tiles, there is no need (and it would be wrong) to subtract the 'ModelCenter' here as done + // in 3DFT plugin (this requirement was induced by former 3DFT geometry handling). + // To avoid enforcing users to change all blueprints based on the default level of the 3DFT plugin, we + // have decided to reset this ModelCenter to zero. + checkfSlow(IModel3dInfo.ModelCenter == FVector(0, 0, 0), TEXT("No offset needed for SavedViews with Cesium tiles")); + ITwinPositionToUE(UEPos, SavedView.Origin, IModel3dInfo.ModelCenter); FRotator UERotation; ITwinRotationToUE(UERotation, SavedView.Angles); Transform = FTransform(UERotation, UEPos); @@ -125,5 +179,10 @@ void ATopMenu::ITwinRotationToUE(FRotator& UERotation, const FRotator& ITwinRota void ATopMenu::ITwinPositionToUE(FVector& UEPos, const FVector& ITwinPos, const FVector& ModelOrigin) { - UEPos = (ITwinPos-ModelOrigin)*FVector(100, -100, 100); + UEPos = (ITwinPos - ModelOrigin) * FVector(100, -100, 100); +} + +FITwinIModel3DInfo const& ATopMenu::GetIModel3DInfoInCoordSystem(EITwinCoordSystem CoordSystem) const +{ + return (CoordSystem == EITwinCoordSystem::UE) ? IModel3dInfo_UE : IModel3dInfo_ITwin; } diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenuWidgetImpl.cpp b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenuWidgetImpl.cpp index a938e26..55bf8bc 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenuWidgetImpl.cpp +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Private/TopMenuWidgetImpl.cpp @@ -75,3 +75,18 @@ void UTopMenuWidgetImpl::AddSavedView(const FString& DisplayName, const FString& SavedViewsValues.Add(Value); ComboBox_SavedViews->AddOption(DisplayName); } + +void UTopMenuWidgetImpl::RemoveSavedView(const FString& SavedViewId) +{ + ensureMsgf(SavedViewsValues.Num() == ComboBox_SavedViews->GetOptionCount(), TEXT("SavedView UI Invariant")); + + TArray::SizeType SavedViewIndex; + if (SavedViewsValues.Find(SavedViewId, SavedViewIndex)) + { + SavedViewsValues.RemoveAt(SavedViewIndex); + if (ensure(SavedViewIndex < ComboBox_SavedViews->GetOptionCount())) + { + ComboBox_SavedViews->RemoveOption(ComboBox_SavedViews->GetOptionAtIndex(SavedViewIndex)); + } + } +} diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenu.h b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenu.h index ad197e6..0eb9899 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenu.h +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenu.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include @@ -29,6 +30,8 @@ class ITWINTESTAPP_API ATopMenu: public AActor UFUNCTION(BlueprintCallable) void SetIModelInfo(const FString& InITwinId, const FString& InIModelId, const FITwinIModel3DInfo& IModelInfo); UFUNCTION(BlueprintCallable) + void SetIModel3DInfoInCoordSystem(const FITwinIModel3DInfo& IModelInfo, EITwinCoordSystem CoordSystem); + UFUNCTION(BlueprintCallable) void ZoomOnIModel(); private: UPROPERTY() @@ -40,7 +43,9 @@ class ITWINTESTAPP_API ATopMenu: public AActor UPROPERTY() FString IModelId; UPROPERTY() - FITwinIModel3DInfo IModel3dInfo; + FITwinIModel3DInfo IModel3dInfo_ITwin; + UPROPERTY() + FITwinIModel3DInfo IModel3dInfo_UE; UFUNCTION(BlueprintCallable) void OnSavedViews(bool bSuccess, FSavedViewInfos SavedViews); UFUNCTION(BlueprintCallable) @@ -48,6 +53,10 @@ class ITWINTESTAPP_API ATopMenu: public AActor UFUNCTION(BlueprintCallable) void GetSavedView(bool bSuccess, FSavedView SavedView, FSavedViewInfo SavedViewInfo); UFUNCTION(BlueprintCallable) + void SavedViewAdded(bool bSuccess, FSavedViewInfo SavedViewInfo); + UFUNCTION(BlueprintCallable) + void SavedViewDeleted(bool bSuccess, FString SavedViewId, FString Response); + UFUNCTION(BlueprintCallable) void OnZoom(); UFUNCTION(BlueprintCallable) void StartCameraMovementToSavedView(float& OutBlendTime, ACameraActor*& Actor, FTransform& Transform, const FSavedView& SavedView, float BlendTime); @@ -57,4 +66,6 @@ class ITWINTESTAPP_API ATopMenu: public AActor void ITwinRotationToUE(FRotator& UERotation, const FRotator& ITwinRotation); UFUNCTION(BlueprintCallable) void ITwinPositionToUE(FVector& UEPos, const FVector& ITwinPos, const FVector& ModelOrigin); + UFUNCTION(BlueprintCallable) + FITwinIModel3DInfo const& GetIModel3DInfoInCoordSystem(EITwinCoordSystem CoordSystem) const; }; diff --git a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenuWidgetImpl.h b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenuWidgetImpl.h index eac1127..e54b45b 100644 --- a/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenuWidgetImpl.h +++ b/Public/UnrealProjects/ITwinTestApp/Source/ITwinTestApp/Public/TopMenuWidgetImpl.h @@ -33,6 +33,8 @@ class UTopMenuWidgetImpl: public UUserWidget void UpdateElementId(bool bVisible, const FString& InElementId); UFUNCTION(BlueprintCallable) void AddSavedView(const FString& DisplayName, const FString& Value); + UFUNCTION(BlueprintCallable) + void RemoveSavedView(const FString& SavedViewId); protected: virtual void NativeConstruct() override; private: diff --git a/README.md b/README.md index 15a9af6..22a558f 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ ## Introduction The iTwin for Unreal SDK enables streaming of iModels and reality data from the iTwin cloud into Unreal Engine for high-fidelity visualization and consumption. Additionally, the SDK allows Unreal Engine developers to create custom applications which can expand upon the capabilities provided by the SDK out of the box. This enables the creation of tailored interactive experiences around iTwins. In addition, we provide a pre-compiled plugin version of the SDK.
The streaming technology is based on the open-source Cesium 3D tiles (link to the Cesium github) and offers great performance even with large datasets. The SDK is based on the experience gathered through the technology previews introduced by the Datasmith Connector and the 3DFT plugin during the last year.
-The iTwin for Unreal SDK will supersede these technology demos and become the foundation of our upcoming advanced visualization products. It embodies Bentley’s long-term commitment to offering scalable and future-proven technologies and open standards for any visualization needs of infrastructure and Digital Twins.
-This SDK will be regularly updated. We appreciate your feedback to turn this exciting new technology into the leading foundation for advanced visualization of Digital Twins leveraging game engine technology. We encourage you to participate in the SDK’s development with your ideas, requests and wishes, and help us shape the future of visualization together. +The iTwin for Unreal SDK will supersede these technology demos and become the foundation of our upcoming advanced visualization products. It embodies Bentley’s long-term commitment to offering scalable and future-proven technologies and open standards for any visualization needs of infrastructure and Digital Twins.
+This SDK will be regularly updated. We appreciate your feedback to turn this exciting new technology into the leading foundation for advanced visualization of Digital Twins leveraging game engine technology. We encourage you to participate in the SDK’s development with your ideas, requests and wishes, and help us shape the future of visualization together. ## Supported features @@ -20,6 +20,8 @@ Only iModels and their Saved Views are supported at the moment; Reality Data can You also need a Bentley account to stream iModels from the cloud.
To run Unreal Engine, make sure you are using a dedicated GPU. The performance largely depends on the power of your graphics card. For more information on recommended system specs for Unreal Engine, please visit [Epic's website](https://dev.epicgames.com/documentation/de-de/unreal-engine/hardware-and-software-specifications-for-unreal-engine). +We recorded a quick start video on [YouTube](https://www.youtube.com/watch?v=quf4t4LsqXw). Read on for the written steps of the installation process. + ## 1. Installing the precompiled iTwin plugin for Unreal @@ -55,8 +57,11 @@ For example: `C:\MyUnrealApp\Plugins\ITwinForUnreal`. - `Loading Method`: `Automatic` - `iModel Id`: the ID of your iModel - `Changeset Id`: the ID of the changeset you want to import - Then the iModel should appear in the viewport.
- This may take some time if the iModel has never been imported yet (because the iTwin server needs to convert it to the Cesium format first). + Then the iModel should appear in the viewport. + If the selected iModel/changeset has never been imported yet, the iTwin server needs to convert (ie. export) it into the Cesium format.
+ In such case the export will be automatically started, and the “Export Status” label will say “In progress” until the export is complete.
+ This can take a long time, depending on the complexity of your iModel. Once the export is complete, the iModel will appear in the viewport. + ### In an existing project which uses the [3DFT plugin](https://github.com/iTwin/unreal-engine-3dft-plugin)