|
typedef void | ForEachRootNodeInSceneCallback(Model &gltf, Node &node) |
| A callback function for forEachRootNodeInScene .
|
|
typedef void | ForEachRootNodeInSceneConstCallback(const Model &gltf, const Node &node) |
| A callback function for forEachRootNodeInScene .
|
|
typedef void | ForEachNodeInSceneCallback(Model &gltf, Node &node, const glm::dmat4 &transform) |
| A callback function for forEachNodeInScene .
|
|
typedef void | ForEachNodeInSceneConstCallback(const Model &gltf, const Node &node, const glm::dmat4 &transform) |
| A callback function for forEachNodeInScene .
|
|
typedef void | ForEachPrimitiveInSceneCallback(Model &gltf, Node &node, Mesh &mesh, MeshPrimitive &primitive, const glm::dmat4 &transform) |
| A callback function for forEachPrimitiveInScene .
|
|
typedef void | ForEachPrimitiveInSceneConstCallback(const Model &gltf, const Node &node, const Mesh &mesh, const MeshPrimitive &primitive, const glm::dmat4 &transform) |
| A callback function for forEachPrimitiveInScene .
|
|
|
CesiumUtility::ErrorList | merge (Model &&rhs) |
| Merges another model into this one.
|
|
void | forEachRootNodeInScene (int32_t sceneID, std::function< ForEachRootNodeInSceneCallback > &&callback) |
| Apply the given callback to the root nodes of the scene.
|
|
void | forEachRootNodeInScene (int32_t sceneID, std::function< ForEachRootNodeInSceneConstCallback > &&callback) const |
| Apply the given callback to the root nodes of the scene.
|
|
void | forEachNodeInScene (int32_t sceneID, std::function< ForEachNodeInSceneCallback > &&callback) |
| Apply the given callback to all nodes in the scene.
|
|
void | forEachNodeInScene (int32_t sceneID, std::function< ForEachNodeInSceneConstCallback > &&callback) const |
| Apply the given callback to all nodes in the scene.
|
|
void | forEachPrimitiveInScene (int32_t sceneID, std::function< ForEachPrimitiveInSceneCallback > &&callback) |
| Apply the given callback to all relevant primitives.
|
|
void | forEachPrimitiveInScene (int32_t sceneID, std::function< ForEachPrimitiveInSceneConstCallback > &&callback) const |
| Apply the given callback to all relevant primitives.
|
|
void | generateMissingNormalsSmooth () |
| Fills in smooth normals for any primitives with missing normals.
|
|
void | addExtensionUsed (const std::string &extensionName) |
| Adds an extension to the ModelSpec::extensionsUsed property, if it is not already present.
|
|
void | addExtensionRequired (const std::string &extensionName) |
| Adds an extension to the ModelSpec::extensionsRequired property, if it is not already present.
|
|
void | removeExtensionUsed (const std::string &extensionName) |
| Removes an extension from the ModelSpec::extensionsUsed property.
|
|
void | removeExtensionRequired (const std::string &extensionName) |
| Removes an extension from the ModelSpec::extensionsRequired property.
|
|
bool | isExtensionUsed (const std::string &extensionName) const noexcept |
| Determines whether a given extension name is listed in the model's ModelSpec::extensionsUsed property.
|
|
bool | isExtensionRequired (const std::string &extensionName) const noexcept |
| Determines whether a given extension name is listed in the model's ModelSpec::extensionsRequired property.
|
|
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.
|
|
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 JsonValue * | getGenericExtension (const std::string &extensionName) const noexcept |
| Gets a generic extension with the given name as a CesiumUtility::JsonValue .
|
|
JsonValue * | getGenericExtension (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.
|
|
|
template<typename T > |
static const T & | getSafe (const std::vector< T > &items, int32_t index) |
| Safely gets the element with a given index, returning a default instance if the index is outside the range.
|
|
template<typename T > |
static const T * | getSafe (const std::vector< T > *pItems, int32_t index) noexcept |
| Safely gets a pointer to the element with a given index, returning nullptr if the index is outside the range.
|
|
template<typename T > |
static T * | getSafe (std::vector< T > *pItems, int32_t index) noexcept |
| Safely gets a pointer to the element with a given index, returning nullptr if the index is outside the range.
|
|
This class is not meant to be instantiated directly. Use Model
instead.
Definition at line 14 of file Model.h.
Apply the given callback to all nodes in the scene.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all nodes in this scene.
If the given sceneId
is negative, then the nodes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all nodes in the default scene.
- Otherwise, it will be applied to all nodes in the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to the first node.
- Otherwise (if there are no scenes and no nodes), then this method will do nothing.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |
Apply the given callback to all nodes in the scene.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all nodes in this scene.
If the given sceneId
is negative, then the nodes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all nodes in the default scene.
- Otherwise, it will be applied to all nodes in the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to the first node.
- Otherwise (if there are no scenes and no nodes), then this method will do nothing.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |
Apply the given callback to all relevant primitives.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all meshes of this scene.
If the given sceneId
is negative, then the meshes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all meshes of the default scene.
- Otherwise, it will be applied to all meshes of the the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to all meshes that can be found by starting a traversal at the root node.
- Otherwise (if there are no scenes and no nodes), then all meshes will be traversed.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |
Apply the given callback to all relevant primitives.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all meshes of this scene.
If the given sceneId
is negative, then the meshes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all meshes of the default scene.
- Otherwise, it will be applied to all meshes of the the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to all meshes that can be found by starting a traversal at the root node.
- Otherwise (if there are no scenes and no nodes), then all meshes will be traversed.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |
Apply the given callback to the root nodes of the scene.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all root nodes of this scene.
If the given sceneId
is negative, then the nodes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all root nodes of the default scene.
- Otherwise, it will be applied to all root nodes of the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to the first node.
- Otherwise (if there are no scenes and no nodes), then this method will do nothing.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |
Apply the given callback to the root nodes of the scene.
If the given sceneID
is non-negative and exists in the given glTF, then the given callback will be applied to all root nodes of this scene.
If the given sceneId
is negative, then the nodes that the callback will be applied to depends on the structure of the glTF model:
- If the glTF model has a default scene, then it will be applied to all root nodes of the default scene.
- Otherwise, it will be applied to all root nodes of the first scene.
- Otherwise (if the glTF model does not contain any scenes), it will be applied to the first node.
- Otherwise (if there are no scenes and no nodes), then this method will do nothing.
- Parameters
-
sceneID | The scene ID (index) |
callback | The callback to apply |