cesium-native  0.41.0
CesiumGltf Namespace Reference

Classes for working with glTF models. More...

Classes

struct  Accessor
 A typed view into a buffer view that contains raw binary data. More...
 
struct  CountFromAccessor
 Visitor that retrieves the count of elements in the given accessor type as an int64_t. 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  FeatureIdFromAccessor
 
struct  IndicesForFaceFromAccessor
 
struct  IndexFromAccessor
 
struct  TexCoordFromAccessor
 
class  AccessorView
 A view on the data of one accessor of a glTF asset. More...
 
struct  AccessorTypes
 Contains types that may optionally be used with AccessorView for various Accessor::componentType values. More...
 
class  AccessorWriter
 Provides write access to an AccessorView. More...
 
struct  Buffer
 A buffer points to binary geometry, animation, or skins. More...
 
struct  BufferCesium
 Holds Buffer properties that are specific to the glTF loader rather than part of the glTF spec. More...
 
class  FeatureIdTextureView
 A view on the image data of FeatureIdTexture. More...
 
struct  Image
 Image data used to create a texture. Image MAY be referenced by an URI (or IRI) or a buffer view index. More...
 
struct  ImageAssetMipPosition
 The byte range within a buffer where this mip exists. 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...
 
class  KhrTextureTransform
 A utility class that parses KHR_texture_transform parameters and transforms input texture coordinates. More...
 
struct  SupportedGpuCompressedPixelFormats
 Represents the status of support for all GpuCompressedPixelFormats on a client platform. More...
 
struct  Ktx2TranscodeTargets
 For each possible input transmission format, this struct names the ideal target gpu-compressed pixel format to transcode to. 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< T, T >
 Trivially converts any type to itself. More...
 
struct  MetadataConversions< bool, TFrom, std::enable_if_t< CesiumGltf::IsMetadataScalar< TFrom >::value > >
 Converts from a scalar to a bool. More...
 
struct  MetadataConversions< bool, std::string_view >
 Converts from std::string_view to a bool. More...
 
struct  MetadataConversions< bool, std::string >
 Converts from std::string to a bool. 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::IsMetadataInteger< TTo >::value &&CesiumGltf::IsMetadataFloating< TFrom >::value > >
 Converts from a floating-point type to an 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, 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_view, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >
 Converts from std::string_view to an integer. More...
 
struct  MetadataConversions< TTo, bool, std::enable_if_t< CesiumGltf::IsMetadataInteger< TTo >::value > >
 Converts from a boolean to an integer type. More...
 
struct  MetadataConversions< float, bool >
 Converts from a boolean 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< 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< double, bool >
 Converts from a boolean 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< 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< std::string, bool >
 Converts from a boolean to a 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< std::string, std::string_view >
 Converts from a std::string_view to a std::string. More...
 
struct  MetadataConversions< TTo, bool, std::enable_if_t< IsMetadataVecN< TTo >::value > >
 Converts from a boolean to a vecN. More...
 
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  MetadataConversions< TTo, bool, std::enable_if_t< IsMetadataMatN< TTo >::value > >
 Converts from a boolean to a matN. 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::IsMetadataMatN< TTo >::value &&CesiumGltf::IsMetadataMatN< TFrom >::value &&!std::is_same_v< TTo, TFrom > > >
 Converts from a matN type to another matN type. More...
 
struct  Model
 The root object for a glTF asset. More...
 
struct  NamedObject
 The base class for objects in a glTF that have a name. More...
 
class  PropertyArrayView
 A view on an array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
class  PropertyArrayCopy
 A copy of an array element of a PropertyTableProperty or PropertyTextureProperty. More...
 
class  PropertyArrayView< bool >
 
class  PropertyArrayView< std::string_view >
 
class  PropertyAttributePropertyViewStatus
 Indicates the status of a property attribute property view. 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  PropertyAttributeView
 A view on a PropertyAttribute. More...
 
class  PropertyTablePropertyViewStatus
 Indicates the status of a property table property view. 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  PropertyTableView
 Utility to retrieve the data of PropertyTable. More...
 
class  PropertyTexturePropertyViewStatus
 Indicates the status of a property texture property view. 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  PropertyTextureView
 A view on a PropertyTexture. More...
 
struct  IsMetadataScalar
 Check if a C++ type can be represented as a scalar property type. More...
 
struct  IsMetadataScalar< T >
 
struct  IsMetadataScalar< uint8_t >
 
struct  IsMetadataScalar< int8_t >
 
struct  IsMetadataScalar< uint16_t >
 
struct  IsMetadataScalar< int16_t >
 
struct  IsMetadataScalar< uint32_t >
 
struct  IsMetadataScalar< int32_t >
 
struct  IsMetadataScalar< uint64_t >
 
struct  IsMetadataScalar< int64_t >
 
struct  IsMetadataScalar< float >
 
struct  IsMetadataScalar< double >
 
struct  IsMetadataInteger
 Check if a C++ type can be represented as an integer property type. More...
 
struct  IsMetadataInteger< T >
 
struct  IsMetadataInteger< uint8_t >
 
struct  IsMetadataInteger< int8_t >
 
struct  IsMetadataInteger< uint16_t >
 
struct  IsMetadataInteger< int16_t >
 
struct  IsMetadataInteger< uint32_t >
 
struct  IsMetadataInteger< int32_t >
 
struct  IsMetadataInteger< uint64_t >
 
struct  IsMetadataInteger< int64_t >
 
struct  IsMetadataFloating
 Check if a C++ type can be represented as a floating-point property type. More...
 
struct  IsMetadataFloating< T >
 
struct  IsMetadataFloating< float >
 
struct  IsMetadataFloating< double >
 
struct  IsMetadataVecN
 Check if a C++ type can be represented as a vecN type. More...
 
struct  IsMetadataVecN< T >
 
struct  IsMetadataVecN< glm::vec< n, T, P > >
 
struct  IsMetadataMatN
 Check if a C++ type can be represented as a matN type. More...
 
struct  IsMetadataMatN< T >
 
struct  IsMetadataMatN< glm::mat< n, n, T, P > >
 
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 >
 
struct  IsMetadataBoolean
 Check if a C++ type can be represented as a boolean property type. More...
 
struct  IsMetadataBoolean< T >
 
struct  IsMetadataBoolean< bool >
 
struct  IsMetadataString
 Check if a C++ type can be represented as a string property type. More...
 
struct  IsMetadataString< T >
 
struct  IsMetadataString< std::string_view >
 
struct  IsMetadataArray
 Check if a C++ type can be represented as an array. More...
 
struct  IsMetadataArray< T >
 
struct  IsMetadataArray< PropertyArrayView< T > >
 
struct  IsMetadataArray< PropertyArrayCopy< T > >
 
struct  IsMetadataNumericArray
 Check if a C++ type can be represented as an array of numeric elements property type. More...
 
struct  IsMetadataNumericArray< T >
 
struct  IsMetadataNumericArray< PropertyArrayView< T > >
 
struct  IsMetadataNumericArray< PropertyArrayCopy< T > >
 
struct  IsMetadataBooleanArray
 Check if a C++ type can be represented as an array of booleans property type. More...
 
struct  IsMetadataBooleanArray< T >
 
struct  IsMetadataBooleanArray< PropertyArrayView< bool > >
 
struct  IsMetadataStringArray
 Check if a C++ type can be represented as an array of strings property type. More...
 
struct  IsMetadataStringArray< T >
 
struct  IsMetadataStringArray< PropertyArrayView< std::string_view > >
 
struct  MetadataArrayType
 Retrieve the component type of a metadata array. More...
 
struct  MetadataArrayType< CesiumGltf::PropertyArrayView< T > >
 
struct  MetadataArrayType< CesiumGltf::PropertyArrayCopy< T > >
 
struct  TypeToPropertyType
 Convert a C++ type to PropertyType and PropertyComponentType. More...
 
struct  TypeToPropertyType< uint8_t >
 
struct  TypeToPropertyType< int8_t >
 
struct  TypeToPropertyType< uint16_t >
 
struct  TypeToPropertyType< int16_t >
 
struct  TypeToPropertyType< uint32_t >
 
struct  TypeToPropertyType< int32_t >
 
struct  TypeToPropertyType< uint64_t >
 
struct  TypeToPropertyType< int64_t >
 
struct  TypeToPropertyType< float >
 
struct  TypeToPropertyType< double >
 
struct  TypeToPropertyType< glm::vec< 2, T, P > >
 
struct  TypeToPropertyType< glm::vec< 3, T, P > >
 
struct  TypeToPropertyType< glm::vec< 4, T, P > >
 
struct  TypeToPropertyType< glm::mat< 2, 2, T, P > >
 
struct  TypeToPropertyType< glm::mat< 3, 3, T, P > >
 
struct  TypeToPropertyType< glm::mat< 4, 4, T, P > >
 
struct  TypeToPropertyType< bool >
 
struct  TypeToPropertyType< std::string_view >
 
struct  CanBeNormalized
 Check if a C++ type can be normalized. More...
 
struct  CanBeNormalized< T >
 
struct  CanBeNormalized< uint8_t >
 
struct  CanBeNormalized< int8_t >
 
struct  CanBeNormalized< uint16_t >
 
struct  CanBeNormalized< int16_t >
 
struct  CanBeNormalized< uint32_t >
 
struct  CanBeNormalized< int32_t >
 
struct  CanBeNormalized< uint64_t >
 
struct  CanBeNormalized< int64_t >
 
struct  CanBeNormalized< glm::vec< n, T, P > >
 
struct  CanBeNormalized< glm::mat< n, n, T, P > >
 
struct  CanBeNormalized< PropertyArrayView< T > >
 
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< int8_t >
 
struct  TypeToNormalizedType< uint8_t >
 
struct  TypeToNormalizedType< int16_t >
 
struct  TypeToNormalizedType< uint16_t >
 
struct  TypeToNormalizedType< int32_t >
 
struct  TypeToNormalizedType< uint32_t >
 
struct  TypeToNormalizedType< int64_t >
 
struct  TypeToNormalizedType< uint64_t >
 
struct  TypeToNormalizedType< glm::vec< N, T, Q > >
 
struct  TypeToNormalizedType< glm::mat< N, N, T, Q > >
 
struct  TypeToNormalizedType< PropertyArrayView< int8_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< uint8_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< int16_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< uint16_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< int32_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< uint32_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< int64_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< uint64_t > >
 
struct  TypeToNormalizedType< PropertyArrayView< glm::vec< N, T, Q > > >
 
struct  TypeToNormalizedType< PropertyArrayView< glm::mat< N, N, T, Q > > >
 
class  PropertyViewStatus
 Indicates the status of a property view. More...
 
class  PropertyView
 Represents a 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< bool >
 Represents a boolean metadata property in EXT_structural_metadata. More...
 
class  PropertyView< std::string_view >
 Represents a string 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< bool > >
 Represents a boolean 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...
 
struct  TextureViewOptions
 Describes options for constructing a view on a glTF texture. More...
 
class  TextureView
 
struct  VertexAttributeSemantics
 The standard glTF vertex attribute semantics from the specification. 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  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  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  Class
 A class containing a set of properties. More...
 
struct  ClassProperty
 A class property. 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  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  FeatureIdTexture
 A texture containing feature IDs. 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  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  ModelSpec
 The root object for a glTF asset. 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...
 
struct  PropertyAttribute
 Properties conforming to a class, organized as property values stored in attributes. More...
 
struct  PropertyAttributeProperty
 An attribute containing property values. 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...
 
struct  PropertyTexture
 Properties conforming to a class, organized as property values stored in textures. More...
 
struct  PropertyTextureProperty
 A texture containing property values. 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  Texture
 A texture and its sampler. More...
 
struct  TextureInfo
 Reference to a texture. 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
 
template<typename T >
using PropertyValueViewToCopy = 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. More...
 
template<typename T >
using PropertyValueCopyToView = std::conditional_t< IsMetadataNumericArray< T >::value, PropertyArrayView< typename MetadataArrayType< T >::type >, T >
 
typedef int32_t PropertyViewStatusType
 

Enumerations

enum class  AccessorViewStatus {
  Valid , InvalidAccessorIndex , InvalidBufferViewIndex , InvalidBufferIndex ,
  BufferViewTooSmall , BufferTooSmall , WrongSizeT , InvalidType ,
  InvalidComponentType
}
 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  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
}
 
enum class  PropertyComponentType {
  None , Int8 , Uint8 , Int16 ,
  Uint16 , Int32 , Uint32 , Int64 ,
  Uint64 , Float32 , Float64
}
 
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)
 
QuaternionAccessorType getQuaternionAccessorView (const Model &model, int32_t accessorIndex)
 
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. More...
 
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. More...
 
template<typename T >
bool operator== (const PropertyArrayView< T > &lhs, const PropertyArrayView< T > &rhs)
 
template<typename T >
bool operator== (const PropertyArrayView< T > &lhs, const PropertyArrayCopy< T > &rhs)
 
template<typename T >
bool operator== (const PropertyArrayCopy< T > &lhs, const PropertyArrayView< T > &rhs)
 
template<typename T >
bool operator== (const PropertyArrayCopy< T > &lhs, const PropertyArrayCopy< T > &rhs)
 
template<typename T >
bool operator!= (const PropertyArrayView< T > &lhs, const PropertyArrayView< T > &rhs)
 
template<typename T >
bool operator!= (const PropertyArrayView< T > &lhs, const PropertyArrayCopy< T > &rhs)
 
template<typename T >
bool operator!= (const PropertyArrayCopy< T > &lhs, const PropertyArrayView< T > &rhs)
 
template<typename T >
bool operator!= (const PropertyArrayCopy< T > &lhs, const PropertyArrayCopy< T > &rhs)
 
PropertyType getAccessorTypeAsPropertyType (const Accessor &accessor)
 
PropertyComponentType getAccessorComponentTypeAsPropertyComponentType (const Accessor &accessor)
 
int64_t getOffsetTypeSize (PropertyComponentType offsetType) noexcept
 
template<typename ElementType >
ElementType assembleScalarValue (const gsl::span< uint8_t > bytes) noexcept
 
template<typename ElementType >
ElementType assembleVecNValue (const gsl::span< uint8_t > bytes) noexcept
 
template<typename T >
PropertyArrayCopy< T > assembleArrayValue (const gsl::span< uint8_t > bytes) noexcept
 
template<typename ElementType >
PropertyValueViewToCopy< ElementType > assembleValueFromChannels (const gsl::span< uint8_t > bytes) noexcept
 
template<typename T >
double normalize (T value)
 
template<glm::length_t N, typename T >
glm::vec< N, double > normalize (glm::vec< N, T > value)
 
template<glm::length_t N, typename T >
glm::mat< N, N, double > normalize (glm::mat< N, N, T > value)
 
template<typename T >
applyScale (const T &value, const T &scale)
 
template<typename T >
transformValue (const T &value, const std::optional< T > &offset, const std::optional< T > &scale)
 
template<typename T >
PropertyArrayCopy< T > transformArray (const PropertyArrayView< T > &value, const std::optional< PropertyArrayView< T >> &offset, const std::optional< PropertyArrayView< T >> &scale)
 
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)
 
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)
 
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)
 
std::string convertPropertyTypeToString (PropertyType type)
 
PropertyType convertStringToPropertyType (const std::string &str)
 
std::string convertPropertyComponentTypeToString (PropertyComponentType componentType)
 
PropertyComponentType convertStringToPropertyComponentType (const std::string &str)
 
PropertyComponentType convertArrayOffsetTypeStringToPropertyComponentType (const std::string &str)
 
PropertyComponentType convertStringOffsetTypeStringToPropertyComponentType (const std::string &str)
 
PropertyComponentType convertAccessorComponentTypeToPropertyComponentType (int componentType)
 
bool isPropertyTypeVecN (PropertyType type)
 
bool isPropertyTypeMatN (PropertyType type)
 
bool isPropertyComponentTypeInteger (PropertyComponentType componentType)
 
glm::length_t getDimensionsFromPropertyType (PropertyType type)
 
glm::length_t getComponentCountFromPropertyType (PropertyType type)
 
size_t getSizeOfComponentType (PropertyComponentType componentType)
 
template<typename T >
PropertyViewStatusType validatePropertyType (const ClassProperty &classProperty)
 
template<typename T >
PropertyViewStatusType validateArrayPropertyType (const ClassProperty &classProperty)
 
template<typename ElementType >
int64_t getCount (std::optional< std::vector< std::byte >> &buffer)
 
double applySamplerWrapS (const double u, const int32_t wrapS)
 
double applySamplerWrapT (const double v, const int32_t wrapT)
 

Detailed Description

Classes for working with glTF models.

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 75 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 134 of file AccessorUtility.h.

◆ NormalAccessorType

Type definition for normal accessor.

Definition at line 55 of file AccessorUtility.h.

◆ PositionAccessorType

Type definition for position accessor.

Definition at line 42 of file AccessorUtility.h.

◆ PropertyValueViewToCopy

template<typename T >
using CesiumGltf::PropertyValueViewToCopy = typedef 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.

Template Parameters
TThe type of the property value view.

Definition at line 388 of file PropertyTypeTraits.h.

◆ QuaternionAccessorType

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

Definition at line 332 of file AccessorUtility.h.

◆ TexCoordAccessorType

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

Definition at line 273 of file AccessorUtility.h.

Enumeration Type Documentation

◆ AccessorViewStatus

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 Accessor:type is invalid.

InvalidComponentType 

The Accessor::componentType is invalid.

Definition at line 18 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.

◆ 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.

◆ 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.

◆ TextureViewStatus

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

◆ 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 427 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 506 of file AccessorView.h.

◆ 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.

◆ 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.,