2011-10-25 129 views

回答

1

执行gluProject()的逻辑,这只是几个矩阵相乘。

+0

作为一个方面说明,链接的文档没有提到在* v“= P x M xv *步骤之后完成的透视分割步骤* v”/ = v“(3)* –

+0

嘿,我尝试了gluproject结果是quiyte奇怪...这是我的矩阵和veritces – pritam001

+0

浮子[] MODELVIEW = target.getViewMatrix(); 浮子[]投影= target.getProjectionMatrix(); 浮子[] modelViewprojectionarray = target.getModelViewProjectionMatrix(); int [] view = {0,0,(int)screenWidth,(int)screenHeight}; float x = screenWidth/2,y = screenHeight/2,z = 0.01f; float [] pos = new float [4 ]; GLU.gluProject(x,y,z,modelView,0, projection,0,view,0, pos,0); float xmovedValue = convertPixelsToDp(pos [0],this); float ymovedValue = convertPixelsToDp(pos [1],this); – pritam001

相关问题