Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
##### Additions :tada:

- Added support for [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) in `CesiumGltf`, `CesiumGltfReader`, and `CesiumGltfWriter`.
- Added support for [`3DTILES_content_conditional`](https://github.com/CesiumGS/3d-tiles/pull/834) in `Cesium3DTiles`, `Cesium3DTilesReader`, and `Cesium3DTilesWriter`.

### v0.60.0 - 2026-05-01

##### Additions :tada:

- Added `BoundingRegionBuilder::expandToIncludeBoundingRegion`.
- Added support for 3D Tiles `MAXAR_tileset_geojson` extension, which allows GeoJSON files as tile content. The GeoJSON is translated to glTF.
- Added support for 3D Tiles `MAXAR_tileset_geojson` extension, which allows GeoJSON files as tile content. The GeoJSON is translated to glTF.

##### Fixes :wrench:

Expand Down
51 changes: 51 additions & 0 deletions Cesium3DTiles/generated/include/Cesium3DTiles/ConditionalContent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/ConditionalContentItem.h>
#include <Cesium3DTiles/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <vector>

namespace Cesium3DTiles {
/**
* @brief Defines the structure of 3D Tiles content for the
* 3DTILES_content_conditional extension
*/
struct CESIUM3DTILES_API ConditionalContent final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName = "ConditionalContent";

/**
* @brief The array of content objects that have additional conditions
* associated with them, based on which they are activated.
*/
std::vector<Cesium3DTiles::ConditionalContentItem> conditionalContents;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ConditionalContent));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += int64_t(
sizeof(Cesium3DTiles::ConditionalContentItem) *
this->conditionalContents.capacity());
for (const Cesium3DTiles::ConditionalContentItem& value :
this->conditionalContents) {
accum += value.getSizeBytes() -
int64_t(sizeof(Cesium3DTiles::ConditionalContentItem));
}
return accum;
}
};
} // namespace Cesium3DTiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/Content.h>
#include <Cesium3DTiles/Library.h>
#include <CesiumUtility/JsonValue.h>

#include <string>
#include <unordered_map>

namespace Cesium3DTiles {
/**
* @brief Defines the structure of a single content item in
* 3DTILES_content_conditional
*/
struct CESIUM3DTILES_API ConditionalContentItem final : public Content {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName = "ConditionalContentItem";

/**
* @brief Properties that define the conditions based on which the item can
* become active. The names of these properties correspond to the 'dimensions'
* that are defined in the top-level extension object.
*/
std::unordered_map<std::string, CesiumUtility::JsonValue> keys;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(ConditionalContentItem));
accum += Content::getSizeBytes() - int64_t(sizeof(Content));
accum += int64_t(
this->keys.bucket_count() *
(sizeof(std::string) + sizeof(CesiumUtility::JsonValue)));
for (const auto& [k, v] : this->keys) {
accum += int64_t(k.capacity() * sizeof(char) - sizeof(std::string));
accum += int64_t(sizeof(CesiumUtility::JsonValue));
}
return accum;
}
};
} // namespace Cesium3DTiles
3 changes: 1 addition & 2 deletions Cesium3DTiles/generated/include/Cesium3DTiles/Content.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ namespace Cesium3DTiles {
/**
* @brief Metadata about the tile's content and a link to the content.
*/
struct CESIUM3DTILES_API Content final
: public CesiumUtility::ExtensibleObject {
struct CESIUM3DTILES_API Content : public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/Extension3dTilesContentConditionalDimensionsValue.h>
#include <Cesium3DTiles/Library.h>
#include <CesiumUtility/ExtensibleObject.h>

#include <vector>

namespace Cesium3DTiles {
/**
* @brief Defines the structure of the extension object that is stored as the
* 3DTILES_content_conditional extension in a tileset JSON, and that summarizes
* the conditions that appear in the contents.
*/
struct CESIUM3DTILES_API Extension3dTilesContentConditional final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName = "Extension3dTilesContentConditional";
/** @brief The official name of the extension. This should be the same as its
* key in the `extensions` object. */
static constexpr const char* ExtensionName = "3DTILES_content_conditional";

/**
* @brief The dimensions of the conditions, each consisting of the name and
* domain of the respective property.
*/
std::vector<Cesium3DTiles::Extension3dTilesContentConditionalDimensionsValue>
dimensions;

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(Extension3dTilesContentConditional));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += int64_t(
sizeof(
Cesium3DTiles::Extension3dTilesContentConditionalDimensionsValue) *
this->dimensions.capacity());
for (const Cesium3DTiles::Extension3dTilesContentConditionalDimensionsValue&
value : this->dimensions) {
accum += value.getSizeBytes() -
int64_t(sizeof(
Cesium3DTiles::
Extension3dTilesContentConditionalDimensionsValue));
}
return accum;
}
};
} // namespace Cesium3DTiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/Library.h>
#include <CesiumUtility/ExtensibleObject.h>
#include <CesiumUtility/JsonValue.h>

#include <string>
#include <vector>

namespace Cesium3DTiles {
/**
* @brief Extension3dTilesContentConditional Dimensions Value
*/
struct CESIUM3DTILES_API Extension3dTilesContentConditionalDimensionsValue final
: public CesiumUtility::ExtensibleObject {
/**
* @brief The original name of this type.
*/
static constexpr const char* TypeName =
"Extension3dTilesContentConditionalDimensionsValue";

/**
* @brief The name of the property that is used for defining the condition, to
* be used as one of the keys in the conditional content array items.
*/
std::string name;

/**
* @brief The set of all values that appear in any condition.
*/
std::vector<CesiumUtility::JsonValue> keySet;
Comment thread
lilleyse marked this conversation as resolved.

/**
* @brief Calculates the size in bytes of this object, including the contents
* of all collections, pointers, and strings. This will NOT include the size
* of any extensions attached to the object. Calling this method may be slow
* as it requires traversing the object's entire structure.
*/
int64_t getSizeBytes() const {
int64_t accum = 0;
accum += int64_t(sizeof(Extension3dTilesContentConditionalDimensionsValue));
accum += CesiumUtility::ExtensibleObject::getSizeBytes() -
int64_t(sizeof(CesiumUtility::ExtensibleObject));
accum += int64_t(this->name.capacity() * sizeof(char));
accum +=
int64_t(sizeof(CesiumUtility::JsonValue) * this->keySet.capacity());
return accum;
}
};
} // namespace Cesium3DTiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/ConditionalContentItem.h>
#include <Cesium3DTilesReader/Library.h>
#include <CesiumJsonReader/JsonReader.h>
#include <CesiumJsonReader/JsonReaderOptions.h>

#include <rapidjson/fwd.h>

#include <span>
#include <vector>

namespace Cesium3DTiles {
struct ConditionalContentItem;
} // namespace Cesium3DTiles

namespace Cesium3DTilesReader {

/**
* @brief Reads \ref Cesium3DTiles::ConditionalContentItem
* "ConditionalContentItem" instances from JSON.
*/
class CESIUM3DTILESREADER_API ConditionalContentItemReader {
public:
/**
* @brief Constructs a new instance.
*/
ConditionalContentItemReader();

/**
* @brief Gets the options controlling how the JSON is read.
*/
CesiumJsonReader::JsonReaderOptions& getOptions();

/**
* @brief Gets the options controlling how the JSON is read.
*/
const CesiumJsonReader::JsonReaderOptions& getOptions() const;

/**
* @brief Reads an instance of ConditionalContentItem from a byte buffer.
*
* @param data The buffer from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<Cesium3DTiles::ConditionalContentItem>
readFromJson(const std::span<const std::byte>& data) const;

/**
* @brief Reads an instance of ConditionalContentItem from a rapidJson::Value.
*
* @param value The value from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<Cesium3DTiles::ConditionalContentItem>
readFromJson(const rapidjson::Value& value) const;

/**
* @brief Reads an array of instances of ConditionalContentItem from a
* rapidJson::Value.
*
* @param value The value from which to read the array of instances.
* @return The result of reading the array of instances.
*/
CesiumJsonReader::ReadJsonResult<
std::vector<Cesium3DTiles::ConditionalContentItem>>
readArrayFromJson(const rapidjson::Value& value) const;

private:
CesiumJsonReader::JsonReaderOptions _options;
};

} // namespace Cesium3DTilesReader
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include <Cesium3DTiles/ConditionalContent.h>
#include <Cesium3DTilesReader/Library.h>
#include <CesiumJsonReader/JsonReader.h>
#include <CesiumJsonReader/JsonReaderOptions.h>

#include <rapidjson/fwd.h>

#include <span>
#include <vector>

namespace Cesium3DTiles {
struct ConditionalContent;
} // namespace Cesium3DTiles

namespace Cesium3DTilesReader {

/**
* @brief Reads \ref Cesium3DTiles::ConditionalContent "ConditionalContent"
* instances from JSON.
*/
class CESIUM3DTILESREADER_API ConditionalContentReader {
public:
/**
* @brief Constructs a new instance.
*/
ConditionalContentReader();

/**
* @brief Gets the options controlling how the JSON is read.
*/
CesiumJsonReader::JsonReaderOptions& getOptions();

/**
* @brief Gets the options controlling how the JSON is read.
*/
const CesiumJsonReader::JsonReaderOptions& getOptions() const;

/**
* @brief Reads an instance of ConditionalContent from a byte buffer.
*
* @param data The buffer from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<Cesium3DTiles::ConditionalContent>
readFromJson(const std::span<const std::byte>& data) const;

/**
* @brief Reads an instance of ConditionalContent from a rapidJson::Value.
*
* @param value The value from which to read the instance.
* @return The result of reading the instance.
*/
CesiumJsonReader::ReadJsonResult<Cesium3DTiles::ConditionalContent>
readFromJson(const rapidjson::Value& value) const;

/**
* @brief Reads an array of instances of ConditionalContent from a
* rapidJson::Value.
*
* @param value The value from which to read the array of instances.
* @return The result of reading the array of instances.
*/
CesiumJsonReader::ReadJsonResult<
std::vector<Cesium3DTiles::ConditionalContent>>
readArrayFromJson(const rapidjson::Value& value) const;

private:
CesiumJsonReader::JsonReaderOptions _options;
};

} // namespace Cesium3DTilesReader
Loading
Loading