Cesium for Unreal 2.13.2
Loading...
Searching...
No Matches
CesiumTile.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include <Cesium3DTilesSelection/BoundingVolume.h>
7#include "CesiumTile.generated.h"
8
9/**
10 * A UObject representation of a Cesium Tile.
11 * This class provides an interface for accessing properties of a Cesium Tile
12 * from within Unreal Engine. It exposes the Bounds property, which can be
13 * accessed from Blueprints, and provides a helper function for testing
14 * intersection with a primitive component.
15 */
16UCLASS()
17class CESIUMRUNTIME_API UCesiumTile : public UPrimitiveComponent {
18 GENERATED_BODY()
19
20 glm::dmat4 _tileTransform;
21
23 CesiumGeometry::OrientedBoundingBox(glm::dvec3(0.0), glm::dmat3(1.0));
24
25public:
26 /**
27 * Tests whether a primitive component overlaps with this tile using a sphere
28 * and box comparison. This function provides a convenient way to test for
29 * intersection between a primitive component and this tile.
30 */
31 UFUNCTION(BlueprintCallable, Category = "Cesium")
32 bool TileBoundsOverlapsPrimitive(const UPrimitiveComponent* Other) const;
33
34 /**
35 * Checks if this tile is fully inside the given primitive component using a
36 * sphere and box comparison. It uses the FBox::IsInside function to compare
37 * the FBox of the component and the tile's bounds.
38 */
39 UFUNCTION(BlueprintCallable, Category = "Cesium")
40 bool
41 PrimitiveBoxFullyContainsTileBounds(const UPrimitiveComponent* Other) const;
42
43 virtual FBoxSphereBounds
44 CalcBounds(const FTransform& LocalToWorld) const override;
45
46 friend class CesiumTileExcluderAdapter;
47};
A UObject representation of a Cesium Tile.
Definition CesiumTile.h:17
std::variant< CesiumGeometry::BoundingSphere, CesiumGeometry::OrientedBoundingBox, CesiumGeospatial::BoundingRegion, CesiumGeospatial::BoundingRegionWithLooseFittingHeights, CesiumGeospatial::S2CellBoundingVolume > BoundingVolume