坐标
Vs = V * modelViewMatrix * projectionMatrix * windowMatrix
- V * modelViewMatrix * projectionMatrix为左手系,各分量在-1到1
unproject
- V0 = (Xs, Ys, 0) * invMVPW
- V1 = (Xs, Ys, 1) * invMVPW
相机
- osg::Camera 是group节点
-
功能
- 管理坐标
-
setViewMatrix
-
setViewMatrixAsLookAt
-
setProjectionMatrix
-
setProjectionMatrixAsFrustum
-
setProjectionMatrixAsOrtho
-
setProjectionMatrixAsOrtho2D
-
setProjectionMatrixAsPerspective
-
setViewport 参数为osg::Viewport
-
get*()
osg::Matrix viewMatrix = camera->getViewMatrix(); osg::Vec3 eye, center, up camera->getViewMatrixAsLookAt( eye, center, up );
-
- 封装opengl函数
- setClearMask 参数为GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT
- se
- 管理坐标
-
来源:CSDN
作者:qq_33638017
链接:https://blog.csdn.net/qq_33638017/article/details/103629309