QT 天空盒倒过来的问题

QMatrix &QMatrix::rotate(qreal degrees)

Rotates the coordinate system the given degrees counterclockwise.

Note that if you apply a QMatrix to a point defined in widget coordinates, the direction of the rotation will be clockwise because the y-axis points downwards.

Returns a reference to the matrix.

See also setMatrix().

这。。。看描述 你的y轴是倒过来的???WTF


解决办法

QMatrix4x4 matrix;
    matrix.setToIdentity();
    matrix.rotate(-1, 0, 1, 0);
    matrix.scale(10, 10, 10);
    view.setToIdentity();
    view.lookAt(QVector3D(0,0,1.0),QVector3D(0,0,0),QVector3D(0,-1,0));
天空盒创建看上一篇文章



猜你喜欢

转载自blog.csdn.net/qq_35158695/article/details/80551707
今日推荐