Lines Matching refs:viewportWidth
54 public float viewportWidth = 0;
191 * @param viewportWidth the width of the viewport in pixels
193 public Vector3 unproject (Vector3 screenCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight) {
198 screenCoords.x = (2 * x) / viewportWidth - 1;
233 * @param viewportWidth the width of the viewport in pixels
235 public Vector3 project (Vector3 worldCoords, float viewportX, float viewportY, float viewportWidth, float viewportHeight) {
237 worldCoords.x = viewportWidth * (worldCoords.x + 1) / 2 + viewportX;
248 * @param viewportWidth the width of the viewport in pixels
251 public Ray getPickRay (float screenX, float screenY, float viewportX, float viewportY, float viewportWidth,
253 unproject(ray.origin.set(screenX, screenY, 0), viewportX, viewportY, viewportWidth, viewportHeight);
254 unproject(ray.direction.set(screenX, screenY, 1), viewportX, viewportY, viewportWidth, viewportHeight);