zoukankan      html  css  js  c++  java
  • osgearth设置视点

    From

    韶华百世

    的新浪博客

    注意,在earthManip->setViewpoint()之前,要先v->setCameraManipulator(earthManip);

    在使用osgEarth中的EarthManipulator,通过setViewpoint设置视点:
    1.osg::ref_ptr<osgEarth::Util::EarthManipulator> manip = new osgEarth::Util::EarthManipulator;
    2.manip->setViewpoint( osgEarth::Util::Viewpoint( 108.0f, 34.0f, 10000.0f, 0.0f, -45.0f, 1e7 ) );

    osg::ref_ptr<osgEarth::Util::EarthManipulator> earthManip = new osgEarth::Util::EarthManipulator;

                v->setCameraManipulator(earthManip);//必须在setViewpoint之前

    osgEarth::Viewpoint vp( "", 107.85, 32.35, 0.0, -2.50, -90.0, 1.5e7 );

    earthManip->setViewpoint( vp, 0 );

     

    * Constructs a new viewpoint.
    *
    * @param name
    * Name of this viewpoint.
    *
    * @param focal_point 焦点
    * The location at which the camera points. Express this is either
    * cartesian coordinates (for a "flat-earth" model) or in lat/long
    * degrees for a round-earth model.
    *
    * @param heading_deg  水平方位角
    * Heading (in clockwise degrees) of the camera relative to the
    * tangent plane of the focal point.
    *
    * @param pitch_deg 垂直俯仰角
    * Pitch (in degrees) of the camera relative to the tangent plane
    * of the focal point.
    *
    * @param range 焦距
    * Straight-line distance from the camera to the focal point.
    *
    * @param srs (optional)
    * Spatial reference defining the focal point.

  • 相关阅读:
    eclipse中常用快捷键
    js sort排序
    js parseInt函数
    Jquery常用方法
    jquery的call()和apply()方法
    Jquery中的事件命名机制
    CSS层叠样式表
    推荐博客园中好的博客主
    页面刷新或者子窗体刷新父窗体,不提示 "重试或取消”对话框
    FullCalendar日历插件使用说明
  • 原文地址:https://www.cnblogs.com/coolbear/p/3029073.html
Copyright © 2011-2022 走看看