Base class to handle glTF extensions.
More...
#include <OxygenEngine/scene/loader/gltf_extensions.h>
Base class to handle glTF extensions.
To use, you should first inherit from it then use an ExtensionManager to bind your extension class to its name
- See also
- scene::loader::GltfWithExtensions for an example of usage
◆ applyOnAssetPostload()
void oe::scene::gltf::Extension::applyOnAssetPostload |
( |
scene::Node & |
root_node, |
|
|
const nlohmann::json & |
extension_data |
|
) |
| |
|
inline |
Apply the extension on the asset (postload)
- Note
- When the function is called, all scene hierarchy is imported and ready
- See also
- applyOnAssetPreload() If you need to run the extension before scene load
- Parameters
-
root_node | Root node that will contain the glTF asset |
extension_data | json object containing extension data |
- Note
- You can apply/modify components on the scene by using root_node.getSceneManager()
◆ applyOnAssetPreload()
void oe::scene::gltf::Extension::applyOnAssetPreload |
( |
scene::Node & |
root_node, |
|
|
const nlohmann::json & |
extension_data |
|
) |
| |
|
inline |
Apply the extension on the asset (preload)
- Note
- When the function is called, only the root node is imported. The rest of the asset has not been imported yet
- See also
- applyOnAssetPostload() If you need to run the extension after scene is loaded and ready
- Parameters
-
root_node | Root node that will contain the glTF asset |
extension_data | json object containing extension data |
- Note
- You can apply/modify components on the scene by using root_node.getSceneManager()
◆ applyOnMaterial()
void oe::scene::gltf::Extension::applyOnMaterial |
( |
scene::Material & |
material, |
|
|
const nlohmann::json & |
extension_data |
|
) |
| |
|
inline |
Apply the extension on a material.
- Note
- When the function is called, the material is fully imported but not yet applied to a mesh
- Parameters
-
material | Reference to material to apply the extension |
extension_data | json object containing extension data |
◆ applyOnNode()
void oe::scene::gltf::Extension::applyOnNode |
( |
scene::Node & |
node, |
|
|
const nlohmann::json & |
extension_data |
|
) |
| |
|
inline |
Apply the extension on a node.
- Note
- When the function is called, all scene hierarchy has been imported
- Parameters
-
node | Reference to node to apply the extension |
extension_data | json object containing extension data |
The documentation for this class was generated from the following file:
- OxygenEngine/scene/loader/gltf_extensions.h