Frapper
1.0a
|
Static class with helper functions working on OGRE objects. More...
#include <OgreTools.h>
Static Public Member Functions | |
static Ogre::MovableObject * | cloneMovableObject (Ogre::MovableObject *movableObject, const QString &name, Ogre::SceneManager *sceneManager=0) |
Clones an Ogre::MovableObject. | |
static void | deepCopySceneNode (Ogre::SceneNode *sceneNode, Ogre::SceneNode *&sceneNodeCopy, const QString &namePrefix, Ogre::SceneManager *sceneManager=0) |
Creates a deep copy of the given scene node. | |
static Ogre::SceneNode * | copySceneNode (Ogre::SceneNode *sceneNode, const QString &name, Ogre::SceneManager *sceneManager=0) |
Creates a copy of the given scene node. | |
static void | deepDeleteSceneNode (Ogre::SceneNode *sceneNode, Ogre::SceneManager *sceneManager=0, bool deleteRoot=false) |
Deletes a whole scene node tree (including attached objects). | |
static void | deleteUserAnyFromSceneNode (Ogre::SceneNode *sceneNode) |
Delete user any from the given scene node / movable object. | |
static void | deleteUserAnyFromMovableObject (Ogre::MovableObject *movableObject) |
static Ogre::Entity * | getFirstEntity (Ogre::SceneNode *sceneNode) |
Returns the first entity attached to the given scene node. | |
static Ogre::Camera * | getFirstCamera (Ogre::SceneNode *sceneNode) |
Returns the first camera attached to the given scene node. | |
static Ogre::Light * | getFirstLight (Ogre::SceneNode *sceneNode) |
Returns the first light attached to the given scene node. | |
static Ogre::MovableObject * | OgreTools::getFirstMovableObject (Ogre::SceneNode *sceneNode) |
As the name suggests, this method returns the first attached object of a scene node, if there is one. | |
static void | OgreTools::getAllLights (Ogre::SceneNode *sceneNode, QList< Ogre::Light * > &lightsList) |
Returns the all lights attached to the given scene node. | |
static void | OgreTools::getAllCameras (Ogre::SceneNode *sceneNode, QList< Ogre::Camera * > &camerasList) |
Returns the all cameras attached to the given scene node. | |
static void | OgreTools::getAllEntities (Ogre::SceneNode *sceneNode, QList< Ogre::Entity * > &entityList) |
Returns the all entity attached to the given scene node. | |
static void | getSceneNodesByName (Ogre::SceneNode *root, QString name, QList< Ogre::SceneNode * > &sceneNodes) |
Returns all child scene nodes of a given scene node whose name contains the given string. | |
static OgreContainer * | getOgreContainer (Ogre::SceneNode *sceneNode) |
Returns a pointer to the OgreContainer of a given scene node. | |
static void | destroyResourceGroup (const QString &name) |
Destroy the node's Ogre resource group. | |
static void | createResourceGroup (const QString &name, const QString &path) |
Create the node's Ogre resource group. | |
static void | OgreTextureToQImage (const Ogre::TexturePtr src, QImage &dst, QImage::Format format=QImage::Format_ARGB32) |
Copy Ogre Texture to QImage. | |
static void | QImageToOgreTexture (const QImage &src, const Ogre::TexturePtr dst, Ogre::PixelFormat format=Ogre::PF_A8R8G8B8) |
Copy QImage to Ogre Texture. | |
Static Private Member Functions | |
template<typename T > | |
static T | findFirstObject (Ogre::SceneNode *sceneNode) |
Returns the first movable object of the given type name contained in the given scene node. | |
template<typename T > | |
static void | findAllObjects (Ogre::SceneNode *sceneNode, QList< T > &objectsList) |
Returns all movable objects of the given type contained in the given scene node and its ancestors. | |
template<typename T > | |
static void | deleteUserAnyFrom (T t) |
Delete user any from given object / scene node. | |
Static class with helper functions working on OGRE objects.
|
static |
Clones an Ogre::MovableObject.
Public Static Functions.
Is needed because OGRE does not provide clone functions for cameras and lights.
movableObject | The object to clone. |
name | The name to use for the object. |
sceneManager | The scene manager to use for creating the object. |
Clones an Ogre::MovableObject.
Is needed because OGRE does not provide clone functions for cameras and lights.
movableObject | The object to clone. |
name | The name to use for the object. |
sceneManager | The scene manager to use for creating the object. |
|
static |
Creates a deep copy of the given scene node.
sceneNode | The scene node to copy. |
sceneNodeCopy | The scene node to add the copied objects to (will be created if 0). |
namePrefix | The prefix to use for names of copied objects. |
sceneManager | The scene manager to use for creating the object. |
|
static |
Creates a copy of the given scene node.
sceneNode | The scene node to copy. |
name | The name to use for the copied scene node. |
sceneManager | The scene manager to use for creating the scene node. |
|
static |
Deletes a whole scene node tree (including attached objects).
sceneNode | The scene node containing the tree to delete. |
sceneManager | The scene manager to use for destroying the scene node. |
deleteRoot | Flag to control whether to delete the given scene node. |
|
static |
Delete user any from the given scene node / movable object.
sceneNode | The scene node containing the tree to delete. |
sceneManager | The scene manager to use for destroying the scene node. |
deleteRoot | Flag to control whether to delete the given scene node. |
|
static |
|
static |
Returns the first entity attached to the given scene node.
sceneNode | The scene node to return the entity from. |
|
static |
Returns the first camera attached to the given scene node.
sceneNode | The scene node to return the camera from. |
|
static |
Returns the first light attached to the given scene node.
sceneNode | The scene node to return the light from. |
|
static |
As the name suggests, this method returns the first attached object of a scene node, if there is one.
sceneNode | The scene node to get the attached object from |
|
static |
Returns the all lights attached to the given scene node.
sceneNode | The scene node to return the light from. |
lightsList | The list where the lights are stored in. |
|
static |
Returns the all cameras attached to the given scene node.
sceneNode | The scene node to return the cameras from. |
camerasList | The list where the cameras are stored in. |
|
static |
Returns the all entity attached to the given scene node.
sceneNode | The scene node to return the entity from. |
entityList | The list where the entity are stored in. |
|
static |
Returns all child scene nodes of a given scene node whose name contains the given string.
sceneNode | The scene node to start the search at. |
|
static |
Returns a pointer to the OgreContainer of a given scene node.
sceneNode | The scene node to get the OgreContainer for |
|
static |
Destroy the node's Ogre resource group.
|
static |
Create the node's Ogre resource group.
|
static |
Copy Ogre Texture to QImage.
|
static |
Copy QImage to Ogre Texture.
|
staticprivate |
Returns the first movable object of the given type name contained in the given scene node.
Private Static Functions.
sceneNode | The scene node to find the first object in. |
typeName | The name of the type of objects to look for. |
Returns the first movable object of the given type name contained in the given scene node.
sceneNode | The scene node to find the first object in. |
typeName | The name of the type of objects to look for. |
|
staticprivate |
Returns all movable objects of the given type contained in the given scene node and its ancestors.
sceneNode | The scene node to find all objects in. |
typeName | The name of the type of objects to look for. |
sceneNode | The scene node to find all objects in. |
|
staticprivate |
Delete user any from given object / scene node.
T The type to delete the user any from
t | The object to delete the user any from |