• 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.

  • 相关阅读:
    Jmeter(七)Jmeter脚本优化(数据与脚本分离)
    Jmeter(六)Jmeter脚本包含要素及书写习惯
    Redis的持久化之AOF方式
    Redis的持久化之RDB方式
    Redis持久化介绍
    Redis Keys的通用操作
    Redis的数据结构之sorted-set
    Redis的数据结构之哈希
    Redis的数据结构之字符串
    Jedis 连接池实例
  • 原文地址:https://www.cnblogs.com/coolbear/p/3029073.html
Copyright © 2020-2023  润新知