renderer.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:hienoi 作者: christophercrouzet 项目源码 文件源码
def _get_projection_matrix(window_size, view_position, view_zoom,
                           view_aperture, initial_view_aperture_x):
    """Retrieve the projection matrix."""
    scale = 2.0 * view_zoom / initial_view_aperture_x
    return (ctypes.c_float * 16)(
        scale,
        0.0,
        0.0,
        0.0,

        0.0,
        scale * window_size.x / window_size.y,
        0.0,
        0.0,

        0.0,
        0.0,
        1.0,
        0.0,

        -2.0 * view_position.x / view_aperture.x,
        -2.0 * view_position.y / view_aperture.y,
        0.0,
        1.0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号