cesium-native 0.43.0
Loading...
Searching...
No Matches
EllipsoidTilesetLoader.h
1#pragma once
2
3#include "ITilesetHeightSampler.h"
4
5#include <Cesium3DTilesSelection/Tileset.h>
6#include <CesiumGeometry/QuadtreeTilingScheme.h>
7
15public:
22 const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
23
30 static std::unique_ptr<Tileset> createTileset(
31 const TilesetExternals& externals,
32 const TilesetOptions& options = TilesetOptions{});
33
35 loadTileContent(const TileLoadInput& input) override;
37 const Tile& tile,
38 const CesiumGeospatial::Ellipsoid& ellipsoid
39 CESIUM_DEFAULT_ELLIPSOID) override;
40
42
44 const CesiumAsync::AsyncSystem& asyncSystem,
45 std::vector<CesiumGeospatial::Cartographic>&& positions) override;
46
47private:
48 struct Geometry {
49 std::vector<uint16_t> indices;
50 std::vector<glm::vec3> vertices;
51 std::vector<glm::vec3> normals;
52 };
53
54 void createChildTile(
55 const Tile& parent,
56 std::vector<Tile>& children,
57 const CesiumGeometry::QuadtreeTileID& childID) const;
58
60 createBoundingRegion(const CesiumGeometry::QuadtreeTileID& quadtreeID) const;
61 Geometry createGeometry(const Tile& tile) const;
62 CesiumGltf::Model createModel(const Geometry& geometry) const;
63
66};
67} // namespace Cesium3DTilesSelection
A loader that will generate a tileset by tesselating the surface of an ellipsoid, producing a simple ...
static std::unique_ptr< Tileset > createTileset(const TilesetExternals &externals, const TilesetOptions &options=TilesetOptions{})
Creates a new tileset with this loader.
TileChildrenResult createTileChildren(const Tile &tile, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84) override
Create the tile's children.
EllipsoidTilesetLoader(const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Constructs a new instance.
ITilesetHeightSampler * getHeightSampler() override
Gets an interface that can be used to efficiently query heights from this tileset.
CesiumAsync::Future< TileLoadResult > loadTileContent(const TileLoadInput &input) override
Load the tile content.
CesiumAsync::Future< SampleHeightResult > sampleHeights(const CesiumAsync::AsyncSystem &asyncSystem, std::vector< CesiumGeospatial::Cartographic > &&positions) override
Queries the heights at a list of locations.
An interface to query heights from a tileset that can do so efficiently without necessarily downloadi...
A tile in a Tileset.
Definition Tile.h:97
The loader interface to load the tile content.
External interfaces used by a Tileset.
A system for managing asynchronous requests and tasks.
Definition AsyncSystem.h:36
A value that will be available in the future, as produced by AsyncSystem.
Definition Promise.h:11
Defines how a rectangular region is divided into quadtree tiles.
A bounding volume specified as a longitude/latitude bounding box and a minimum and maximum height.
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:38
A map projection where longitude and latitude are mapped using an Ellipsoid.
Classes that implement the 3D Tiles standard.
Store the result of creating tile's children after invoking TilesetContentLoader::createTileChildren.
Store the parameters that are needed to load a tile.
Additional options for configuring a Tileset.
Uniquely identifies a node in a quadtree.
This class is not meant to be instantiated directly. Use Model instead.
Definition Model.h:14