嗨,我发现了最近的计划和远的计划..然后如何识别使用这个我接触到的对象..谁能帮助我..这是我的代码..
-(Boolean) checkCollission:(CGPoint)winPos
{
winPos.y = (float)__viewport[3] - winPos.y;
Point3D nearPoint;
Point3D farPoint;
Point3D rayVector;
//Retreiving position projected on near plan
gluUnProject( winPos.x, winPos.y , 0, __modelview, __projection, __viewport, &nearPoint.x, &nearPoint.y, &nearPoint.z);
//Retreiving position projected on far plan
gluUnProject( winPos.x, winPos.y, 1, __modelview, __projection, __viewport, &farPoint.x, &farPoint.y, &farPoint.z);
}