#include <OgreSceneFormatImporter.h>
◆ Version
Enumerator |
---|
VERSION_0 | |
VERSION_1 | |
LATEST_VERSION | |
◆ SceneFormatImporter()
Ogre::SceneFormatImporter::SceneFormatImporter |
( |
Root * |
root, |
|
|
SceneManager * |
sceneManager, |
|
|
const String & |
defaultPccWorkspaceName |
|
) |
| |
- Parameters
-
root | |
sceneManager | |
defaultPccWorkspaceName | When importing PCC, the original workspace definition may not be available. In such case, this allows you to use a fallback instead. If left blank, we won't import PCC if the original workspace def couldn't be found. |
◆ ~SceneFormatImporter()
Ogre::SceneFormatImporter::~SceneFormatImporter |
( |
| ) |
|
◆ getInstantRadiosity()
Retrieve the InstantRadiosity pointer that may have been created while importing a scene.
- Parameters
-
releaseOwnership | If true, we will return the InstantRadiosity & IrradianceVolume pointers and release ownership. Meaning further calls to this function will return null and you will be responsible for deleting it (otherwise it will leak). |
If false, we will return the InstantRadiosity & IrradianceVolume pointers but retain ownership. Meaning further calls to this function will still return the pointer, and we will delete the pointer when 'this' is destroyed, or if a new scene is imported.
- Parameters
-
outInstantRadiosity | [out] InstantRadiosity pointer. Input cannot be null. Output *outInstantRadiosity may be null May be null if the imported scene didn't have IR enabled, or if the ownership has already been released. |
outIrradianceVolume | [out] IrradianceVolume pointer. Input cannot be null. Output *outIrradianceVolume may be null. May be null if the imported scene didn't have IR/IV enabled, or if the ownership has already been released. |
- Returns
- InstantRadiosity pointer.
◆ getParallaxCorrectedCubemap()
◆ getPbs()
HlmsPbs* Ogre::SceneFormatBase::getPbs |
( |
void |
| ) |
const |
|
inherited |
◆ importScene()
- Parameters
-
outJson | |
exportFlags | Combination of SceneFlags::SceneFlags, to know what to export and what to exclude. Defaults to importing everything. Note that some combinations can cause issues: Excluding scene nodes Excluding meshes without excluding Items and Entities. etc |
By default LightsVpl is not set so that InstantRadiosity is regenerated. By setting LightsVpl and unsetting SceneFlags::BuildInstantRadiosity, you can speed up import time because the cached results will be loaded instead.
◆ importSceneFromFile()
◆ setListener()
Caller must delete the pointer. We won't do it for you.
◆ setParentlessRootNodes()
void Ogre::SceneFormatImporter::setParentlessRootNodes |
( |
SceneNode * |
dynamicRoot, |
|
|
SceneNode * |
staticRoot |
|
) |
| |
Similar to setRootNodes.
During export, it's possible some nodes were not attached to anything; thus they were exported like that. They're parentless. By default, importing the scene with such nodes means these nodes will b created without a parent, like in the original.
This behavior may not always be desired, which is why you can control it via this function, and have these nodes be attached to a parent node of your choosing instead.
- Parameters
-
dynamicRoot | SceneNode to use as parent for SCENE_DYNAMIC parentless nodes. Leave nullptr for none. |
staticRoot | SceneNode to use as parent for SCENE_STATIC parentless nodes. Leave nullptr for none. |
◆ setRootNodes()
void Ogre::SceneFormatImporter::setRootNodes |
( |
SceneNode * |
dynamicRoot, |
|
|
SceneNode * |
staticRoot |
|
) |
| |
Set the nodes that act as the root nodes for the scene to import.
By default these are nullptrs, which means we'll be using the real root scenenodes from SceneManager (see SceneManager::getRootSceneNode)
This function allows you to define your own root nodes; which gives you the power to easily transform the whole scene (e.g. globally displace the scene, rotate it, scale it, etc)
- See also
- setParentlessRootNodes
- Parameters
-
dynamicRoot | SceneNode to use as Root for SCENE_DYNAMIC nodes. Leave nullptr for the default one. |
staticRoot | SceneNode to use as Root for SCENE_STATIC nodes. Leave nullptr for the default one. |
◆ setSceneComponentTransform()
void Ogre::SceneFormatImporter::setSceneComponentTransform |
( |
const Matrix4 & |
transform | ) |
|
Set a 4x4 matrix to apply a transformation to all the PCC probes during import process.
Also affects Areas of Interest for Instant Radiosity. This is useful if you need to rotate or translate a scene.
- Parameters
-
transform | Must be affine. Default is identity matrix. |
The documentation for this class was generated from the following file: