OpenSceneGraph 3.6.5
InsertImpostorsVisitor
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 OSGSIM_INSERTIMPOSTORSVISITOR
15#define OSGSIM_INSERTIMPOSTORSVISITOR
16
17#include <osg/NodeVisitor>
18#include <osgSim/Impostor>
19
20namespace osgSim {
21
26{
27 public:
28
31
33
34 void setImpostorThresholdRatio(float ratio) { _impostorThresholdRatio = ratio; }
36
39
41 void reset();
42
43 virtual void apply(osg::Node& node);
44
45 virtual void apply(osg::Group& node);
46
47 virtual void apply(osg::LOD& node);
48
49 /* Insert the required impostors into the scene graph. */
51
52 protected:
53
54 typedef std::vector< osg::Group* > GroupList;
55 typedef std::vector< osg::LOD* > LODList;
56
59
62 unsigned int _numNestedImpostors;
63
64};
65
66}
67
68#endif
The osgSim library is a NodeKit that extends the core scene graph to support nodes and drawables that...
Definition BlinkSequence:27
General group node which maintains a list of children.
Definition Group:29
LOD - Level Of Detail group node which allows switching between children depending on distance from e...
Definition LOD:36
Base class for all internal nodes in the scene graph.
Definition Node:72
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
META_NodeVisitor(osgSim, InsertImpostorsVisitor) void setImpostorThresholdRatio(float ratio)
Definition InsertImpostorsVisitor:32
virtual void apply(osg::Group &node)
GroupList _groupList
Definition InsertImpostorsVisitor:57
InsertImpostorsVisitor()
Default to traversing all children.
unsigned int _numNestedImpostors
Definition InsertImpostorsVisitor:62
virtual void apply(osg::LOD &node)
float _impostorThresholdRatio
Definition InsertImpostorsVisitor:60
LODList _lodList
Definition InsertImpostorsVisitor:58
std::vector< osg::LOD * > LODList
Definition InsertImpostorsVisitor:55
std::vector< osg::Group * > GroupList
Definition InsertImpostorsVisitor:54
unsigned int _maximumNumNestedImpostors
Definition InsertImpostorsVisitor:61
void setMaximumNumberOfNestedImpostors(unsigned int num)
Definition InsertImpostorsVisitor:37
void reset()
Empty visitor, make it ready for next traversal.
unsigned int getMaximumNumberOfNestedImpostors() const
Definition InsertImpostorsVisitor:38
float getImpostorThresholdRatio() const
Definition InsertImpostorsVisitor:35
virtual void apply(osg::Node &node)
#define OSGSIM_EXPORT
Definition Export:38

osg logo
Generated at Wed Jul 23 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.