cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumGltf Namespace Reference

Classes for working with glTF models. More...

Classes

struct  Accessor
 This class is not meant to be instantiated directly. Use Accessor instead. More...
 
struct  AccessorSparse
 Sparse storage of accessor values that deviate from their initialization value. More...
 
struct  AccessorSparseIndices
 An object pointing to a buffer view containing the indices of deviating accessor values. The number of indices is equal to accessor.sparse.count. Indices MUST strictly increase. More...
 
struct  AccessorSparseValues
 An object pointing to a buffer view containing the deviating accessor values. The number of elements is equal to accessor.sparse.count times number of components. The elements have the same component type as the base accessor. The elements are tightly packed. Data MUST be aligned following the same rules as the base accessor. More...
 
struct  AccessorSpec
 A typed view into a buffer view that contains raw binary data. More...
 
struct  AccessorTypes
 Contains types that may optionally be used with AccessorView for various Accessor::componentType values. More...
 
class  AccessorView
 A view on the data of one accessor of a glTF asset. More...
 
class  AccessorWriter
 Provides write access to an AccessorView. More...
 
struct  Animation
 A keyframe animation. More...
 
struct  AnimationChannel
 An animation channel combines an animation sampler with a target property being animated. More...
 
struct  AnimationChannelTarget
 The descriptor of the animated property. More...
 
struct  AnimationSampler
 An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm. More...
 
struct  Asset
 Metadata about the glTF asset. More...
 
struct  Buffer
 This class is not meant to be instantiated directly. Use Buffer instead. More...
 
struct  BufferCesium
 Holds Buffer properties that are specific to the glTF loader rather than part of the glTF spec. More...
 
struct  BufferSpec
 A buffer points to binary geometry, animation, or skins. More...
 
struct  BufferView
 A view into a buffer generally representing a subset of the buffer. More...
 
struct  Camera
 A camera's projection. A node MAY reference a camera to apply a transform to place the camera in the scene. More...
 
struct  CameraOrthographic
 An orthographic camera containing properties to create an orthographic projection matrix. More...
 
struct  CameraPerspective
 A perspective camera containing properties to create a perspective projection matrix. More...
 
struct  CanBeNormalized
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< glm::mat< n, n, T, P > >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< glm::vec< n, T, P > >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< int16_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< int32_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< int64_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< int8_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< PropertyArrayView< T > >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< T >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< uint16_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< uint32_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< uint64_t >
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< uint8_t >
 Check if a C++ type can be normalized. More...
 
struct  Class
 A class containing a set of properties. More...
 
struct  ClassProperty
 A class property. More...
 
struct  CountFromAccessor
 Visitor that retrieves the count of elements in the given accessor type as an int64_t. More...
 
struct  Enum
 An object defining the values of an enum. More...
 
struct  EnumValue
 An enum value. More...
 
struct  ExtensionBufferExtMeshoptCompression
 Compressed data for bufferView. More...
 
struct  ExtensionBufferViewExtMeshoptCompression
 Compressed data for bufferView. More...
 
struct  ExtensionCesiumPrimitiveOutline
 glTF extension for indicating that some edges of a primitive's triangles should be outlined. More...
 
struct  ExtensionCesiumRTC
 glTF CESIUM_RTC extension. More...
 
struct  ExtensionCesiumTileEdges
 CESIUM_tile_edges extension for a primitive in a glTF model. More...
 
struct  ExtensionExtInstanceFeatures
 An object describing per-instance feature IDs. More...
 
struct  ExtensionExtInstanceFeaturesFeatureId
 Feature IDs stored in a GPU mesh instancing attribute. More...
 
struct  ExtensionExtMeshFeatures
 An object describing feature IDs for a mesh primitive. More...
 
struct  ExtensionExtMeshGpuInstancing
 glTF extension defines instance attributes for a node with a mesh. More...
 
struct  ExtensionExtStructuralMetadata
 Structural metadata about a glTF element. More...
 
struct  ExtensionKhrDracoMeshCompression
 KHR_draco_mesh_compression glTF Mesh Primitive Extension. More...
 
struct  ExtensionKhrMaterialsUnlit
 glTF extension that defines the unlit material model. More...
 
struct  ExtensionKhrTextureBasisu
 glTF extension to specify textures using the KTX v2 images with Basis Universal supercompression. More...
 
struct  ExtensionKhrTextureTransform
 glTF extension that enables shifting and scaling UV coordinates on a per-texture basis More...
 
struct  ExtensionMeshPrimitiveExtStructuralMetadata
 Structural metadata about a glTF primitive. More...
 
struct  ExtensionMeshPrimitiveKhrMaterialsVariants
 KHR_materials_variants glTF Mesh Primitive Extension. More...
 
struct  ExtensionMeshPrimitiveKhrMaterialsVariantsMappingsValue
 ExtensionMeshPrimitiveKhrMaterialsVariants Mappings Value. More...
 
struct  ExtensionModelExtStructuralMetadata
 glTF extension that provides structural metadata about vertices, texels, and features in a glTF asset. More...
 
struct  ExtensionModelKhrMaterialsVariants
 glTF extension that defines a material variations for mesh primitives More...
 
struct  ExtensionModelKhrMaterialsVariantsValue
 An object defining a valid material variant. More...
 
struct  ExtensionModelMaxarMeshVariants
 glTF extension that defines mesh variants for nodes More...
 
struct  ExtensionModelMaxarMeshVariantsValue
 An object defining a valid mesh variant. More...
 
struct  ExtensionNodeMaxarMeshVariants
 MAXAR_mesh_variants node extension. More...
 
struct  ExtensionNodeMaxarMeshVariantsMappingsValue
 ExtensionNodeMaxarMeshVariants Mappings Value. More...
 
struct  ExtensionTextureWebp
 glTF extension to specify textures using the WebP image format. More...
 
struct  FeatureId
 Feature IDs stored in an attribute or texture. More...
 
struct  FeatureIdFromAccessor
 
struct  FeatureIdTexture
 A texture containing feature IDs. More...
 
class  FeatureIdTextureView
 A view on the image data of FeatureIdTexture. More...
 
struct  Image
 This class is not meant to be instantiated directly. Use Image instead. More...
 
struct  ImageAsset
 A 2D image asset, including its pixel data. The image may have mipmaps, and it may be encoded in a GPU compression format. More...
 
struct  ImageAssetMipPosition
 The byte range within a buffer where this mip exists. More...
 
struct  ImageSpec
 Image data used to create a texture. Image MAY be referenced by an URI (or IRI) or a buffer view index. More...
 
struct  IndexFromAccessor
 
struct  IndicesForFaceFromAccessor
 
struct  InstanceAttributeSemantics
 The standard glTF instance attribute semantics from EXT_mesh_gpu_instancing plus additional instance attribute semantics from extensions. More...
 
struct  IsMetadataArray
 Check if a C++ type can be represented as an array. More...
 
struct  IsMetadataArray< PropertyArrayCopy< T > >
 Check if a C++ type can be represented as an array. More...
 
struct  IsMetadataArray< PropertyArrayView< T > >
 Check if a C++ type can be represented as an array. More...
 
struct  IsMetadataArray< T >
 Check if a C++ type can be represented as an array. More...
 
struct  IsMetadataBoolean
 Check if a C++ type can be represented as a boolean property type. More...
 
struct  IsMetadataBoolean< bool >
 Check if a C++ type can be represented as a boolean property type. More...
 
struct  IsMetadataBoolean< T >
 Check if a C++ type can be represented as a boolean property type. More...
 
struct  IsMetadataBooleanArray
 Check if a C++ type can be represented as an array of booleans property type. More...
 
struct  IsMetadataBooleanArray< PropertyArrayView< bool > >
 Check if a C++ type can be represented as an array of booleans property type. More...
 
struct  IsMetadataBooleanArray< T >
 Check if a C++ type can be represented as an array of booleans property type. More...
 
struct  IsMetadataFloating
 Check if a C++ type can be represented as a floating-point property type. More...
 
struct  IsMetadataFloating< double >
 Check if a C++ type can be represented as a floating-point property type. More...
 
struct  IsMetadataFloating< float >
 Check if a C++ type can be represented as a floating-point property type. More...
 
struct  IsMetadataFloating< T >
 Check if a C++ type can be represented as a floating-point property type. More...
 
struct  IsMetadataInteger
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< int16_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< int32_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< int64_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< int8_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< T >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< uint16_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< uint32_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< uint64_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< uint8_t >
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataMatN
 Check if a C++ type can be represented as a matN type. More...
 
struct  IsMetadataMatN< glm::mat< n, n, T, P > >
 Check if a C++ type can be represented as a matN type. More...
 
struct  IsMetadataMatN< T >
 Check if a C++ type can be represented as a matN type. More...
 
struct  IsMetadataNumeric
 Check if a C++ type can be represented as a numeric property, i.e. a scalar / vecN / matN type. More...
 
struct  IsMetadataNumeric< T >
 Check if a C++ type can be represented as a numeric property, i.e. a scalar / vecN / matN type. More...
 
struct  IsMetadataNumericArray
 Check if a C++ type can be represented as an array of numeric elements property type. More...
 
struct  IsMetadataNumericArray< PropertyArrayCopy< T > >
 Check if a C++ type can be represented as an array of numeric elements property type. More...
 
struct  IsMetadataNumericArray< PropertyArrayView< T > >
 Check if a C++ type can be represented as an array of numeric elements property type. More...
 
struct  IsMetadataNumericArray< T >
 Check if a C++ type can be represented as an array of numeric elements property type. More...
 
struct  IsMetadataScalar
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< double >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< float >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< int16_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< int32_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< int64_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< int8_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< T >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< uint16_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< uint32_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< uint64_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< uint8_t >
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataString
 Check if a C++ type can be represented as a string property type. More...
 
struct  IsMetadataString< std::string_view >
 Check if a C++ type can be represented as a string property type. More...
 
struct  IsMetadataString< T >
 Check if a C++ type can be represented as a string property type. More...
 
struct  IsMetadataStringArray
 Check if a C++ type can be represented as an array of strings property type. More...
 
struct  IsMetadataStringArray< PropertyArrayView< std::string_view > >
 Check if a C++ type can be represented as an array of strings property type. More...
 
struct  IsMetadataStringArray< T >
 Check if a C++ type can be represented as an array of strings property type. More...
 
struct  IsMetadataVecN
 Check if a C++ type can be represented as a vecN type. More...
 
struct  IsMetadataVecN< glm::vec< n, T, P > >
 Check if a C++ type can be represented as a vecN type. More...
 
struct  IsMetadataVecN< T >
 Check if a C++ type can be represented as a vecN type. More...
 
class  KhrTextureTransform
 A utility class that parses KHR_texture_transform parameters and transforms input texture coordinates. More...
 
struct  Ktx2TranscodeTargets
 For each possible input transmission format, this struct names the ideal target gpu-compressed pixel format to transcode to. More...
 
struct  Material
 The material appearance of a primitive. More...
 
struct  MaterialNormalTextureInfo
 Material Normal Texture Info. More...
 
struct  MaterialOcclusionTextureInfo
 Material Occlusion Texture Info. More...
 
struct  MaterialPBRMetallicRoughness
 A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. More...
 
struct  Mesh
 A set of primitives to be rendered. Its global transform is defined by a node that references it. More...
 
struct  MeshPrimitive
 Geometry to be rendered with the given material. More...
 
struct  MetadataArrayType
 Retrieve the component type of a metadata array. More...
 
struct  MetadataArrayType< CesiumGltf::PropertyArrayCopy< T > >
 Retrieve the component type of a metadata array. More...
 
struct  MetadataArrayType< CesiumGltf::PropertyArrayView< T > >
 Retrieve the component type of a metadata array. More...
 
struct  MetadataConversions
 Default conversion between two types. No actual conversion is defined. This returns std::nullopt to indicate the conversion was not successful. More...
 
struct  MetadataConversions< bool, std::string >
 Converts from std::string to a bool. More...
 
struct  MetadataConversions< bool, std::string_view >
 Converts from std::string_view to a bool. More...
 
struct  MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > >
 Converts from a scalar to a bool. More...
 
struct  MetadataConversions< double, bool >
 Converts from a boolean to a double. More...
 
struct  MetadataConversions< double, float >
 Converts from a float to a double. More...
 
struct  MetadataConversions< double, std::string >
 Converts from std::string to a double. More...
 
struct  MetadataConversions< double, std::string_view >
 Converts from std::string_view to a double. More...
 
struct  MetadataConversions< double, TFrom, std::enable_if_t< CesiumGltf::IsMetadataInteger< TFrom >::value > >
 Converts from any integer type to a double. More...
 
struct  MetadataConversions< float, bool >
 Converts from a boolean to a float. More...
 
struct  MetadataConversions< float, double >
 Converts from a double to a float. More...
 
struct  MetadataConversions< float, std::string >
 Converts from a std::string to a float. More...
 
struct  MetadataConversions< float, std::string_view >
 Converts from a std::string_view to a float. More...
 
struct  MetadataConversions< float, TFrom, std::enable_if_t< CesiumGltf::IsMetadataInteger< TFrom >::value > >
 Converts from an integer type to a float. More...
 
struct  MetadataConversions< std::string, bool >
 Converts from a boolean to a string. More...
 
struct  MetadataConversions< std::string, std::string_view >
 Converts from a std::string_view to a std::string. More...
 
struct  MetadataConversions< std::string, TFrom, std::enable_if_t< IsMetadataScalar< TFrom >::value > >
 Converts from a scalar to a string. More...
 
struct  MetadataConversions< std::string, TFrom, std::enable_if_t< IsMetadataVecN< TFrom >::value||IsMetadataMatN< TFrom >::value > >
 Converts from a glm::vecN or glm::matN to a string. More...
 
struct  MetadataConversions< T, T >
 Trivially converts any type to itself. More...
 
struct  MetadataConversions< TTo, bool, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >
 Converts from a boolean to an integer type. More...
 
struct  MetadataConversions< TTo, bool, std::enable_if_t< IsMetadataMatN< TTo >::value > >
 Converts from a boolean to a matN. More...
 
struct  MetadataConversions< TTo, bool, std::enable_if_t< IsMetadataVecN< TTo >::value > >
 Converts from a boolean to a vecN. More...
 
struct  MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&!std::is_signed_v< TTo > > >
 Converts from std::string to an unsigned integer. More...
 
struct  MetadataConversions< TTo, std::string, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&std::is_signed_v< TTo > > >
 Converts from std::string to a signed integer. More...
 
struct  MetadataConversions< TTo, std::string_view, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >
 Converts from std::string_view to an integer. More...
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&CesiumGltf::IsMetadataFloating< TFrom >::value > >
 Converts from a floating-point type to an integer. More...
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value &&CesiumGltf::IsMetadataInteger< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >
 Converts from one integer type to another. More...
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >
 Converts from a matN type to another matN type. More...
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataScalar< TFrom >::value > >
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataVecN< TTo >::value &&CesiumGltf::IsMetadataScalar< TFrom >::value > >
 Converts from a scalar type to a vecN. More...
 
struct  MetadataConversions< TTo, TFrom, std::enable_if_t< CesiumGltf::IsMetadataVecN< TTo >::value &&CesiumGltf::IsMetadataVecN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >
 Converts from a vecN type to another vecN type. More...
 
struct  Model
 This class is not meant to be instantiated directly. Use Model instead. More...
 
struct  ModelSpec
 The root object for a glTF asset. More...
 
struct  NamedObject
 The base class for objects in a glTF that have a name. More...
 
struct  Node
 A node in the node hierarchy. When the node contains skin, all mesh.primitives MUST contain JOINTS_0 and WEIGHTS_0 attributes. A node MAY have either a matrix or any combination of translation/rotation/scale (TRS) properties. TRS properties are converted to matrices and postmultiplied in the T * R * S order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), matrix MUST NOT be present. More...
 
class  PropertyArrayCopy
 A copy of an array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
class  PropertyArrayView
 A view on an array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
class  PropertyArrayView< bool >
 A view on a bool array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
class  PropertyArrayView< std::string_view >
 A view on a string array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
struct  PropertyAttribute
 Properties conforming to a class, organized as property values stored in attributes. More...
 
struct  PropertyAttributeProperty
 An attribute containing property values. More...
 
class  PropertyAttributePropertyView
 A view of the data specified by a PropertyAttributeProperty. More...
 
class  PropertyAttributePropertyView< ElementType, false >
 A view of the non-normalized data specified by a PropertyAttributeProperty. More...
 
class  PropertyAttributePropertyView< ElementType, true >
 A view of the normalized data specified by a PropertyAttributeProperty. More...
 
class  PropertyAttributePropertyViewStatus
 Indicates the status of a property attribute property view. More...
 
class  PropertyAttributeView
 A view on a PropertyAttribute. More...
 
struct  PropertyTable
 Properties conforming to a class, organized as property values stored in binary columnar arrays. More...
 
struct  PropertyTableProperty
 An array of binary property values. More...
 
class  PropertyTablePropertyView
 A view on the data of the PropertyTableProperty that is created by a PropertyTableView. More...
 
class  PropertyTablePropertyView< ElementType, false >
 A view on the data of the PropertyTableProperty that is created by a PropertyTableView. More...
 
class  PropertyTablePropertyView< ElementType, true >
 A view on the normalized data of the PropertyTableProperty that is created by a PropertyTableView. More...
 
class  PropertyTablePropertyViewStatus
 Indicates the status of a property table property view. More...
 
class  PropertyTableView
 Utility to retrieve the data of PropertyTable. More...
 
struct  PropertyTexture
 Properties conforming to a class, organized as property values stored in textures. More...
 
struct  PropertyTextureProperty
 A texture containing property values. More...
 
class  PropertyTexturePropertyView
 A view of the data specified by a PropertyTextureProperty. More...
 
class  PropertyTexturePropertyView< ElementType, false >
 A view of the non-normalized data specified by a PropertyTextureProperty. More...
 
class  PropertyTexturePropertyView< ElementType, true >
 A view of the normalized data specified by a PropertyTextureProperty. More...
 
class  PropertyTexturePropertyViewStatus
 Indicates the status of a property texture property view. More...
 
class  PropertyTextureView
 A view on a PropertyTexture. More...
 
class  PropertyView
 Represents a metadata property in EXT_structural_metadata. More...
 
class  PropertyView< bool >
 Represents a boolean metadata property in EXT_structural_metadata. More...
 
class  PropertyView< ElementType, false >
 Represents a non-normalized metadata property in EXT_structural_metadata. More...
 
class  PropertyView< ElementType, true >
 Represents a normalized metadata property in EXT_structural_metadata. More...
 
class  PropertyView< PropertyArrayView< bool > >
 Represents a boolean array metadata property in EXT_structural_metadata. More...
 
class  PropertyView< PropertyArrayView< ElementType >, false >
 Represents a non-normalized array metadata property in EXT_structural_metadata. More...
 
class  PropertyView< PropertyArrayView< ElementType >, true >
 Represents a normalized array metadata property in EXT_structural_metadata. More...
 
class  PropertyView< PropertyArrayView< std::string_view > >
 Represents a string array metadata property in EXT_structural_metadata. More...
 
class  PropertyView< std::string_view >
 Represents a string metadata property in EXT_structural_metadata. More...
 
class  PropertyViewStatus
 Indicates the status of a property view. More...
 
struct  Sampler
 Texture sampler properties for filtering and wrapping modes. More...
 
struct  Scene
 The root nodes of a scene. More...
 
struct  Schema
 An object defining classes and enums. More...
 
struct  Skin
 Joints and matrices defining a skin. More...
 
struct  StatusFromAccessor
 Visitor that retrieves the status from the given accessor. Returns an invalid status for a std::monostate (interpreted as a nonexistent accessor). More...
 
struct  SupportedGpuCompressedPixelFormats
 Represents the status of support for all GpuCompressedPixelFormats on a client platform. More...
 
struct  TexCoordFromAccessor
 
struct  Texture
 A texture and its sampler. More...
 
struct  TextureInfo
 Reference to a texture. More...
 
class  TextureView
 A view into the texture data of a single texture from a Model. More...
 
struct  TextureViewOptions
 Describes options for constructing a view on a glTF texture. More...
 
struct  TypeToNormalizedType
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< glm::mat< N, N, T, Q > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< glm::vec< N, T, Q > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< int16_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< int32_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< int64_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< int8_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< glm::mat< N, N, T, Q > > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< glm::vec< N, T, Q > > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< int16_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< int32_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< int64_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< int8_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< uint16_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< uint32_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< uint64_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< PropertyArrayView< uint8_t > >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< uint16_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< uint32_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< uint64_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToNormalizedType< uint8_t >
 Convert an integer numeric type to the corresponding representation as a double type. Doubles are preferred over floats to maintain more precision. More...
 
struct  TypeToPropertyType
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< bool >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< double >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< float >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::mat< 2, 2, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::mat< 3, 3, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::mat< 4, 4, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::vec< 2, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::vec< 3, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< glm::vec< 4, T, P > >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< int16_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< int32_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< int64_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< int8_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< std::string_view >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< uint16_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< uint32_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< uint64_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< uint8_t >
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  VertexAttributeSemantics
 The standard glTF vertex attribute semantics from the specification plus additional vertex attribute semantics from extensions. More...
 

Typedefs

typedef AccessorView< AccessorTypes::VEC3< float > > PositionAccessorType
 
typedef AccessorView< AccessorTypes::VEC3< float > > NormalAccessorType
 
typedef std::variant< AccessorView< int8_t >, AccessorView< uint8_t >, AccessorView< int16_t >, AccessorView< uint16_t >, AccessorView< uint32_t >, AccessorView< float > > FeatureIdAccessorType
 
typedef std::variant< std::monostate, AccessorView< uint8_t >, AccessorView< uint16_t >, AccessorView< uint32_t > > IndexAccessorType
 
typedef std::variant< AccessorView< AccessorTypes::VEC2< uint8_t > >, AccessorView< AccessorTypes::VEC2< uint16_t > >, AccessorView< AccessorTypes::VEC2< float > > > TexCoordAccessorType
 
typedef std::variant< AccessorView< AccessorTypes::VEC4< uint8_t > >, AccessorView< AccessorTypes::VEC4< int8_t > >, AccessorView< AccessorTypes::VEC4< uint16_t > >, AccessorView< AccessorTypes::VEC4< int16_t > >, AccessorView< AccessorTypes::VEC4< float > > > QuaternionAccessorType
 Type definition for quaternion accessors, as used in ExtMeshGpuInstancing rotations and animation samplers.
 
template<typename T >
using PropertyValueViewToCopy
 Transforms a property value type from a view to an equivalent type that owns the data it is viewing. For most property types this is an identity transformation, because most property types are held by value. However, it transforms numeric PropertyArrayView<T> to PropertyArrayCopy<T> because a PropertyArrayView<T> only has a pointer to the value it is viewing.
 
template<typename T >
using PropertyValueCopyToView
 Transforms a property value type from a copy that owns the data it is viewing to a view into that data. For most property types this is an identity transformation, because most property types are held by value. However, it transforms numeric PropertyArrayCopy<T> to PropertyArrayView<T>.
 
typedef int32_t PropertyViewStatusType
 The type used for fields of PropertyViewStatus.
 

Enumerations

enum class  AccessorViewStatus {
  Valid , InvalidAccessorIndex , InvalidBufferViewIndex , InvalidBufferIndex ,
  BufferViewTooSmall , BufferTooSmall , WrongSizeT , InvalidType ,
  InvalidComponentType , InvalidByteStride
}
 Indicates the status of an accessor view. More...
 
enum class  FeatureIdTextureViewStatus {
  Valid , ErrorUninitialized , ErrorInvalidTexture , ErrorInvalidImage ,
  ErrorInvalidSampler , ErrorEmptyImage , ErrorInvalidImageBytesPerChannel , ErrorInvalidChannels
}
 The status of a feature ID texture view. More...
 
enum class  KhrTextureTransformStatus { Valid , ErrorInvalidOffset , ErrorInvalidScale }
 The status of a parsed KHR_texture_transform. More...
 
enum class  GpuCompressedPixelFormat {
  NONE , ETC1_RGB , ETC2_RGBA , BC1_RGB ,
  BC3_RGBA , BC4_R , BC5_RG , BC7_RGBA ,
  PVRTC1_4_RGB , PVRTC1_4_RGBA , ASTC_4x4_RGBA , PVRTC2_4_RGB ,
  PVRTC2_4_RGBA , ETC2_EAC_R11 , ETC2_EAC_RG11
}
 Supported GPU compressed pixel formats. More...
 
enum class  PropertyAttributeViewStatus { Valid , ErrorMissingMetadataExtension , ErrorMissingSchema , ErrorClassNotFound }
 Indicates the status of a property attribute view. More...
 
enum class  PropertyTableViewStatus { Valid , ErrorMissingMetadataExtension , ErrorMissingSchema , ErrorClassNotFound }
 Indicates the status of a property table view. More...
 
enum class  PropertyTextureViewStatus { Valid , ErrorMissingMetadataExtension , ErrorMissingSchema , ErrorClassNotFound }
 Indicates the status of a property texture view. More...
 
enum class  PropertyType {
  Invalid , Scalar , Vec2 , Vec3 ,
  Vec4 , Mat2 , Mat3 , Mat4 ,
  String , Boolean , Enum
}
 The possible types of a property in a PropertyTableView. More...
 
enum class  PropertyComponentType {
  None , Int8 , Uint8 , Int16 ,
  Uint16 , Int32 , Uint32 , Int64 ,
  Uint64 , Float32 , Float64
}
 The possible types of a property component. More...
 
enum class  TextureViewStatus {
  Valid , ErrorUninitialized , ErrorInvalidTexture , ErrorInvalidSampler ,
  ErrorInvalidImage , ErrorEmptyImage , ErrorInvalidBytesPerChannel
}
 Indicates the status of a texture view. More...
 

Functions

PositionAccessorType getPositionAccessorView (const Model &model, const MeshPrimitive &primitive)
 
NormalAccessorType getNormalAccessorView (const Model &model, const MeshPrimitive &primitive)
 
FeatureIdAccessorType getFeatureIdAccessorView (const Model &model, const MeshPrimitive &primitive, int32_t featureIdAttributeIndex)
 
FeatureIdAccessorType getFeatureIdAccessorView (const Model &model, const Node &node, int32_t featureIdAttributeIndex)
 
IndexAccessorType getIndexAccessorView (const Model &model, const MeshPrimitive &primitive)
 
TexCoordAccessorType getTexCoordAccessorView (const Model &model, const MeshPrimitive &primitive, int32_t textureCoordinateSetIndex)
 
QuaternionAccessorType getQuaternionAccessorView (const Model &model, const Accessor *accessor)
 Obtains a QuaternionAccessorType from the given Accessor on the given Model.
 
QuaternionAccessorType getQuaternionAccessorView (const Model &model, int32_t accessorIndex)
 Obtains a QuaternionAccessorType from the given Accessor on the given Model.
 
template<typename TCallback >
std::invoke_result_t< TCallback, AccessorView< AccessorTypes::SCALAR< float > > > createAccessorView (const Model &model, const Accessor &accessor, TCallback &&callback)
 Creates an appropriate AccessorView for a given accessor.
 
template<typename TCallback >
std::invoke_result_t< TCallback, AccessorView< AccessorTypes::SCALAR< float > > > createAccessorView (const Model &model, int32_t accessorIndex, TCallback &&callback)
 Creates an appropriate AccessorView for a given accessor.
 
template<typename T >
bool operator== (const PropertyArrayView< T > &lhs, const PropertyArrayView< T > &rhs)
 Compares two PropertyArrayView instances by comparing their values. If the two arrays aren't the same size, this comparison will return false.
 
template<typename T >
bool operator== (const PropertyArrayView< T > &lhs, const PropertyArrayCopy< T > &rhs)
 Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and comparing the two.
 
template<typename T >
bool operator== (const PropertyArrayCopy< T > &lhs, const PropertyArrayView< T > &rhs)
 Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and comparing the two.
 
template<typename T >
bool operator== (const PropertyArrayCopy< T > &lhs, const PropertyArrayCopy< T > &rhs)
 Compares two PropertyArrayCopy instances by creating views from each instance and comparing the two.
 
template<typename T >
bool operator!= (const PropertyArrayView< T > &lhs, const PropertyArrayView< T > &rhs)
 Compares two PropertyArrayView instances and returns the inverse.
 
template<typename T >
bool operator!= (const PropertyArrayView< T > &lhs, const PropertyArrayCopy< T > &rhs)
 Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and returning the inverse of comparing the two.
 
template<typename T >
bool operator!= (const PropertyArrayCopy< T > &lhs, const PropertyArrayView< T > &rhs)
 Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and returning the inverse of comparing the two.
 
template<typename T >
bool operator!= (const PropertyArrayCopy< T > &lhs, const PropertyArrayCopy< T > &rhs)
 Compares two PropertyArrayCopy instances by creating views from both instances and returning the inverse of comparing the two.
 
PropertyType getAccessorTypeAsPropertyType (const Accessor &accessor)
 Attempts to obtain a PropertyType from the type field of the accessor.
 
PropertyComponentType getAccessorComponentTypeAsPropertyComponentType (const Accessor &accessor)
 Attempts to obtain a PropertyComponentType from the componentType field of the accessor.
 
int64_t getOffsetTypeSize (PropertyComponentType offsetType) noexcept
 Returns the size in bytes of a PropertyComponentType used as the arrayOffsetType in the constructor of PropertyTablePropertyView.
 
template<typename ElementType >
ElementType assembleScalarValue (const std::span< uint8_t > bytes) noexcept
 Attempts to obtain a scalar value from the given span of bytes.
 
template<typename ElementType >
ElementType assembleVecNValue (const std::span< uint8_t > bytes) noexcept
 Attempts to obtain a vector value from the given span of bytes.
 
template<typename T >
PropertyArrayCopy< T > assembleArrayValue (const std::span< uint8_t > bytes) noexcept
 Attempts to obtain an array value from the given span of bytes.
 
template<typename ElementType >
PropertyValueViewToCopy< ElementType > assembleValueFromChannels (const std::span< uint8_t > bytes) noexcept
 Assembles the given type from the provided channel values of sampling a texture.
 
template<typename T >
double normalize (T value)
 Normalizes the given value between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.
 
template<glm::length_t N, typename T >
glm::vec< N, double > normalize (glm::vec< N, T > value)
 Normalizes the given vector's components between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.
 
template<glm::length_t N, typename T >
glm::mat< N, N, double > normalize (glm::mat< N, N, T > value)
 Normalizes the given matrix's components between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.
 
template<typename T >
applyScale (const T &value, const T &scale)
 Multiplies each component of the value by the given scale factor.
 
template<typename T >
transformValue (const T &value, const std::optional< T > &offset, const std::optional< T > &scale)
 Transforms the value by optional offset and scale factors.
 
template<typename T >
PropertyArrayCopy< T > transformArray (const PropertyArrayView< T > &value, const std::optional< PropertyArrayView< T > > &offset, const std::optional< PropertyArrayView< T > > &scale)
 Transforms each element of an array of values by optional offset and scale factors. See transformValue.
 
template<typename T , typename NormalizedType = typename TypeToNormalizedType<T>::type>
PropertyArrayCopy< NormalizedType > transformNormalizedArray (const PropertyArrayView< T > &value, const std::optional< PropertyArrayView< NormalizedType > > &offset, const std::optional< PropertyArrayView< NormalizedType > > &scale)
 Normalizes each element of an array of values and transforms them by optional offset and scale factors. See transformValue and transformArray.
 
template<glm::length_t N, typename T >
PropertyArrayCopy< glm::vec< N, double > > transformNormalizedVecNArray (const PropertyArrayView< glm::vec< N, T > > &value, const std::optional< PropertyArrayView< glm::vec< N, double > > > &offset, const std::optional< PropertyArrayView< glm::vec< N, double > > > &scale)
 Normalizes each element of an array of vectors and transforms them by optional offset and scale factors. See transformNormalizedArray.
 
template<glm::length_t N, typename T >
PropertyArrayCopy< glm::mat< N, N, double > > transformNormalizedMatNArray (const PropertyArrayView< glm::mat< N, N, T > > &value, const std::optional< PropertyArrayView< glm::mat< N, N, double > > > &offset, const std::optional< PropertyArrayView< glm::mat< N, N, double > > > &scale)
 Normalizes each element of an array of matrices and transforms them by optional offset and scale factors. See transformNormalizedArray.
 
std::string convertPropertyTypeToString (PropertyType type)
 Converts a PropertyType value to a string.
 
PropertyType convertStringToPropertyType (const std::string &str)
 Converts a string into a PropertyType.
 
std::string convertPropertyComponentTypeToString (PropertyComponentType componentType)
 Converts a PropertyComponentType value to a string.
 
PropertyComponentType convertStringToPropertyComponentType (const std::string &str)
 Converts a string into a PropertyComponentType.
 
PropertyComponentType convertArrayOffsetTypeStringToPropertyComponentType (const std::string &str)
 Converts a string listed in PropertyTableProperty::ArrayOffsetType to its corresponding PropertyComponentType.
 
PropertyComponentType convertStringOffsetTypeStringToPropertyComponentType (const std::string &str)
 Converts a string listed in PropertyTableProperty::StringOffsetType to its corresponding PropertyComponentType.
 
PropertyComponentType convertAccessorComponentTypeToPropertyComponentType (int componentType)
 Converts a integer type ID listed in AccessorSpec::ComponentType to its corresponding PropertyComponentType.
 
bool isPropertyTypeVecN (PropertyType type)
 Checks if the given PropertyType represents a vector with any number of components.
 
bool isPropertyTypeMatN (PropertyType type)
 Checks if the given PropertyType represents a matrix with any number of components.
 
bool isPropertyComponentTypeInteger (PropertyComponentType componentType)
 Checks if the given PropertyComponentType represents an integer value.
 
glm::length_t getDimensionsFromPropertyType (PropertyType type)
 Obtains the number of dimensions in the given PropertyType.
 
glm::length_t getComponentCountFromPropertyType (PropertyType type)
 Obtains the number of components in the given PropertyType.
 
size_t getSizeOfComponentType (PropertyComponentType componentType)
 Obtains the size in bytes of a value of this PropertyComponentType.
 
template<typename T >
PropertyViewStatusType validatePropertyType (const ClassProperty &classProperty)
 Validates a ClassProperty, checking for any type mismatches.
 
template<typename T >
PropertyViewStatusType validateArrayPropertyType (const ClassProperty &classProperty)
 Validates a ClassProperty representing an array, checking for any type mismatches.
 
template<typename ElementType >
int64_t getCount (std::optional< std::vector< std::byte > > &buffer)
 Obtains the number of values of type ElementType that could fit in the buffer.
 
double applySamplerWrapS (const double u, const int32_t wrapS)
 Applies a sampler's WrapS value to the given U component of a texture coordinate.
 
double applySamplerWrapT (const double v, const int32_t wrapT)
 Applies a sampler's WrapT value to the given V component of a texture coordinate.
 

Detailed Description

Classes for working with glTF models.

--- comment: This file was generated by dep-graph-gen. DO NOT EDIT THIS FILE! title: CesiumGltf Dependency Graph --- graph TD classDef dependencyNode fill:#fff,stroke:#ccc,color:#666,font-weight:bold,font-size:28px classDef libraryNode fill:#9f9,font-weight:bold,font-size:28px CesiumGltf[CesiumGltf] --> CesiumUtility[CesiumUtility] class CesiumUtility,CesiumGltf libraryNode

Typedef Documentation

◆ FeatureIdAccessorType

typedef std::variant< AccessorView<int8_t>, AccessorView<uint8_t>, AccessorView<int16_t>, AccessorView<uint16_t>, AccessorView<uint32_t>, AccessorView<float> > CesiumGltf::FeatureIdAccessorType

Type definition for all kinds of feature ID attribute accessors.

Definition at line 84 of file AccessorUtility.h.

◆ IndexAccessorType

typedef std::variant< std::monostate, AccessorView<uint8_t>, AccessorView<uint16_t>, AccessorView<uint32_t> > CesiumGltf::IndexAccessorType

Type definition for all kinds of index accessors. std::monostate indicates a nonexistent accessor, which can happen (and is valid) if the primitive vertices are defined without an index buffer.

Definition at line 148 of file AccessorUtility.h.

◆ NormalAccessorType

Type definition for normal accessor.

Definition at line 64 of file AccessorUtility.h.

◆ PositionAccessorType

Type definition for position accessor.

Definition at line 51 of file AccessorUtility.h.

◆ PropertyValueCopyToView

template<typename T >
using CesiumGltf::PropertyValueCopyToView
Initial value:
std::conditional_t<
IsMetadataNumericArray<T>::value,
PropertyArrayView<typename MetadataArrayType<T>::type>,
T>

Transforms a property value type from a copy that owns the data it is viewing to a view into that data. For most property types this is an identity transformation, because most property types are held by value. However, it transforms numeric PropertyArrayCopy<T> to PropertyArrayView<T>.

See propertyValueCopyToView.

Remarks
This is the inverse of PropertyValueViewToCopy
Template Parameters
TThe type of the property value copy.

Definition at line 585 of file PropertyTypeTraits.h.

◆ PropertyValueViewToCopy

template<typename T >
using CesiumGltf::PropertyValueViewToCopy
Initial value:
std::conditional_t<
IsMetadataNumericArray<T>::value,
PropertyArrayCopy<typename MetadataArrayType<T>::type>,
T>

Transforms a property value type from a view to an equivalent type that owns the data it is viewing. For most property types this is an identity transformation, because most property types are held by value. However, it transforms numeric PropertyArrayView<T> to PropertyArrayCopy<T> because a PropertyArrayView<T> only has a pointer to the value it is viewing.

See propertyValueViewToCopy.

Remarks
This is the inverse of PropertyValueCopyToView
Template Parameters
TThe type of the property value view.

Definition at line 568 of file PropertyTypeTraits.h.

◆ PropertyViewStatusType

The type used for fields of PropertyViewStatus.

Definition at line 17 of file PropertyView.h.

◆ QuaternionAccessorType

Type definition for quaternion accessors, as used in ExtMeshGpuInstancing rotations and animation samplers.

Definition at line 371 of file AccessorUtility.h.

◆ TexCoordAccessorType

Type definition for all kinds of texture coordinate (TEXCOORD_n) accessors.

Definition at line 300 of file AccessorUtility.h.

Enumeration Type Documentation

◆ AccessorViewStatus

enum class CesiumGltf::AccessorViewStatus
strong

Indicates the status of an accessor view.

The AccessorView constructor always completes successfully. However, it may not always reflect the actual content of the Accessor, but instead indicate that its AccessorView::size is 0. This enumeration provides the reason.

Enumerator
Valid 

This accessor is valid and ready to use.

InvalidAccessorIndex 

The accessor index does not refer to a valid accessor.

InvalidBufferViewIndex 

The accessor's bufferView index does not refer to a valid bufferView.

InvalidBufferIndex 

The accessor's bufferView's buffer index does not refer to a valid buffer.

BufferViewTooSmall 

The accessor is too large to fit in its bufferView.

BufferTooSmall 

The accessor's bufferView is too large to fit in its buffer.

WrongSizeT 

The sizeof(T) does not match the accessor's Accessor::computeBytesPerVertex.

InvalidType 

The AccessorSpec:type is invalid.

InvalidComponentType 

The AccessorSpec::componentType is invalid.

InvalidByteStride 

The BufferView::byteStride is negative, which is invalid.

Definition at line 19 of file AccessorView.h.

◆ FeatureIdTextureViewStatus

The status of a feature ID texture view.

The FeatureIdTextureView constructor always completes successfully, but it may not always reflect the actual content of the FeatureIdTexture. This enumeration provides the reason.

Enumerator
Valid 

This view is valid and ready to use.

ErrorUninitialized 

This view has not yet been initialized.

ErrorInvalidTexture 

This feature ID texture has a texture index that doesn't exist in the glTF.

ErrorInvalidImage 

This feature ID texture has an image index that doesn't exist in the glTF.

ErrorInvalidSampler 

This feature ID texture has a sampler index that doesn't exist in the glTF.

ErrorEmptyImage 

This feature ID texture has an empty image.

ErrorInvalidImageBytesPerChannel 

The image for this feature ID texture has channels that take up more than a byte. Only single-byte channels are supported.

ErrorInvalidChannels 

The channels of this feature ID texture property are invalid. Channels must be in the range 0-3, with a minimum of one channel. Although more than four channels can be defined for specialized texture formats, this view only supports a maximum of four channels.

Definition at line 19 of file FeatureIdTextureView.h.

◆ GpuCompressedPixelFormat

Supported GPU compressed pixel formats.

Enumerator
NONE 

The data is uncompressed.

ETC1_RGB 

The data is an ETC1-compressed RGB888 texture.

ETC2_RGBA 

The data is an ETC2-compressed RGBA8888 texture.

BC1_RGB 

The data is a BC1-compressed RGB565 texture.

BC3_RGBA 

The data is a BC3-compressed RGBA5658 texture.

BC4_R 

The data is a BC4-compressed R8 texture.

BC5_RG 

The data is a BC5-compressed RG88 texture.

BC7_RGBA 

The data is a BC7-compressed RGBA8888 texture.

PVRTC1_4_RGB 

The data is a PVRTC1-compressed RGB444 texture.

PVRTC1_4_RGBA 

The data is a PVRTC1-compressed RGBA4444 texture.

ASTC_4x4_RGBA 

The data is a ASTC-compressed RGBA texture with a 4x4 block footprint.

PVRTC2_4_RGB 

The data is a PVRTC2-compressed RGB444 texture.

PVRTC2_4_RGBA 

The data is a PVRTC2-compressed RGBA4444 texture.

ETC2_EAC_R11 

The data is a ETC2 R11 EAC-compressed texture with a single channel.

ETC2_EAC_RG11 

The data is a ETC2 RG11 EAC-compressed texture with two channels.

Definition at line 10 of file Ktx2TranscodeTargets.h.

◆ KhrTextureTransformStatus

The status of a parsed KHR_texture_transform.

The KhrTextureTransform constructor always completes successfully, but it may not always reflect the actual transform if errors occur. This enumeration provides the reason.

Definition at line 15 of file KhrTextureTransform.h.

◆ PropertyAttributeViewStatus

Indicates the status of a property attribute view.

The PropertyAttributeView constructor always completes successfully. However it may not always reflect the actual content of the PropertyAttribute. This enumeration provides the reason.

Enumerator
Valid 

This property attribute view is valid and ready to use.

ErrorMissingMetadataExtension 

The glTF is missing the EXT_structural_metadata extension.

ErrorMissingSchema 

The glTF EXT_structural_metadata extension doesn't contain a schema.

ErrorClassNotFound 

The property attribute's specified class could not be found in the extension.

Definition at line 18 of file PropertyAttributeView.h.

◆ PropertyComponentType

The possible types of a property component.

Enumerator
None 

No type.

Int8 

A property component equivalent to an int8_t.

Uint8 

A property component equivalent to a uint8_t.

Int16 

A property component equivalent to an int16_t.

Uint16 

A property component equivalent to a uint16_t.

Int32 

A property component equivalent to an int32_t.

Uint32 

A property component equivalent to a uint32_t.

Int64 

A property component equivalent to an int64_t.

Uint64 

A property component equivalent to a uint32_t.

Float32 

A property component equivalent to a float.

Float64 

A property component equivalent to a double.

Definition at line 63 of file PropertyType.h.

◆ PropertyTableViewStatus

Indicates the status of a property table view.

The PropertyTableView constructor always completes successfully. However, it may not always reflect the actual content of the PropertyTable, but instead indicate that its PropertyTableView::size is 0. This enumeration provides the reason.

Enumerator
Valid 

This property table view is valid and ready to use.

ErrorMissingMetadataExtension 

The property table view's model does not contain an EXT_structural_metadata extension.

ErrorMissingSchema 

The property table view's model does not have a schema in its EXT_structural_metadata extension.

ErrorClassNotFound 

The property table's specified class could not be found in the extension.

Definition at line 22 of file PropertyTableView.h.

◆ PropertyTextureViewStatus

Indicates the status of a property texture view.

The PropertyTextureView constructor always completes successfully. However it may not always reflect the actual content of the PropertyTexture. This enumeration provides the reason.

Enumerator
Valid 

This property texture view is valid and ready to use.

ErrorMissingMetadataExtension 

The glTF is missing the EXT_structural_metadata extension.

ErrorMissingSchema 

The glTF EXT_structural_metadata extension doesn't contain a schema.

ErrorClassNotFound 

The property texture's specified class could not be found in the extension.

Definition at line 19 of file PropertyTextureView.h.

◆ PropertyType

enum class CesiumGltf::PropertyType
strong

The possible types of a property in a PropertyTableView.

Enumerator
Invalid 

An invalid property type.

Scalar 

A scalar property, i.e. an integer or floating point value.

Vec2 

A vector with two components.

Vec3 

A vector with three components.

Vec4 

A vector with four components.

Mat2 

A 2x2 matrix.

Mat3 

A 3x3 matrix.

Mat4 

A 4x4 matrix.

String 

A string.

Boolean 

A boolean.

Enum 

An enum.

Definition at line 13 of file PropertyType.h.

◆ TextureViewStatus

enum class CesiumGltf::TextureViewStatus
strong

Indicates the status of a texture view.

The TextureView constructor always completes successfully. However it may not always reflect the actual content of the corresponding texture. This enumeration provides the reason.

Enumerator
Valid 

This texture view is valid and ready to use.

ErrorUninitialized 

This texture view has not yet been initialized.

ErrorInvalidTexture 

This texture view does not have a valid texture index.

ErrorInvalidSampler 

This texture view does not have a valid sampler index.

ErrorInvalidImage 

This texture view does not have a valid image index.

ErrorEmptyImage 

This texture is viewing an empty image.

ErrorInvalidBytesPerChannel 

The image for this texture has channels that take up more than a byte. Only single-byte channels are supported.

Definition at line 57 of file TextureView.h.

Function Documentation

◆ applySamplerWrapS()

double CesiumGltf::applySamplerWrapS ( const double u,
const int32_t wrapS )

Applies a sampler's WrapS value to the given U component of a texture coordinate.

Parameters
uThe U coordinate to apply the sampler wrap value to.
wrapSThe sampler's WrapS value, matching a member of Sampler::WrapS, to apply.
Returns
The U coordinate after applying the WrapS operation.

◆ applySamplerWrapT()

double CesiumGltf::applySamplerWrapT ( const double v,
const int32_t wrapT )

Applies a sampler's WrapT value to the given V component of a texture coordinate.

Parameters
vThe V coordinate to apply the sampler wrap value to.
wrapTThe sampler's WrapT value, matching a member of Sampler::WrapT, to apply.
Returns
The V coordinate after applying the WrapT operation.

◆ applyScale()

template<typename T >
T CesiumGltf::applyScale ( const T & value,
const T & scale )

Multiplies each component of the value by the given scale factor.

Parameters
valueThe value to scale.
scaleThe scale factor to apply to the value.

Definition at line 73 of file PropertyTransformations.h.

◆ assembleArrayValue()

template<typename T >
PropertyArrayCopy< T > CesiumGltf::assembleArrayValue ( const std::span< uint8_t > bytes)
noexcept

Attempts to obtain an array value from the given span of bytes.

Template Parameters
TThe element type to read from bytes.
Parameters
bytesA span of bytes to convert into an array value.
Returns
A PropertyArrayCopy containing the elements read.

Definition at line 183 of file PropertyTexturePropertyView.h.

◆ assembleScalarValue()

template<typename ElementType >
ElementType CesiumGltf::assembleScalarValue ( const std::span< uint8_t > bytes)
noexcept

Attempts to obtain a scalar value from the given span of bytes.

Template Parameters
ElementTypeThe scalar value type to read from bytes.
Parameters
bytesA span of bytes to convert into a scalar value.
Returns
A value of ElementType.

Definition at line 94 of file PropertyTexturePropertyView.h.

◆ assembleValueFromChannels()

template<typename ElementType >
PropertyValueViewToCopy< ElementType > CesiumGltf::assembleValueFromChannels ( const std::span< uint8_t > bytes)
noexcept

Assembles the given type from the provided channel values of sampling a texture.

Template Parameters
ElementTypeThe type of element to assemble.
Parameters
bytesThe byte values of the sampled channels of the texture.
Returns
The result of assembleScalarValue, assembleVecNValue, or assembleArrayValue depending on ElementType.

Definition at line 213 of file PropertyTexturePropertyView.h.

◆ assembleVecNValue()

template<typename ElementType >
ElementType CesiumGltf::assembleVecNValue ( const std::span< uint8_t > bytes)
noexcept

Attempts to obtain a vector value from the given span of bytes.

Template Parameters
ElementTypeThe vector value type to read from bytes.
Parameters
bytesA span of bytes to convert into a vector value.
Returns
A value of ElementType.

Definition at line 128 of file PropertyTexturePropertyView.h.

◆ convertAccessorComponentTypeToPropertyComponentType()

PropertyComponentType CesiumGltf::convertAccessorComponentTypeToPropertyComponentType ( int componentType)

Converts a integer type ID listed in AccessorSpec::ComponentType to its corresponding PropertyComponentType.

Parameters
componentTypeThe integer ID to convert to a PropertyComponentType.
Returns
The ID as a PropertyComponentType, or PropertyComponentType::None if no conversion is possible.

◆ convertArrayOffsetTypeStringToPropertyComponentType()

PropertyComponentType CesiumGltf::convertArrayOffsetTypeStringToPropertyComponentType ( const std::string & str)

Converts a string listed in PropertyTableProperty::ArrayOffsetType to its corresponding PropertyComponentType.

Parameters
strThe string to convert to a PropertyComponentType.
Returns
The string as a PropertyComponentType, or PropertyComponentType::None if no conversion is possible.

◆ convertPropertyComponentTypeToString()

std::string CesiumGltf::convertPropertyComponentTypeToString ( PropertyComponentType componentType)

Converts a PropertyComponentType value to a string.

For example, PropertyComponentType::Uint8 will become "UINT8".

Parameters
componentTypeThe type to convert to a string.
Returns
The type as a string, or "NONE" if no conversion is possible.

◆ convertPropertyTypeToString()

std::string CesiumGltf::convertPropertyTypeToString ( PropertyType type)

Converts a PropertyType value to a string.

For example, PropertyType::Mat3 will become "MAT3".

Parameters
typeThe type to convert to a string.
Returns
The type as a string, or "INVALID" if no conversion is possible.

◆ convertStringOffsetTypeStringToPropertyComponentType()

PropertyComponentType CesiumGltf::convertStringOffsetTypeStringToPropertyComponentType ( const std::string & str)

Converts a string listed in PropertyTableProperty::StringOffsetType to its corresponding PropertyComponentType.

Parameters
strThe string to convert to a PropertyComponentType.
Returns
The string as a PropertyComponentType, or PropertyComponentType::None if no conversion is possible.

◆ convertStringToPropertyComponentType()

PropertyComponentType CesiumGltf::convertStringToPropertyComponentType ( const std::string & str)

Converts a string into a PropertyComponentType.

For example, "UINT8" will become a PropertyComponentType::Uint8.

Parameters
strThe string to convert to a PropertyComponentType.
Returns
The string as a PropertyComponentType, or PropertyComponentType::None if no conversion is possible.

◆ convertStringToPropertyType()

PropertyType CesiumGltf::convertStringToPropertyType ( const std::string & str)

Converts a string into a PropertyType.

For example, "MAT3" will become a PropertyType::Mat3.

Parameters
strThe string to convert to a PropertyType.
Returns
The string as a PropertyType, or PropertyType::Invalid if no conversion is possible.

◆ createAccessorView() [1/2]

template<typename TCallback >
std::invoke_result_t< TCallback, AccessorView< AccessorTypes::SCALAR< float > > > CesiumGltf::createAccessorView ( const Model & model,
const Accessor & accessor,
TCallback && callback )

Creates an appropriate AccessorView for a given accessor.

The created accessor is provided via a callback, which is a function that can be invoked with all possible AccessorView types. If an accessor cannot be created, the callback will be invoked with AccessorView<AccessorTypes::SCALAR<float>> and the AccessorView::status will indicate the reason.

Template Parameters
TCallbackThe callback.
Parameters
modelThe model to access.
accessorThe accessor to view.
callbackThe callback that receives the created accessor.
Returns
The value returned by the callback.

Definition at line 447 of file AccessorView.h.

◆ createAccessorView() [2/2]

template<typename TCallback >
std::invoke_result_t< TCallback, AccessorView< AccessorTypes::SCALAR< float > > > CesiumGltf::createAccessorView ( const Model & model,
int32_t accessorIndex,
TCallback && callback )

Creates an appropriate AccessorView for a given accessor.

The created accessor is provided via a callback, which is a function that can be invoked with all possible AccessorView types. If an accessor cannot be created, the callback will be invoked with AccessorView<AccessorTypes::SCALAR<float>> and the AccessorView::status will indicate the reason.

Template Parameters
TCallbackThe callback.
Parameters
modelThe model to access.
accessorIndexThe index of the accessor to view in Model::accessors.
callbackThe callback that receives the created accessor.
Returns
The value returned by the callback.

Definition at line 526 of file AccessorView.h.

◆ getAccessorComponentTypeAsPropertyComponentType()

PropertyComponentType CesiumGltf::getAccessorComponentTypeAsPropertyComponentType ( const Accessor & accessor)

Attempts to obtain a PropertyComponentType from the componentType field of the accessor.

Parameters
accessorThe accessor whose componentType will be obtained.
Returns
A PropertyComponentType equivalent to the accessor's AccessorSpec::componentType, or PropertyComponentType::None if no conversion could be made.

◆ getAccessorTypeAsPropertyType()

PropertyType CesiumGltf::getAccessorTypeAsPropertyType ( const Accessor & accessor)

Attempts to obtain a PropertyType from the type field of the accessor.

Parameters
accessorThe accessor whose type will be obtained.
Returns
A PropertyType equivalent to the accessor's AccessorSpec::type, or PropertyType::Invalid if no conversion could be made.

◆ getComponentCountFromPropertyType()

glm::length_t CesiumGltf::getComponentCountFromPropertyType ( PropertyType type)

Obtains the number of components in the given PropertyType.

Parameters
typeThe type of the property to get the component count of.
Returns
The number of components in a value of the given PropertyType. For example, a value of PropertyType::Scalar has one component. A value of PropertyType::Vec4 has four components. A value of PropertyType::Mat4 has 16 components.

◆ getCount()

template<typename ElementType >
int64_t CesiumGltf::getCount ( std::optional< std::vector< std::byte > > & buffer)

Obtains the number of values of type ElementType that could fit in the buffer.

Parameters
bufferThe buffer whose size will be used for this calculation.
Returns
The number of values of type ElementType that could fit in buffer. This value will be equivalent to floor(buffer->size() / sizeof(ElementType)).

Definition at line 285 of file PropertyView.h.

◆ getDimensionsFromPropertyType()

glm::length_t CesiumGltf::getDimensionsFromPropertyType ( PropertyType type)

Obtains the number of dimensions in the given PropertyType.

Parameters
typeThe type of the property to get the dimensions of.
Returns
The number of dimensions in a value of the given PropertyType. For example, a value of PropertyType::Scalar has one dimension. A value of PropertyType::Mat4 and a value of PropertyType::Vec4 both have four dimensions.

◆ getFeatureIdAccessorView() [1/2]

FeatureIdAccessorType CesiumGltf::getFeatureIdAccessorView ( const Model & model,
const MeshPrimitive & primitive,
int32_t featureIdAttributeIndex )

Retrieves an accessor view for the specified feature ID attribute from the given glTF primitive and model. This verifies that the accessor is of a valid type. If not, the returned accessor view will be invalid.

◆ getFeatureIdAccessorView() [2/2]

FeatureIdAccessorType CesiumGltf::getFeatureIdAccessorView ( const Model & model,
const Node & node,
int32_t featureIdAttributeIndex )

Retrieves an accessor view for the specified feature ID attribute from the given glTF node and model, if the node contains an EXT_mesh_gpu_instancing property. This verifies that the accessor is of a valid type. If not, the returned accessor view will be invalid.

◆ getIndexAccessorView()

IndexAccessorType CesiumGltf::getIndexAccessorView ( const Model & model,
const MeshPrimitive & primitive )

Retrieves an accessor view for the indices of the given glTF primitive from the model. The primitive may not specify any indices; if so, std::monostate is returned.

◆ getNormalAccessorView()

NormalAccessorType CesiumGltf::getNormalAccessorView ( const Model & model,
const MeshPrimitive & primitive )

Retrieves an accessor view for the normal attribute from the given glTF primitive and model. This verifies that the accessor is of a valid type. If not, the returned accessor view will be invalid.

◆ getPositionAccessorView()

PositionAccessorType CesiumGltf::getPositionAccessorView ( const Model & model,
const MeshPrimitive & primitive )

Retrieves an accessor view for the position attribute from the given glTF primitive and model. This verifies that the accessor is of a valid type. If not, the returned accessor view will be invalid.

◆ getQuaternionAccessorView() [1/2]

QuaternionAccessorType CesiumGltf::getQuaternionAccessorView ( const Model & model,
const Accessor * accessor )

Obtains a QuaternionAccessorType from the given Accessor on the given Model.

Parameters
modelThe model containing the quaternion.
accessorAn accessor from which the quaternion will be obtained.
Returns
A quaternion from the data in accessor. If no quaternion could be obtained, the default value for QuaternionAccessorType will be returned instead.

◆ getQuaternionAccessorView() [2/2]

QuaternionAccessorType CesiumGltf::getQuaternionAccessorView ( const Model & model,
int32_t accessorIndex )

Obtains a QuaternionAccessorType from the given Accessor on the given Model.

Parameters
modelThe model containing the quaternion.
accessorIndexAn index to the accessor from which the quaternion will be obtained.
Returns
A quaternion from the data in the accessor at accessorIndex. If no quaternion could be obtained, the default value for QuaternionAccessorType will be returned instead.

◆ getSizeOfComponentType()

size_t CesiumGltf::getSizeOfComponentType ( PropertyComponentType componentType)

Obtains the size in bytes of a value of this PropertyComponentType.

Parameters
componentTypeThe component type to get the size of.
Returns
The size in bytes that a value matching this PropertyComponentType. For example, a value of PropertyComponentType::Uint32 would take up four bytes.

◆ getTexCoordAccessorView()

TexCoordAccessorType CesiumGltf::getTexCoordAccessorView ( const Model & model,
const MeshPrimitive & primitive,
int32_t textureCoordinateSetIndex )

Retrieves an accessor view for the specified texture coordinate set from the given glTF primitive and model. This verifies that the accessor is of a valid type. If not, the returned accessor view will be invalid.,

◆ isPropertyComponentTypeInteger()

bool CesiumGltf::isPropertyComponentTypeInteger ( PropertyComponentType componentType)

Checks if the given PropertyComponentType represents an integer value.

Parameters
componentTypeThe PropertyComponentType to check.
Returns
True if the PropertyComponentType is not PropertyComponentType::Float32 or PropertyComponentType::Float64, false otherwise.

◆ isPropertyTypeMatN()

bool CesiumGltf::isPropertyTypeMatN ( PropertyType type)

Checks if the given PropertyType represents a matrix with any number of components.

Parameters
typeThe PropertyType to check.
Returns
True if PropertyType is PropertyType::Mat2, PropertyType::Mat3, or PropertyType::Mat4, or false otherwise.

◆ isPropertyTypeVecN()

bool CesiumGltf::isPropertyTypeVecN ( PropertyType type)

Checks if the given PropertyType represents a vector with any number of components.

Parameters
typeThe PropertyType to check.
Returns
True if PropertyType is PropertyType::Vec2, PropertyType::Vec3, or PropertyType::Vec4, or false otherwise.

◆ normalize() [1/3]

template<glm::length_t N, typename T >
glm::mat< N, N, double > CesiumGltf::normalize ( glm::mat< N, N, T > value)

Normalizes the given matrix's components between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.

Parameters
valueThe value to normalize.

Definition at line 51 of file PropertyTransformations.h.

◆ normalize() [2/3]

template<glm::length_t N, typename T >
glm::vec< N, double > CesiumGltf::normalize ( glm::vec< N, T > value)

Normalizes the given vector's components between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.

Parameters
valueThe value to normalize.

Definition at line 35 of file PropertyTransformations.h.

◆ normalize() [3/3]

template<typename T >
double CesiumGltf::normalize ( T value)

Normalizes the given value between [0, 1] if unsigned or [-1, 1] if signed, based on the type's maximum value.

Parameters
valueThe value to normalize.

Definition at line 19 of file PropertyTransformations.h.

◆ operator!=() [1/4]

template<typename T >
bool CesiumGltf::operator!= ( const PropertyArrayCopy< T > & lhs,
const PropertyArrayCopy< T > & rhs )

Compares two PropertyArrayCopy instances by creating views from both instances and returning the inverse of comparing the two.

Definition at line 364 of file PropertyArrayView.h.

◆ operator!=() [2/4]

template<typename T >
bool CesiumGltf::operator!= ( const PropertyArrayCopy< T > & lhs,
const PropertyArrayView< T > & rhs )

Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and returning the inverse of comparing the two.

Definition at line 354 of file PropertyArrayView.h.

◆ operator!=() [3/4]

template<typename T >
bool CesiumGltf::operator!= ( const PropertyArrayView< T > & lhs,
const PropertyArrayCopy< T > & rhs )

Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and returning the inverse of comparing the two.

Definition at line 344 of file PropertyArrayView.h.

◆ operator!=() [4/4]

template<typename T >
bool CesiumGltf::operator!= ( const PropertyArrayView< T > & lhs,
const PropertyArrayView< T > & rhs )

Compares two PropertyArrayView instances and returns the inverse.

Definition at line 334 of file PropertyArrayView.h.

◆ operator==() [1/4]

template<typename T >
bool CesiumGltf::operator== ( const PropertyArrayCopy< T > & lhs,
const PropertyArrayCopy< T > & rhs )

Compares two PropertyArrayCopy instances by creating views from each instance and comparing the two.

Definition at line 324 of file PropertyArrayView.h.

◆ operator==() [2/4]

template<typename T >
bool CesiumGltf::operator== ( const PropertyArrayCopy< T > & lhs,
const PropertyArrayView< T > & rhs )

Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and comparing the two.

Definition at line 315 of file PropertyArrayView.h.

◆ operator==() [3/4]

template<typename T >
bool CesiumGltf::operator== ( const PropertyArrayView< T > & lhs,
const PropertyArrayCopy< T > & rhs )

Compares a PropertyArrayView with a PropertyArrayCopy by creating a view from the copy and comparing the two.

Definition at line 306 of file PropertyArrayView.h.

◆ operator==() [4/4]

template<typename T >
bool CesiumGltf::operator== ( const PropertyArrayView< T > & lhs,
const PropertyArrayView< T > & rhs )

Compares two PropertyArrayView instances by comparing their values. If the two arrays aren't the same size, this comparison will return false.

Definition at line 286 of file PropertyArrayView.h.

◆ transformArray()

template<typename T >
PropertyArrayCopy< T > CesiumGltf::transformArray ( const PropertyArrayView< T > & value,
const std::optional< PropertyArrayView< T > > & offset,
const std::optional< PropertyArrayView< T > > & scale )

Transforms each element of an array of values by optional offset and scale factors. See transformValue.

Parameters
valueThe array whose elements will be transformed.
offsetThe amount to offset each element by, or std::nullopt to apply no offset.
scaleThe amount to scale each element by, or std::nullopt to apply no scale factor.
Returns
A transformed copy of the input array.

Definition at line 126 of file PropertyTransformations.h.

◆ transformNormalizedArray()

template<typename T , typename NormalizedType = typename TypeToNormalizedType<T>::type>
PropertyArrayCopy< NormalizedType > CesiumGltf::transformNormalizedArray ( const PropertyArrayView< T > & value,
const std::optional< PropertyArrayView< NormalizedType > > & offset,
const std::optional< PropertyArrayView< NormalizedType > > & scale )

Normalizes each element of an array of values and transforms them by optional offset and scale factors. See transformValue and transformArray.

Parameters
valueThe array whose elements will be transformed.
offsetThe amount to offset each element by, or std::nullopt to apply no offset. The offset will be applied after normalization.
scaleThe amount to scale each element by, or std::nullopt to apply no scale factor. The scale will be applied after normalization.
Returns
A normalized and transformed copy of the input array.

Definition at line 161 of file PropertyTransformations.h.

◆ transformNormalizedMatNArray()

template<glm::length_t N, typename T >
PropertyArrayCopy< glm::mat< N, N, double > > CesiumGltf::transformNormalizedMatNArray ( const PropertyArrayView< glm::mat< N, N, T > > & value,
const std::optional< PropertyArrayView< glm::mat< N, N, double > > > & offset,
const std::optional< PropertyArrayView< glm::mat< N, N, double > > > & scale )

Normalizes each element of an array of matrices and transforms them by optional offset and scale factors. See transformNormalizedArray.

Parameters
valueThe array whose elements will be transformed.
offsetThe amount to offset each element by, or std::nullopt to apply no offset. The offset will be applied after normalization.
scaleThe amount to scale each element by, or std::nullopt to apply no scale factor. The scale will be applied after normalization.
Returns
A normalized and transformed copy of the input array.

Definition at line 225 of file PropertyTransformations.h.

◆ transformNormalizedVecNArray()

template<glm::length_t N, typename T >
PropertyArrayCopy< glm::vec< N, double > > CesiumGltf::transformNormalizedVecNArray ( const PropertyArrayView< glm::vec< N, T > > & value,
const std::optional< PropertyArrayView< glm::vec< N, double > > > & offset,
const std::optional< PropertyArrayView< glm::vec< N, double > > > & scale )

Normalizes each element of an array of vectors and transforms them by optional offset and scale factors. See transformNormalizedArray.

Parameters
valueThe array whose elements will be transformed.
offsetThe amount to offset each element by, or std::nullopt to apply no offset. The offset will be applied after normalization.
scaleThe amount to scale each element by, or std::nullopt to apply no scale factor. The scale will be applied after normalization.
Returns
A normalized and transformed copy of the input array.

Definition at line 193 of file PropertyTransformations.h.

◆ transformValue()

template<typename T >
T CesiumGltf::transformValue ( const T & value,
const std::optional< T > & offset,
const std::optional< T > & scale )

Transforms the value by optional offset and scale factors.

Parameters
valueThe value to transform.
offsetThe amount to offset the value by, or std::nullopt to apply no offset.
scaleThe amount to scale the value by, or std::nullopt to apply no scale. See applyScale.

Definition at line 98 of file PropertyTransformations.h.

◆ validateArrayPropertyType()

template<typename T >
PropertyViewStatusType CesiumGltf::validateArrayPropertyType ( const ClassProperty & classProperty)

Validates a ClassProperty representing an array, checking for any type mismatches.

Returns
A PropertyViewStatus value representing the error found while validating, or PropertyViewStatus::Valid if no errors were found.

Definition at line 157 of file PropertyView.h.

◆ validatePropertyType()

template<typename T >
PropertyViewStatusType CesiumGltf::validatePropertyType ( const ClassProperty & classProperty)

Validates a ClassProperty, checking for any type mismatches.

Returns
A PropertyViewStatus value representing the error found while validating, or PropertyViewStatus::Valid if no errors were found.

Definition at line 121 of file PropertyView.h.