osgEarth 2.1.1
|
Public Member Functions | |
GeoCellVisitor () | |
virtual void | operator() (const GeoCell *cell, const GeoObjectCollection &objects)=0 |
void | apply (osg::LOD &node) |
Definition at line 132 of file SpatialData.
osgEarth::Util::GeoCellVisitor::GeoCellVisitor | ( | ) | [inline] |
Definition at line 135 of file SpatialData.
: osg::NodeVisitor( osg::NodeVisitor::TRAVERSE_ALL_CHILDREN ) { }
void osgEarth::Util::GeoCellVisitor::apply | ( | osg::LOD & | node | ) | [inline] |
Definition at line 139 of file SpatialData.
{ const GeoCell* cell = static_cast<const GeoCell*>(&node); if ( cell->_depth > 0 ) this->operator()( cell, cell->_objects ); traverse( node ); }
void seamless::GeoPatchUpdateCallback::operator() | ( | const GeoCell * | cell, |
const GeoObjectCollection & | objects | ||
) | [pure virtual] |
Definition at line 926 of file Geographic.cpp.
{ Vec3Array* verts = dynamic_cast<Vec3Array*>(_hfRequest->getResult()); Vec3Array* norms = _hfRequest->_normalResult.get(); if (verts && norms) { Vec3Array* patchVerts = static_cast<Vec3Array*>( patch->getData()->vertexData.array.get()); Vec3Array* patchNorms = static_cast<Vec3Array*>( patch->getData()->normalData.array.get()); copy(verts->begin(), verts->end(), patchVerts->begin()); patchVerts->dirty(); copy(norms->begin(), norms->end(), patchNorms->begin()); patchNorms->dirty(); } _hfRequest = 0; PatchGroup* faceRoot = findFaceRoot(patch, nv->getNodePath()); if (faceRoot) { TileUpdater tileUpdater(patch); faceRoot->accept(tileUpdater); } } if (_imageRequest.valid() && _imageRequest->isCompleted()) { Image* image = dynamic_cast<Image*>(_imageRequest->getResult()); if (image) { Texture2D* tex = new Texture2D(); tex->setImage(image); tex->setWrap(Texture::WRAP_S, Texture::CLAMP_TO_EDGE); tex->setWrap(Texture::WRAP_T, Texture::CLAMP_TO_EDGE); tex->setFilter(Texture::MIN_FILTER, Texture::LINEAR_MIPMAP_LINEAR); tex->setFilter(Texture::MAG_FILTER, Texture::LINEAR); StateSet* ss = patch->getOrCreateStateSet(); ss->setTextureAttributeAndModes(0, tex, StateAttribute::ON); } _imageRequest = 0; } if (!_hfRequest.valid() && !_imageRequest.valid()) node->setUpdateCallback(0); } }