/** * Returns the data from the last time the control has been polled. * If this axis is a button, the value returned will be either 0.0f or 1.0f. * If this axis is normalised, the value returned will be between -1.0f and * 1.0f. * @return The data from the last time the control has been polled. */ public final float getPollData() { if (!has_polled && !isRelative()) { has_polled = true; try { setPollData(poll()); } catch (IOException e) { ControllerEnvironment.log("Failed to poll component: " + e); } } return value; }
for (int i = 0; i < components.length; i++) { AbstractComponent component = (AbstractComponent)components[i]; if (component.isRelative()) { component.setPollData(0); } else { component.resetHasPolled(); AbstractComponent component = (AbstractComponent)event.getComponent(); float value = event.getValue(); if (component.isRelative()) { if (value == 0) continue; component.setPollData(component.getPollData() + value); } else { if (value == component.getEventValue()) continue; component.setEventValue(value);
for (int i = 0; i < components.length; i++) { AbstractComponent component = (AbstractComponent)components[i]; if (component.isRelative()) { component.setPollData(0); } else { component.resetHasPolled(); AbstractComponent component = (AbstractComponent)event.getComponent(); float value = event.getValue(); if (component.isRelative()) { if (value == 0) continue; component.setPollData(component.getPollData() + value); } else { if (value == component.getEventValue()) continue; component.setEventValue(value);
for (int i = 0; i < components.length; i++) { AbstractComponent component = (AbstractComponent)components[i]; if (component.isRelative()) { component.setPollData(0); } else { component.resetHasPolled(); AbstractComponent component = (AbstractComponent)event.getComponent(); float value = event.getValue(); if (component.isRelative()) { if (value == 0) continue; component.setPollData(component.getPollData() + value); } else { if (value == component.getEventValue()) continue; component.setEventValue(value);
/** * Returns the data from the last time the control has been polled. * If this axis is a button, the value returned will be either 0.0f or 1.0f. * If this axis is normalised, the value returned will be between -1.0f and * 1.0f. * @return The data from the last time the control has been polled. */ public final float getPollData() { if (!has_polled && !isRelative()) { has_polled = true; try { setPollData(poll()); } catch (IOException e) { ControllerEnvironment.log("Failed to poll component: " + e); } } return value; }
for (int i = 0; i < components.length; i++) { AbstractComponent component = (AbstractComponent)components[i]; if (component.isRelative()) { component.setPollData(0); } else { component.resetHasPolled(); AbstractComponent component = (AbstractComponent)event.getComponent(); float value = event.getValue(); if (component.isRelative()) { if (value == 0) continue; component.setPollData(component.getPollData() + value); } else { if (value == component.getEventValue()) continue; component.setEventValue(value);
/** * Returns the data from the last time the control has been polled. * If this axis is a button, the value returned will be either 0.0f or 1.0f. * If this axis is normalised, the value returned will be between -1.0f and * 1.0f. * @return The data from the last time the control has been polled. */ public final float getPollData() { if (!has_polled && !isRelative()) { has_polled = true; try { setPollData(poll()); } catch (IOException e) { ControllerEnvironment.log("Failed to poll component: " + e); } } return value; }
/** * Returns the data from the last time the control has been polled. * If this axis is a button, the value returned will be either 0.0f or 1.0f. * If this axis is normalised, the value returned will be between -1.0f and * 1.0f. * @return The data from the last time the control has been polled. */ public final float getPollData() { if (!has_polled && !isRelative()) { has_polled = true; try { setPollData(poll()); } catch (IOException e) { ControllerEnvironment.log("Failed to poll component: " + e); } } return value; }