@Override public Vector2f getAxis(int controllerIndex, VRInputType forAxis) { Vector2f result = getAxisRaw(controllerIndex, forAxis); return result == null ? null : result.multLocal(axisMultiplier); }
/** * Multiply and store a Vector2f in-buffer. * * @param toMult * the vector to multiply against * @param buf * the buffer to find the Vector2f within * @param index * the position (in terms of vectors, not floats) of the vector * to multiply */ public static void multInBuffer(Vector2f toMult, FloatBuffer buf, int index) { TempVars vars = TempVars.get(); Vector2f tempVec2 = vars.vect2d; populateFromBuffer(tempVec2, buf, index); tempVec2.multLocal(toMult); setInBuffer(tempVec2, buf, index); vars.release(); }
/** * Get the GUI canvas size. This method return the size in pixels of the GUI available area within the VR view. * @return the GUI canvas size. This method return the size in pixels of the GUI available area within the VR view. */ public Vector2f getCanvasSize() { if (environment != null){ if (environment.getApplication() != null){ if( screenSize == null ) { if( environment.isInVR() && environment.getVRHardware() != null ) { screenSize = new Vector2f(); environment.getVRHardware().getRenderSize(screenSize); screenSize.multLocal(environment.getVRViewManager().getResolutionMuliplier()); } else { AppSettings as = environment.getApplication().getContext().getSettings(); screenSize = new Vector2f(as.getWidth(), as.getHeight()); } } return screenSize; } else { throw new IllegalStateException("VR GUI manager underlying environment is not attached to any application."); } } else { throw new IllegalStateException("VR GUI manager is not attached to any environment."); } }
if (iters != -1){ do { pixelSize.multLocal(2); blocks.set(blockSize.x / pixelSize.x, blockSize.y / pixelSize.y);
/** * Multiply and store a Vector2f in-buffer. * * @param toMult * the vector to multiply against * @param buf * the buffer to find the Vector2f within * @param index * the position (in terms of vectors, not floats) of the vector * to multiply */ public static void multInBuffer(Vector2f toMult, FloatBuffer buf, int index) { TempVars vars = TempVars.get(); Vector2f tempVec2 = vars.vect2d; populateFromBuffer(tempVec2, buf, index); tempVec2.multLocal(toMult); setInBuffer(tempVec2, buf, index); vars.release(); }
/** * Multiply and store a Vector2f in-buffer. * * @param toMult * the vector to multiply against * @param buf * the buffer to find the Vector2f within * @param index * the position (in terms of vectors, not floats) of the vector * to multiply */ public static void multInBuffer(Vector2f toMult, FloatBuffer buf, int index) { TempVars vars = TempVars.get(); Vector2f tempVec2 = vars.vect2d; populateFromBuffer(tempVec2, buf, index); tempVec2.multLocal(toMult); setInBuffer(tempVec2, buf, index); vars.release(); }
if (iters != -1){ do { pixelSize.multLocal(2); blocks.set(blockSize.x / pixelSize.x, blockSize.y / pixelSize.y);
if (iters != -1){ do { pixelSize.multLocal(2); blocks.set(blockSize.x / pixelSize.x, blockSize.y / pixelSize.y);