-
Notifications
You must be signed in to change notification settings - Fork 330
[enhancement#1658] mesh, material and tile loading callbacks #1669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8b92701
6025fa9
51d7b21
e30313e
dd2bf54
e15b06a
65efbd2
40676e5
5d357f5
380fa13
335d612
d58decc
e4336ac
cb8cade
c33861f
8113a0a
f047b24
1293e31
e16a061
1adf464
f2fd3a0
67f880c
ceb0511
17c87f8
7c8b222
ebd52b1
2430526
42f31ec
ca34f86
7e19b17
a08335e
2daba76
f8293a5
ff67aa4
c8b3006
cf29ac1
4bb28fe
52bd20d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,15 @@ | |
| #include "Cesium3DTilesSelection/Tile.h" | ||
| #include "Cesium3DTileset.h" | ||
| #include "CesiumEncodedMetadataUtility.h" | ||
| #include "CesiumLoadedTile.h" | ||
| #include "CesiumModelMetadata.h" | ||
| #include "Components/PrimitiveComponent.h" | ||
| #include "Components/SceneComponent.h" | ||
| #include "CoreMinimal.h" | ||
| #include "CustomDepthParameters.h" | ||
| #include "EncodedFeaturesMetadata.h" | ||
| #include "Interfaces/IHttpRequest.h" | ||
| #include "Templates/Function.h" | ||
| #include <CesiumAsync/SharedFuture.h> | ||
| #include <glm/mat4x4.hpp> | ||
| #include <memory> | ||
|
|
@@ -56,7 +58,7 @@ struct FRasterOverlayTile { | |
| }; | ||
|
|
||
| UCLASS() | ||
| class UCesiumGltfComponent : public USceneComponent { | ||
| class UCesiumGltfComponent : public USceneComponent, public ICesiumLoadedTile { | ||
| GENERATED_BODY() | ||
|
|
||
| public: | ||
|
|
@@ -87,7 +89,7 @@ class UCesiumGltfComponent : public USceneComponent { | |
| UMaterialInterface* BaseTranslucentMaterial, | ||
| UMaterialInterface* BaseWaterMaterial, | ||
| FCustomDepthParameters CustomDepthParameters, | ||
| const Cesium3DTilesSelection::Tile& tile, | ||
| Cesium3DTilesSelection::Tile& tile, | ||
| bool createNavCollision); | ||
|
|
||
| UCesiumGltfComponent(); | ||
|
|
@@ -104,6 +106,8 @@ class UCesiumGltfComponent : public USceneComponent { | |
| UPROPERTY(EditAnywhere, Category = "Rendering") | ||
| FCustomDepthParameters CustomDepthParameters{}; | ||
|
|
||
| Cesium3DTilesSelection::Tile* pTile = nullptr; | ||
|
||
|
|
||
| FCesiumModelMetadata Metadata{}; | ||
| EncodedFeaturesMetadata::EncodedModelMetadata EncodedMetadata{}; | ||
|
|
||
|
|
@@ -131,10 +135,18 @@ class UCesiumGltfComponent : public USceneComponent { | |
| virtual void SetCollisionEnabled(ECollisionEnabled::Type NewType); | ||
|
|
||
| virtual void BeginDestroy() override; | ||
| virtual void OnVisibilityChanged() override; | ||
|
|
||
| // from ICesiumLoadedTile | ||
| const FCesiumModelMetadata& GetModelMetadata() const override; | ||
| const Cesium3DTilesSelection::TileID& GetTileID() const override; | ||
| void SetRenderReady(bool bToggle) override; | ||
|
|
||
| void UpdateFade(float fadePercentage, bool fadingIn); | ||
|
|
||
| private: | ||
| UPROPERTY() | ||
| UTexture2D* Transparent1x1 = nullptr; | ||
|
|
||
| TFunction<void(bool /*visible*/)> VisibilityChangedObserver; | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.