这三个参数怎么不能理解?
是这样的,corner 表示四边形的纹理坐标(0,0)处理的顶点坐标,widthVec表示纹理坐标从(0,0)到(1,0)处的顶点坐标的变化方向,heightVec表示纹理坐标从(0,0)到(0,1)处的顶点坐标的变化方向.
如:- createTexturedQuadGeometry(osg::Vec3(-1.0f,0.0f,-1.0f),osg::Vec3(2.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,2.0f));
复制代码 四边形的坐标与纹理坐标对应如下:
(0,0)(-1.0,0.0,-1.0)
(1,0)( 1.0,0.0,-1.0)
(1,1)( 1.0,0.0, 1.0)
(0,1)(-1.0,0.0, 1.0)
|