| 90 | } |
| 91 | |
| 92 | void Picking::computeCameraRay(PxVec3& orig, PxVec3& dir, PxI32 x, PxI32 y) const |
| 93 | { |
| 94 | const PxVec3& camPos = mFrame.getCamera().getPos(); |
| 95 | |
| 96 | // compute picking ray |
| 97 | // const PxVec3 rayOrig = unProject(x, y, 0.0f); // PT: what the frell is that? |
| 98 | const PxVec3 rayOrig = camPos; |
| 99 | const PxVec3 rayDir = (unProject(x, y, 1.0f) - rayOrig).getNormalized(); |
| 100 | |
| 101 | orig = rayOrig; |
| 102 | dir = rayDir; |
| 103 | } |
| 104 | |
| 105 | bool Picking::pick(int x, int y) |
| 106 | { |
nothing calls this directly
no test coverage detected