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).
    与上面的参数相反,这个指定观察者到视景体的最远的裁剪面的距离(必须为正数)
  • 相关阅读:
    CSRF
    PHP XXE漏洞
    jumpserver安装与部署
    ELK
    docker pull下来的镜像放哪儿了?
    MobSF 框架安装使用部署
    加密流量分析
    Pόlya定理-学习笔记
    所有区间异或的和的 一个加强
    计算一个序列有多少个不同的01子序列
  • 原文地址:https://www.cnblogs.com/lyggqm/p/9441144.html
Copyright © 2011-2022 走看看