zoukankan      html  css  js  c++  java
  • [osg][opengl]透视投影的参数Perspective

    gluPerspective这个函数指定了观察的视景体(frustum为锥台的意思,通常译为视景体)在世界坐标系中的具体大小,一般而言,其中的参数aspect应该与窗口的宽高比大小相同。比如说,aspect=2.0表示在观察者的角度中物体的宽度是高度的两倍,在视口中宽度也是高度的两倍,这样显示出的物体才不会被扭曲。

    gluPerspective
    NAME(函数名称)
    gluPerspective -- set up a perspective projection matrix (设置透视投影矩阵)
    C SPECIFICATION(C语言实现示例)
    void gluPerspective(
    GLdouble fovy, //角度
    GLdouble aspect,//视景体的宽高比
    GLdouble zNear,//沿z轴方向的两裁面之间的距离的近处
    GLdouble zFar //沿z轴方向的两裁面之间的距离的远处
    )
    PARAMETERS(参数含义)
    fovy
    Specifies the field of view angle, in degrees, in the y direction.
    指定视景体的视野的角度,以度数为单位,y轴的上下方向
    aspect
    Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
    指定你的视景体的宽高比(x 平面上)
    zNear
    Specifies the distance from the viewer to the near clipping plane (always positive).
    指定观察者到视景体的最近的裁剪面的距离(必须为正数)
    zFar
    Specifies the distance from the viewer to the far clipping plane (always positive).
    与上面的参数相反,这个指定观察者到视景体的最远的裁剪面的距离(必须为正数)
  • 相关阅读:
    SQL操作全集 sql精典收藏
    sql中全角字符与半角字符检验问题
    asp.net目录权限设置图文综合[转]
    XPath 语法
    XPath学习
    接口使用例子,阐述接口的优点、作用
    sql查询出表中所有列名 判断两个表中的列是否相同
    指定键让指定的按钮提交
    C#.Net网络程序开发Socket篇
    ASP.NET中异常处理使用
  • 原文地址:https://www.cnblogs.com/lyggqm/p/9441144.html
Copyright © 2011-2022 走看看