glTF custom extension manager
More...
#include <OxygenEngine/scene/loader/gltf_extensions.h>
|
template<typename T , typename... Args> |
void | addExtension (const std::string &name, Args &&... args) |
| Add a new extension.
|
|
void | applyOnAsset (const std::string &name, Node &root_node, const nlohmann::json &extension_data, const bool pre_load) |
| Apply a specific extension on an asset with the provided data.
|
|
void | applyOnNode (const std::string &name, Node &node, const nlohmann::json &extension_data) |
| Apply a specific extension on a node with the provided data.
|
|
void | applyOnMaterial (const std::string &name, Material &material, const nlohmann::json &extension_data) |
| Apply a specific extension on a material with the provided data.
|
|
template<typename ... ExtensionTypes>
class oe::scene::gltf::ExtensionManager< ExtensionTypes >
glTF custom extension manager
This class dispatches calls to the approriate Extension
- See also
- scene::loader::GltfWithExtensions for an example of usage
◆ addExtension()
template<typename ... ExtensionTypes>
template<typename T , typename... Args>
Add a new extension.
Bind an extension of type T
to name
- Parameters
-
name | Extension name |
args | Additional arguments (if any) to send to the extension constructor |
◆ applyOnAsset()
template<typename ... ExtensionTypes>
Apply a specific extension on an asset with the provided data.
- Parameters
-
name | Name of the extension that were previously registered using addExtension() |
root_node | Target node to apply the extension |
extension_data | JSON containing the extension properties |
pre_load | Does the call happen before the asset has been fully loaded |
◆ applyOnMaterial()
template<typename ... ExtensionTypes>
Apply a specific extension on a material with the provided data.
- Parameters
-
name | Name of the extension that were previously registered using addExtension() |
material | Target material to apply the extension |
extension_data | JSON containing the extension properties |
◆ applyOnNode()
template<typename ... ExtensionTypes>
Apply a specific extension on a node with the provided data.
- Parameters
-
name | Name of the extension that were previously registered using addExtension() |
node | Target node to apply the extension |
extension_data | JSON containing the extension properties |
The documentation for this class was generated from the following file:
- OxygenEngine/scene/loader/gltf_extensions.h