• 大小: 2.47MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-27
  • 语言: 其他
  • 标签: osg、vpb  

资源简介

VPB好像不再更新了,官网上下到了完全版本,各位看着用吧

资源截图

代码片段和文件信息

/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This application is open source and may be redistributed and/or modified   
 * freely and without restriction both in commericial and non commericial applications
 * as long as this copyright notice is maintained.
 * 
 * This application is distributed in the hope that it will be useful
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#ifdef WIN32
    #pragma warning(disable : 4503)
#endif // WIN32

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 

#include 

#include 

#include 

class MyGraphicsContext {
    public:
        MyGraphicsContext()
        {
            osg::ref_ptr traits = new osg::GraphicsContext::Traits;
            traits->x = 0;
            traits->y = 0;
            traits->width = 1;
            traits->height = 1;
            traits->windowDecoration = false;
            traits->doubleBuffer = false;
            traits->sharedContext = 0;
            traits->pbuffer = true;

            _gc = osg::GraphicsContext::createGraphicsContext(traits.get());

            if (!_gc)
            {
                osg::notify(osg::NOTICE)<<“Failed to create pbuffer failing back to normal graphics window.“<                
                traits->pbuffer = false;
                _gc = osg::GraphicsContext::createGraphicsContext(traits.get());
            }

            if (_gc.valid()) 
            
            
            {
                _gc->realize();
                _gc->makeCurrent();
                std::cout<<“Realized window“<            }
        }
        
        bool valid() const { return _gc.valid() && _gc->isRealized(); }
        
    private:
        osg::ref_ptr _gc;
};

osg::Matrixd computeGeoTransForRange(double xMin double xMax double yMin double yMax)
{
    osg::Matrixd matrix;
    matrix(00) = xMax-xMin;
    matrix(30) = xMin;

    matrix(11) = yMax-yMin;
    matrix(31) = yMin;
    
    return matrix;
}


void ellipsodeTransformTest(double latitude double longitude double height)
{
    osg::ref_ptr transform = new osg::EllipsoidModel;
    
    double XYZ;
    double newLat newLong newHeight;
    
    transform->convertLatLongHeightToXYZ(latitudelongitudeheight
                                        X

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        144  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\applications\GNUmakefile

     文件        351  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\applications\osgdem\GNUmakefile

     文件        276  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\applications\osgdem\GNUmakefile.inst

     文件      30406  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\applications\osgdem\osgdem.cpp

     文件        308  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\GNUmakefile

     文件      51327  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\include\vpb\DataSet

     文件       2049  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\include\vpb\Export

     文件       1504  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\include\vpb\Version

     文件      29824  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\LICENSE.txt

     文件        294  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\cygwin_plugin_def

     文件        298  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\cygwin_wrapper_def

     文件        293  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\dependencies

     文件        117  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\distrules

     文件       2019  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\dolink.sh

     文件       6407  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\help.sh

     文件        205  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\helprules

     文件       2748  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\instexamplesrc

     文件       4715  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\instrules

     文件      24908  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makedefs

     文件        664  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makedirdefs

     文件        250  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makedirrules

     文件       2639  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makeinnosetup

     文件       3944  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makeirixdist

     文件       4096  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makepkg

     文件       4445  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makerpms

     文件       8117  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\makerules

     文件        353  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\openscenegraph.pc

     文件        121  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\tagrules

     文件        723  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\Make\versionrules

     文件        162  2011-02-05 14:25  VirtualPlanetBuilder-0.9.0\NEWS.txt

............此处省略1213个文件信息

评论

共有 条评论

相关资源