diff --git a/src/asset.rs b/src/asset.rs index db23ff8..14c20ea 100644 --- a/src/asset.rs +++ b/src/asset.rs @@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize}; /// Metadata about the entire tileset. #[serde(rename_all = "camelCase")] -#[derive(Serialize, Deserialize, Debug, Clone)] pub struct Asset { /// The 3D Tiles version. The version defines the JSON schema for the tileset JSON and the base set of tile formats. pub version: String, diff --git a/src/content.rs b/src/content.rs index 71d5ab8..5216bc9 100644 --- a/src/content.rs +++ b/src/content.rs @@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize}; use crate::{BoundingVolume, MetadataEntity}; /// Metadata about the tile's content and a link to the content. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Content { /// An optional bounding volume that tightly encloses tile content. tile.boundingVolume provides spatial coherence and tile.content.boundingVolume enables tight view frustum culling. When this is omitted, tile.boundingVolume is used. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/property_table/property_table_property.rs b/src/property_table/property_table_property.rs index d253edc..70f2ab7 100644 --- a/src/property_table/property_table_property.rs +++ b/src/property_table/property_table_property.rs @@ -20,8 +20,8 @@ impl Default for OffsetType { /// An array of binary property values. This represents one column of a property table, and contains one value of a certain property for each metadata entity. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct PropertyTableProperty { /// The index of the buffer view containing property values. The data type of property values is determined by the property definition: When `type` is `BOOLEAN` values are packed into a bitstream. When `type` is `STRING` values are stored as byte sequences and decoded as UTF-8 strings. When `type` is `SCALAR`, `VECN`, or `MATN` the values are stored as the provided `componentType` and the buffer view `byteOffset` shall be aligned to a multiple of the `componentType` size. When `type` is `ENUM` values are stored as the enum's `valueType` and the buffer view `byteOffset` shall be aligned to a multiple of the `valueType` size. Each enum value in the array shall match one of the allowed values in the enum definition. `arrayOffsets` is required for variable-length arrays and `stringOffsets` is required for strings (for variable-length arrays of strings, both are required). pub values: i32, diff --git a/src/schema/class.rs b/src/schema/class.rs index f5dc96b..29d4ce3 100644 --- a/src/schema/class.rs +++ b/src/schema/class.rs @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize}; use crate::ClassProperty; /// A class containing a set of properties. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Class { /// The name of the class, e.g. for display purposes. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/schema/class_property.rs b/src/schema/class_property.rs index 490a501..418b323 100644 --- a/src/schema/class_property.rs +++ b/src/schema/class_property.rs @@ -39,8 +39,8 @@ pub enum ComponentType { /// A single property of a metadata class. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct ClassProperty { /// The name of the property, e.g. for display purposes. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/schema/enum_.rs b/src/schema/enum_.rs index ecd0c58..ed30a33 100644 --- a/src/schema/enum_.rs +++ b/src/schema/enum_.rs @@ -19,8 +19,8 @@ pub enum ValueType { /// An object defining the values of an enum. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Enum { /// The name of the enum, e.g. for display purposes. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/statistics/statistics_class_property.rs b/src/statistics/statistics_class_property.rs index 878187b..4dc8453 100644 --- a/src/statistics/statistics_class_property.rs +++ b/src/statistics/statistics_class_property.rs @@ -13,8 +13,8 @@ pub enum Occurrences { /// Statistics about property values. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct StatisticsClassProperty { /// The minimum property value occurring in the tileset. Only applicable to `SCALAR`, `VECN`, and `MATN` types. This is the minimum of all property values, after the transforms based on the `normalized`, `offset`, and `scale` properties have been applied. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/styling/pnts_style.rs b/src/styling/pnts_style.rs index c3ff08c..2051c49 100644 --- a/src/styling/pnts_style.rs +++ b/src/styling/pnts_style.rs @@ -2,7 +2,6 @@ use serde::{Deserialize, Serialize}; use crate::{StyleConditions, StyleNumberExpression}; - /// A `number expression` or `conditions` property which determines the size of the points in pixels. #[derive(Serialize, Deserialize, Debug, Clone)] pub enum PointSize { @@ -18,8 +17,8 @@ impl Default for PointSize { /// A 3D Tiles style with additional properties for Point Clouds. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct PntsStyle { /// A `number expression` or `conditions` property which determines the size of the points in pixels. pub point_size: PointSize, diff --git a/src/subtree/availability.rs b/src/subtree/availability.rs index 5cfb3e8..e613df1 100644 --- a/src/subtree/availability.rs +++ b/src/subtree/availability.rs @@ -10,8 +10,8 @@ pub enum Constant { /// An object describing the availability of a set of elements. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Availability { /// Index of a buffer view that indicates whether each element is available. The bitstream conforms to the boolean array encoding described in the 3D Metadata specification. If an element is available, its bit is 1, and if it is unavailable, its bit is 0. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/subtree/buffer.rs b/src/subtree/buffer.rs index 0b76a67..426ca35 100644 --- a/src/subtree/buffer.rs +++ b/src/subtree/buffer.rs @@ -1,8 +1,8 @@ use serde::{Deserialize, Serialize}; /// A buffer is a binary blob. It is either the binary chunk of the subtree file, or an external buffer referenced by a URI. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Buffer { /// The URI (or IRI) of the file that contains the binary buffer data. Relative paths are relative to the file containing the buffer JSON. `uri` is required when using the JSON subtree format and not required when using the binary subtree format - when omitted the buffer refers to the binary chunk of the subtree file. Data URIs are not allowed. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/subtree/buffer_view.rs b/src/subtree/buffer_view.rs index b9d7a3f..74edd85 100644 --- a/src/subtree/buffer_view.rs +++ b/src/subtree/buffer_view.rs @@ -1,8 +1,8 @@ use serde::{Deserialize, Serialize}; /// A contiguous subset of a buffer -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct BufferView { /// The index of the buffer. pub buffer: i32, diff --git a/src/subtree/subtree.rs b/src/subtree/subtree.rs index 8f35dcb..29c8fd3 100644 --- a/src/subtree/subtree.rs +++ b/src/subtree/subtree.rs @@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize}; use crate::{Availability, Buffer, BufferView, MetadataEntity, PropertyTable}; /// An object describing the availability of tiles and content in a subtree, as well as availability of children subtrees. May also store metadata for available tiles and content. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Subtree { /// An array of buffers. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/tile.rs b/src/tile.rs index 45bd711..b3adc44 100644 --- a/src/tile.rs +++ b/src/tile.rs @@ -28,8 +28,8 @@ impl Default for Transform { /// A tile in a 3D Tiles tileset. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Tile { /// The bounding volume that encloses the tile. pub bounding_volume: BoundingVolume, diff --git a/src/tile_implicit_tiling.rs b/src/tile_implicit_tiling.rs index ed8a4ea..0d714ce 100644 --- a/src/tile_implicit_tiling.rs +++ b/src/tile_implicit_tiling.rs @@ -13,8 +13,8 @@ pub enum SubdivisionScheme { /// This object allows a tile to be implicitly subdivided. Tile and content availability and metadata is stored in subtrees which are referenced externally. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct TileImplicittiling { /// A string describing the subdivision scheme used within the tileset. pub subdivision_scheme: SubdivisionScheme, diff --git a/src/tileset.rs b/src/tileset.rs index 41c27da..a976d1d 100644 --- a/src/tileset.rs +++ b/src/tileset.rs @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize}; use crate::{Asset, Group, MetadataEntity, Properties, Schema, Statistics, Tile}; /// A 3D Tiles tileset. -#[serde(rename_all = "camelCase")] #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Tileset { /// Metadata about the entire tileset. pub asset: Asset,