File: attach.hpp

package info (click to toggle)
openmw 0.49.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,992 kB
  • sloc: cpp: 372,479; xml: 2,149; sh: 1,403; python: 797; makefile: 26
file content (33 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef OPENMW_COMPONENTS_SCENEUTIL_ATTACH_H
#define OPENMW_COMPONENTS_SCENEUTIL_ATTACH_H

#include <string_view>

#include <osg/ref_ptr>

namespace osg
{
    class Node;
    class Group;
    class Quat;
}
namespace Resource
{
    class SceneManager;
}

namespace SceneUtil
{

    /// Clone and attach parts of the \a toAttach scenegraph to the \a master scenegraph, using the specified filter and
    /// attachment node. If the \a toAttach scene graph contains skinned objects, we will attach only those (filtered by
    /// the \a filter). Otherwise, just attach all of the toAttach scenegraph to the attachment node on the master
    /// scenegraph, with no filtering.
    /// @note The master scene graph is expected to include a skeleton.
    /// @return A newly created node that is directly attached to the master scene graph
    osg::ref_ptr<osg::Node> attach(osg::ref_ptr<const osg::Node> toAttach, osg::Node* master, std::string_view filter,
        osg::Group* attachNode, Resource::SceneManager* sceneManager, const osg::Quat* attitude = nullptr);

}

#endif