cesium-native 0.44.2
Loading...
Searching...
No Matches
EllipsoidTilesetLoader.h
1#pragma once
2
3#include <Cesium3DTilesSelection/ITilesetHeightSampler.h>
4#include <Cesium3DTilesSelection/Tileset.h>
5#include <CesiumGeometry/QuadtreeTilingScheme.h>
6
14public:
21 const CesiumGeospatial::Ellipsoid& ellipsoid CESIUM_DEFAULT_ELLIPSOID);
22
29 static std::unique_ptr<Tileset> createTileset(
30 const TilesetExternals& externals,
31 const TilesetOptions& options = TilesetOptions{});
32
34 loadTileContent(const TileLoadInput& input) override;
36 const Tile& tile,
37 const CesiumGeospatial::Ellipsoid& ellipsoid
38 CESIUM_DEFAULT_ELLIPSOID) override;
39
41
43 const CesiumAsync::AsyncSystem& asyncSystem,
44 std::vector<CesiumGeospatial::Cartographic>&& positions) override;
45
46private:
47 struct Geometry {
48 std::vector<uint16_t> indices;
49 std::vector<glm::vec3> vertices;
50 std::vector<glm::vec3> normals;
51 };
52
53 void createChildTile(
54 const Tile& parent,
55 std::vector<Tile>& children,
56 const CesiumGeometry::QuadtreeTileID& childID) const;
57
59 createBoundingRegion(const CesiumGeometry::QuadtreeTileID& quadtreeID) const;
60 Geometry createGeometry(const Tile& tile) const;
61 CesiumGltf::Model createModel(const Geometry& geometry) const;
62
65};
66} // 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:96
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:12
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:39
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