public FloatByReference(float value) { super(4); setValue(value); }
/** * Initialize the VR bounds. * @return <code>true</code> if the initialization is a success and <code>false</code> otherwise. */ public boolean init(OpenVR api) { logger.config("Initialize VR bounds..."); if( vrChaperone == null ) { vrChaperone = new VR_IVRChaperone_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRChaperone_Version, api.hmdErrorStore).getPointer()); if( vrChaperone != null ) { vrChaperone.setAutoSynch(false); vrChaperone.read(); FloatByReference fbX = new FloatByReference(); FloatByReference fbZ = new FloatByReference(); vrChaperone.GetPlayAreaSize.apply(fbX, fbZ); playSize = new Vector2f(fbX.getValue(), fbZ.getValue()); logger.config("Initialize VR bounds [SUCCESS]"); return true; // init success } logger.warning("Initialize VR bounds [FAILED]."); return false; // failed to init } logger.config("Initialize VR bounds already done."); return true; // already initialized }
public void setValue(float value) { getPointer().setFloat(0, value); }
float fSecondsUntilPhotons = (float)timePerFrame - tlastVsync.getValue() + vsyncToPhotons;
tlastVsync = new FloatByReference(); _tframeCount = new LongByReference();
public float getValue() { return getPointer().getFloat(0); }
public float get() { return getValue().getValue(); } public void set(float v) {
public FloatByReference(float value) { super(4); setValue(value); }
public float getValue() { return getPointer().getFloat(0); }
FloatByReference fref = new FloatByReference(5.0); // Equivalent to passing &float_value lib.callMyMethod(fref); float value = fref.getValue();
public float get() { return getValue().getValue(); } public void set(float v) {
public FloatByReference(float value) { super(4); setValue(value); }
public void setValue(float value) { getPointer().setFloat(0, value); }
public void set(float v) { getValue().setValue(v); } }
public float getValue() { return getPointer().getFloat(0); }
public void set(float v) { getValue().setValue(v); } }
public void setValue(float value) { getPointer().setFloat(0, value); }