-
Notifications
You must be signed in to change notification settings - Fork 212
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 #926 from CesiumGS/shared-assets
Cache images across glTFs to avoid duplication
- Loading branch information
Showing
185 changed files
with
5,170 additions
and
970 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
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
18 changes: 18 additions & 0 deletions
18
Cesium3DTilesSelection/include/Cesium3DTilesSelection/TilesetSharedAssetSystem.h
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,18 @@ | ||
#pragma once | ||
|
||
#include <CesiumGltfReader/GltfSharedAssetSystem.h> | ||
|
||
namespace Cesium3DTilesSelection { | ||
|
||
/** | ||
* @brief Contains assets that are potentially shared across multiple Tilesets. | ||
*/ | ||
class TilesetSharedAssetSystem | ||
: public CesiumGltfReader::GltfSharedAssetSystem { | ||
public: | ||
static CesiumUtility::IntrusivePointer<TilesetSharedAssetSystem> getDefault(); | ||
|
||
virtual ~TilesetSharedAssetSystem() = default; | ||
}; | ||
|
||
} // namespace Cesium3DTilesSelection |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <Cesium3DTilesSelection/TilesetSharedAssetSystem.h> | ||
|
||
using namespace Cesium3DTilesSelection; | ||
using namespace CesiumGltfReader; | ||
using namespace CesiumUtility; | ||
|
||
namespace { | ||
|
||
CesiumUtility::IntrusivePointer<TilesetSharedAssetSystem> createDefault() { | ||
CesiumUtility::IntrusivePointer<TilesetSharedAssetSystem> p = | ||
new TilesetSharedAssetSystem(); | ||
|
||
CesiumUtility::IntrusivePointer<GltfSharedAssetSystem> pGltf = | ||
GltfSharedAssetSystem::getDefault(); | ||
|
||
p->pImage = pGltf->pImage; | ||
|
||
return p; | ||
} | ||
|
||
} // namespace | ||
|
||
namespace Cesium3DTilesSelection { | ||
|
||
/*static*/ CesiumUtility::IntrusivePointer<TilesetSharedAssetSystem> | ||
TilesetSharedAssetSystem::getDefault() { | ||
static CesiumUtility::IntrusivePointer<TilesetSharedAssetSystem> pDefault = | ||
createDefault(); | ||
return pDefault; | ||
} | ||
|
||
} // namespace Cesium3DTilesSelection |
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.