cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumGltf::ModelSpec Struct Reference

The root object for a glTF asset. More...

#include <CesiumGltf/ModelSpec.h>

Inheritance diagram for CesiumGltf::ModelSpec:
CesiumUtility::ExtensibleObject CesiumGltf::Model

Public Member Functions

int64_t getSizeBytes () const
 Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
 
- Public Member Functions inherited from CesiumUtility::ExtensibleObject
template<typename T >
bool hasExtension () const noexcept
 Checks if an extension exists given its static type.
 
template<typename T >
const T * getExtension () const noexcept
 Gets an extension given its static type.
 
template<typename T >
T * getExtension () noexcept
 Gets an extension given its static type.
 
const JsonValuegetGenericExtension (const std::string &extensionName) const noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
JsonValuegetGenericExtension (const std::string &extensionName) noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
template<typename T , typename... ConstructorArgumentTypes>
T & addExtension (ConstructorArgumentTypes &&... constructorArguments)
 Adds a statically-typed extension to this object.
 
template<typename T >
void removeExtension ()
 Removes a statically-typed extension from this object.
 
int64_t getSizeBytes () const
 Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object.
 

Public Attributes

std::vector< std::string > extensionsUsed
 Names of glTF extensions used in this asset.
 
std::vector< std::string > extensionsRequired
 Names of glTF extensions required to properly load this asset.
 
std::vector< CesiumGltf::Accessoraccessors
 An array of accessors.
 
std::vector< CesiumGltf::Animationanimations
 An array of keyframe animations.
 
CesiumGltf::Asset asset
 Metadata about the glTF asset.
 
std::vector< CesiumGltf::Bufferbuffers
 An array of buffers.
 
std::vector< CesiumGltf::BufferViewbufferViews
 An array of bufferViews.
 
std::vector< CesiumGltf::Cameracameras
 An array of cameras.
 
std::vector< CesiumGltf::Imageimages
 An array of images.
 
std::vector< CesiumGltf::Materialmaterials
 An array of materials.
 
std::vector< CesiumGltf::Meshmeshes
 An array of meshes.
 
std::vector< CesiumGltf::Nodenodes
 An array of nodes.
 
std::vector< CesiumGltf::Samplersamplers
 An array of samplers.
 
int32_t scene = -1
 The index of the default scene.
 
std::vector< CesiumGltf::Scenescenes
 An array of scenes.
 
std::vector< CesiumGltf::Skinskins
 An array of skins.
 
std::vector< CesiumGltf::Texturetextures
 An array of textures.
 
- Public Attributes inherited from CesiumUtility::ExtensibleObject
std::unordered_map< std::string, std::any > extensions
 The extensions attached to this object.
 
JsonValue::Object extras
 Application-specific data.
 
JsonValue::Object unknownProperties
 Unknown properties that exist on this object but do not have any representation in the statically-typed classes.
 

Static Public Attributes

static constexpr const char * TypeName = "Model"
 The original name of this type.
 

Protected Member Functions

 ModelSpec ()=default
 This class is not meant to be instantiated directly. Use Model instead.
 

Friends

struct Model
 

Detailed Description

The root object for a glTF asset.

Definition at line 30 of file ModelSpec.h.

Member Function Documentation

◆ getSizeBytes()

int64_t CesiumGltf::ModelSpec::getSizeBytes ( ) const
inline

Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.

Definition at line 148 of file ModelSpec.h.

Friends And Related Symbol Documentation

◆ Model

friend struct Model
friend

Definition at line 218 of file ModelSpec.h.

Member Data Documentation

◆ accessors

std::vector<CesiumGltf::Accessor> CesiumGltf::ModelSpec::accessors

An array of accessors.

An accessor is a typed view into a bufferView.

Definition at line 51 of file ModelSpec.h.

◆ animations

std::vector<CesiumGltf::Animation> CesiumGltf::ModelSpec::animations

An array of keyframe animations.

Definition at line 56 of file ModelSpec.h.

◆ asset

CesiumGltf::Asset CesiumGltf::ModelSpec::asset

Metadata about the glTF asset.

Definition at line 61 of file ModelSpec.h.

◆ buffers

std::vector<CesiumGltf::Buffer> CesiumGltf::ModelSpec::buffers

An array of buffers.

A buffer points to binary geometry, animation, or skins.

Definition at line 68 of file ModelSpec.h.

◆ bufferViews

std::vector<CesiumGltf::BufferView> CesiumGltf::ModelSpec::bufferViews

An array of bufferViews.

A bufferView is a view into a buffer generally representing a subset of the buffer.

Definition at line 76 of file ModelSpec.h.

◆ cameras

std::vector<CesiumGltf::Camera> CesiumGltf::ModelSpec::cameras

An array of cameras.

A camera defines a projection matrix.

Definition at line 83 of file ModelSpec.h.

◆ extensionsRequired

std::vector<std::string> CesiumGltf::ModelSpec::extensionsRequired

Names of glTF extensions required to properly load this asset.

Definition at line 44 of file ModelSpec.h.

◆ extensionsUsed

std::vector<std::string> CesiumGltf::ModelSpec::extensionsUsed

Names of glTF extensions used in this asset.

Definition at line 39 of file ModelSpec.h.

◆ images

std::vector<CesiumGltf::Image> CesiumGltf::ModelSpec::images

An array of images.

An image defines data used to create a texture.

Definition at line 90 of file ModelSpec.h.

◆ materials

std::vector<CesiumGltf::Material> CesiumGltf::ModelSpec::materials

An array of materials.

A material defines the appearance of a primitive.

Definition at line 97 of file ModelSpec.h.

◆ meshes

std::vector<CesiumGltf::Mesh> CesiumGltf::ModelSpec::meshes

An array of meshes.

A mesh is a set of primitives to be rendered.

Definition at line 104 of file ModelSpec.h.

◆ nodes

std::vector<CesiumGltf::Node> CesiumGltf::ModelSpec::nodes

An array of nodes.

Definition at line 109 of file ModelSpec.h.

◆ samplers

std::vector<CesiumGltf::Sampler> CesiumGltf::ModelSpec::samplers

An array of samplers.

A sampler contains properties for texture filtering and wrapping modes.

Definition at line 116 of file ModelSpec.h.

◆ scene

int32_t CesiumGltf::ModelSpec::scene = -1

The index of the default scene.

This property MUST NOT be defined, when scenes is undefined.

Definition at line 123 of file ModelSpec.h.

◆ scenes

std::vector<CesiumGltf::Scene> CesiumGltf::ModelSpec::scenes

An array of scenes.

Definition at line 128 of file ModelSpec.h.

◆ skins

std::vector<CesiumGltf::Skin> CesiumGltf::ModelSpec::skins

An array of skins.

A skin is defined by joints and matrices.

Definition at line 135 of file ModelSpec.h.

◆ textures

std::vector<CesiumGltf::Texture> CesiumGltf::ModelSpec::textures

An array of textures.

Definition at line 140 of file ModelSpec.h.

◆ TypeName

const char* CesiumGltf::ModelSpec::TypeName = "Model"
staticconstexpr

The original name of this type.

Definition at line 34 of file ModelSpec.h.


The documentation for this struct was generated from the following file: