OSG
3.4.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
osg_head
include
osgUtil
PrintVisitor.h
Go to the documentation of this file.
1
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 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 OSGUTIL_PRINTVISITOR
15
#define OSGUTIL_PRINTVISITOR 1
16
17
#include <osg/NodeVisitor>
18
#include <osgUtil/Export>
19
20
#include <ostream>
21
22
namespace
osgUtil
{
23
24
class
OSGUTIL_EXPORT
PrintVisitor
:
public
osg::NodeVisitor
25
{
26
public
:
27
28
PrintVisitor
(std::ostream& out,
int
indent=0,
int
step=2);
29
30
void
apply(
osg::Node
& node);
31
32
std::ostream&
output
()
33
{
34
for
(
unsigned
int
i=0;i<_indent; ++i) _out<<
" "
;
35
return
_out;
36
}
37
38
void
enter
() { _indent += _step; }
39
void
leave
() { _indent -= _step; }
40
41
protected
:
42
43
PrintVisitor
& operator = (
const
PrintVisitor
&) {
return
*
this
; }
44
45
std::ostream&
_out
;
46
unsigned
int
_indent
;
47
unsigned
int
_step
;
48
};
49
50
}
51
52
#endif
53
osgUtil::PrintVisitor::_step
unsigned int _step
Definition:
PrintVisitor.h:47
osgUtil::PrintVisitor::_indent
unsigned int _indent
Definition:
PrintVisitor.h:46
osgUtil::PrintVisitor
Definition:
PrintVisitor.h:24
osgUtil::PrintVisitor::enter
void enter()
Definition:
PrintVisitor.h:38
osgUtil::PrintVisitor::_out
std::ostream & _out
Definition:
PrintVisitor.h:45
osgUtil::PrintVisitor::output
std::ostream & output()
Definition:
PrintVisitor.h:32
osg::Node
Definition:
Node.h:71
OSGUTIL_EXPORT
#define OSGUTIL_EXPORT
Definition:
Export.h:40
osg::NodeVisitor
Definition:
NodeVisitor.h:67
osgUtil::PrintVisitor::leave
void leave()
Definition:
PrintVisitor.h:39
osgUtil
Shader generator framework.
Definition:
RenderInfo.h:20
Generated on Tue Oct 4 2016 19:20:48 for OSG by
1.8.8