openscenegraph
ObserverNodePath
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSG_OBSERVERNODEPATH
15#define OSG_OBSERVERNODEPATH 1
16
17#include <osg/Node>
18#include <osg/observer_ptr>
19#include <vector>
20
21namespace osg {
22
23typedef std::vector< osg::ref_ptr<osg::Node> > RefNodePath;
24
28{
29 public:
31
33
35
37
38 ObserverNodePath& operator = (const ObserverNodePath& rhs);
39
42
43 void setNodePath(const osg::RefNodePath& nodePath);
44
45 void setNodePath(const osg::NodePath& nodePath);
46
48
50 bool getRefNodePath(RefNodePath& refNodePath) const;
51
56 bool getNodePath(NodePath& nodePath) const;
57
58 bool empty() const
59 {
61 return _nodePath.empty();
62 }
63
64 protected:
65
66 void _setNodePath(const osg::NodePath& nodePath);
68
69 typedef std::vector< osg::observer_ptr<osg::Node> > ObsNodePath;
72};
73
74}
75
76#endif
This class provides an object-oriented thread mutex interface.
Definition Mutex:31
Definition ScopedLock:25
Definition Node:72
Definition ObserverNodePath:28
ObsNodePath _nodePath
Definition ObserverNodePath:71
ObserverNodePath(const osg::NodePath &nodePath)
std::vector< osg::observer_ptr< osg::Node > > ObsNodePath
Definition ObserverNodePath:69
ObserverNodePath(const ObserverNodePath &rhs)
void setNodePath(const osg::NodePath &nodePath)
OpenThreads::Mutex _mutex
Definition ObserverNodePath:70
bool getNodePath(NodePath &nodePath) const
void _setNodePath(const osg::NodePath &nodePath)
bool empty() const
Definition ObserverNodePath:58
bool getRefNodePath(RefNodePath &refNodePath) const
void setNodePathTo(osg::Node *node)
void setNodePath(const osg::RefNodePath &nodePath)
author: Julien Valentin 2017 (mp3butcher@hotmail.com)
Definition AlphaFunc:19
std::vector< osg::ref_ptr< osg::Node > > RefNodePath
Definition ObserverNodePath:23
std::vector< Node * > NodePath
Definition Node:47
#define OSG_EXPORT
Definition osg/Export:39