偏航角(heading /yaw )俯仰角(pitch)滚转角(roll)
osgearth中两种设置视点:
(1).earth文件中:
<viewpoints>
<viewpoint name="Annotation Samples"
lat="33" long="-118" range="500000"
heading="35.27" pitch="-90" />
</viewpoints>
(2)代码
class osgEarth::Util::EarthManipulator 成员函数:
/**
* Sets the camera position, optionally moving it there over time.
*/
virtual void setViewpoint( const Viewpoint& vp, double duration_s =0.0 );
参数:
Viewpoint(const char* name, double lon, double lat, double z, double heading, double pitch, double range);
参数说明:
位置( lon,lat, z):照相机视线方向与地面的交点 。,分别是经度,纬度以及高度值
heading:相机姿态(航向角),人站在地面上,正北为0,向东为正,向西为负
pitch:相机姿态(倾斜角),人站在地面上,平视0,向上昂为正,向下为负
range:相机到位置( lon,lat, z)的直线距离