root/OpenSceneGraph/trunk/src/osgPlugins/txp/TXPPagedLOD.h
@
13041
| Revision 13041, 2.2 kB (checked in by robert, 14 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | // -*-c++-*- |
| 2 | /*************************************************************************** |
| 3 | * December 2003 |
| 4 | * |
| 5 | * This TerraPage loader was re-written in a fashion to use PagedLOD |
| 6 | * to manage paging entirely, also includes a version of Terrex's smart mesh |
| 7 | * adapted to work with PagedLOD. The essential code by Boris Bralo is still present, |
| 8 | * slight modified. |
| 9 | * nick at terrex dot com |
| 10 | * |
| 11 | * Ported to PagedLOD technology by Trajce Nikolov (Nick) & Robert Osfield |
| 12 | *****************************************************************************/ |
| 13 | |
| 14 | /*************************************************************************** |
| 15 | * OpenSceneGraph loader for Terrapage format database |
| 16 | * by Boris Bralo 2002 |
| 17 | * |
| 18 | * based on/modifed sgl (Scene Graph Library) loader by Bryan Walsh |
| 19 | * |
| 20 | * This loader is based on/modified from Terrain Experts Performer Loader, |
| 21 | * and was ported to SGL by Bryan Walsh / bryanw at earthlink dot net |
| 22 | * |
| 23 | * That loader is redistributed under the terms listed on Terrain Experts |
| 24 | * website (www.terrex.com/www/pages/technology/technologypage.htm) |
| 25 | * |
| 26 | * "TerraPage is provided as an Open Source format for use by anyone... |
| 27 | * We supply the TerraPage C++ source code free of charge. Anyone |
| 28 | * can use it and redistribute it as needed (including our competitors). |
| 29 | * We do, however, ask that you keep the TERREX copyrights intact." |
| 30 | * |
| 31 | * Copyright Terrain Experts Inc. 1999. |
| 32 | * All Rights Reserved. |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | #ifndef __TXPPAGEDLOD_H_ |
| 36 | #define __TXPPAGEDLOD_H_ |
| 37 | |
| 38 | #include <osg/PagedLOD> |
| 39 | #include "TileMapper.h" |
| 40 | |
| 41 | namespace txp |
| 42 | { |
| 43 | class TXPPagedLOD : public osg::PagedLOD |
| 44 | { |
| 45 | public: |
| 46 | TXPPagedLOD(); |
| 47 | |
| 48 | /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ |
| 49 | TXPPagedLOD(const TXPPagedLOD&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); |
| 50 | |
| 51 | META_Node(txp, TXPPagedLOD); |
| 52 | |
| 53 | virtual void traverse(osg::NodeVisitor& nv); |
| 54 | |
| 55 | inline void setTileId(int x, int y, int lod) |
| 56 | { |
| 57 | _tileIdentifier.set(x,y,lod); |
| 58 | } |
| 59 | |
| 60 | TileIdentifier _tileIdentifier; |
| 61 | |
| 62 | virtual osg::BoundingSphere computeBound() const; |
| 63 | |
| 64 | protected: |
| 65 | virtual ~TXPPagedLOD(); |
| 66 | |
| 67 | }; |
| 68 | |
| 69 | } // namespace |
| 70 | |
| 71 | #endif // __TXPPAGEDLOD_H_ |
Note: See TracBrowser
for help on using the browser.
