-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1421 from CesiumGS/terrain-query-test
Add Unreal API for terrain height querying
- Loading branch information
Showing
22 changed files
with
1,209 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
#pragma once | ||
|
||
#include "HAL/Platform.h" | ||
#include <gsl/span> | ||
|
||
enum class ECesiumMetadataType : uint8; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Source/CesiumRuntime/Private/CesiumSampleHeightMostDetailedAsyncAction.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2020-2024 CesiumGS, Inc. and Contributors | ||
#include "CesiumSampleHeightMostDetailedAsyncAction.h" | ||
#include "Cesium3DTileset.h" | ||
#include "CesiumRuntime.h" | ||
|
||
/*static*/ UCesiumSampleHeightMostDetailedAsyncAction* | ||
UCesiumSampleHeightMostDetailedAsyncAction::SampleHeightMostDetailed( | ||
ACesium3DTileset* Tileset, | ||
const TArray<FVector>& LongitudeLatitudeHeightArray) { | ||
UCesiumSampleHeightMostDetailedAsyncAction* pAsyncAction = | ||
NewObject<UCesiumSampleHeightMostDetailedAsyncAction>(); | ||
pAsyncAction->_pTileset = Tileset; | ||
pAsyncAction->_longitudeLatitudeHeightArray = LongitudeLatitudeHeightArray; | ||
|
||
return pAsyncAction; | ||
} | ||
|
||
void UCesiumSampleHeightMostDetailedAsyncAction::Activate() { | ||
this->RegisterWithGameInstance(this->_pTileset); | ||
|
||
this->_pTileset->SampleHeightMostDetailed( | ||
this->_longitudeLatitudeHeightArray, | ||
FCesiumSampleHeightMostDetailedCallback::CreateUObject( | ||
this, | ||
&UCesiumSampleHeightMostDetailedAsyncAction::RaiseOnHeightsSampled)); | ||
} | ||
|
||
void UCesiumSampleHeightMostDetailedAsyncAction::RaiseOnHeightsSampled( | ||
ACesium3DTileset* Tileset, | ||
const TArray<FCesiumSampleHeightResult>& Result, | ||
const TArray<FString>& Warnings) { | ||
this->OnHeightsSampled.Broadcast(Result, Warnings); | ||
this->SetReadyToDestroy(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.