初始提交: UE5.3项目基础框架
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
// Copyright 2020-2024 CesiumGS, Inc. and Contributors
|
||||
|
||||
#include "CesiumTileMapServiceRasterOverlay.h"
|
||||
#include "CesiumRasterOverlays/TileMapServiceRasterOverlay.h"
|
||||
#include "CesiumRuntime.h"
|
||||
|
||||
std::unique_ptr<CesiumRasterOverlays::RasterOverlay>
|
||||
UCesiumTileMapServiceRasterOverlay::CreateOverlay(
|
||||
const CesiumRasterOverlays::RasterOverlayOptions& options) {
|
||||
if (this->Url.IsEmpty()) {
|
||||
// Don't create an overlay with an empty URL.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CesiumRasterOverlays::TileMapServiceRasterOverlayOptions tmsOptions;
|
||||
if (MaximumLevel > MinimumLevel && bSpecifyZoomLevels) {
|
||||
tmsOptions.minimumLevel = MinimumLevel;
|
||||
tmsOptions.maximumLevel = MaximumLevel;
|
||||
}
|
||||
return std::make_unique<CesiumRasterOverlays::TileMapServiceRasterOverlay>(
|
||||
TCHAR_TO_UTF8(*this->MaterialLayerKey),
|
||||
TCHAR_TO_UTF8(*this->Url),
|
||||
std::vector<CesiumAsync::IAssetAccessor::THeader>(),
|
||||
tmsOptions,
|
||||
options);
|
||||
}
|
||||
Reference in New Issue
Block a user