18 #ifndef __TILEMAPPER_H_
19 #define __TILEMAPPER_H_
24 #include <osg/CullStack>
25 #include <osg/NodeVisitor>
55 if (
this==&rhs)
return *
this;
62 void set(
int ax,
int ay,
int alod)
90 class TileMapper :
public osg::NodeVisitor,
public osg::CullStack
98 osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN) {}
108 virtual void apply(osg::Node& node);
109 virtual void apply(osg::Group& node);
110 virtual void apply(osg::Geode& node);
111 virtual void apply(osg::PagedLOD& node);
119 typedef std::map< TileIdentifier, int>
TileMap;
void insertTile(const TileIdentifier &tid)
TileIdentifier(const TileIdentifier &rhs)
Definition: TileMapper.h:46
TileMap _tileMap
Definition: TileMapper.h:120
std::map< TileIdentifier, int > TileMap
Definition: TileMapper.h:119
int lod
Definition: TileMapper.h:86
int y
Definition: TileMapper.h:86
virtual float getDistanceToViewPoint(const osg::Vec3 &pos, bool withLODScale) const
virtual void setCullVisitorForDistance(osg::NodeVisitor *nv)
Definition: TileMapper.h:101
Definition: TileMapper.h:90
osg::ref_ptr< osg::NodeVisitor > _nodeVisitor
Definition: TileMapper.h:122
TileMapper()
Definition: TileMapper.h:97
TileIdentifier()
Definition: TileMapper.h:34
TileIdentifier & operator=(const TileIdentifier &rhs)
Definition: TileMapper.h:53
bool operator<(const TileIdentifier &rhs) const
Definition: TileMapper.h:69
osg::Matrix::value_type value_type
Definition: TileMapper.h:94
Definition: TileMapper.h:32
int x
Definition: TileMapper.h:86
virtual void apply(osg::Node &node)
void set(int ax, int ay, int alod)
Definition: TileMapper.h:62
bool _containsGeode
Definition: TileMapper.h:121
bool isTileNeighbourALowerLODLevel(const TileIdentifier &tid, int dx, int dy) const
TileIdentifier(int ax, int ay, int alod)
Definition: TileMapper.h:40