Changeset 13041 for OpenSceneGraph/trunk/include/osgVolume/VolumeTile
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgVolume/VolumeTile (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgVolume/VolumeTile
r12292 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield 2 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 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 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 30 30 { 31 31 public: 32 32 33 33 TileID(); 34 34 35 35 TileID(int in_level, int in_x, int in_y, int in_z); 36 37 bool operator == (const TileID& rhs) const 36 37 bool operator == (const TileID& rhs) const 38 38 { 39 39 return (level==rhs.level) && (x==rhs.x) && (y==rhs.y) && (z==rhs.z); 40 40 } 41 41 42 bool operator != (const TileID& rhs) const 42 bool operator != (const TileID& rhs) const 43 43 { 44 44 return (level!=rhs.level) || (x!=rhs.x) || (y!=rhs.y) || (z!=rhs.z); … … 55 55 return z<rhs.z; 56 56 } 57 57 58 58 bool valid() const { return level>=0; } 59 59 … … 72 72 73 73 VolumeTile(); 74 74 75 75 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ 76 76 VolumeTile(const VolumeTile&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); … … 93 93 const Volume* getVolume() const { return _volume; } 94 94 95 95 96 96 /** Set the TileID (layer, x,y,z) of the VolumeTile. 97 * The TileID is used so it can be located by its neighbours 97 * The TileID is used so it can be located by its neighbours 98 98 * via the enclosing Volume node that manages a map of TileID to VolumeTiles.*/ 99 99 void setTileID(const TileID& tileID); 100 100 101 101 /** Get the TileID (layer, x,y,z) of the VolumeTile.*/ 102 102 const TileID& getTileID() const { return _tileID; } 103 104 103 104 105 105 void setLocator(Locator* locator) { _locator = locator; } 106 106 Locator* getLocator() { return _locator.get(); } … … 119 119 /** Get the VolumeTechnique that will be used to render this tile. */ 120 120 VolumeTechnique* getVolumeTechnique() { return _volumeTechnique.get(); } 121 121 122 122 /** Get the const VolumeTechnique that will be used to render this tile. */ 123 123 const VolumeTechnique* getVolumeTechnique() const { return _volumeTechnique.get(); } … … 140 140 141 141 Volume* _volume; 142 142 143 143 bool _dirty; 144 144 bool _hasBeenTraversal; 145 145 146 146 TileID _tileID; 147 147 148 148 osg::ref_ptr<VolumeTechnique> _volumeTechnique; 149 149 150 osg::ref_ptr<Locator> _locator; 150 osg::ref_ptr<Locator> _locator; 151 151 152 152 osg::ref_ptr<Layer> _layer;
