use of gaiasky.scenegraph.IFocus in project gaiasky by langurmonkey.
the class OpenVRListener method select.
/**
* Selects the object pointed by the given device.
*
* @param device
*/
private void select(VRDevice device) {
// Selection
StubModel sm = vrDeviceToModel.get(device);
if (sm != null) {
p0.set(sm.getBeamP0());
p1.set(sm.getBeamP1());
IFocus hit = getBestHit(p0, p1);
if (hit != null) {
EventManager.publish(Event.FOCUS_CHANGE_CMD, this, hit);
EventManager.publish(Event.CAMERA_MODE_CMD, this, CameraMode.FOCUS_MODE);
}
} else {
logger.info("Model corresponding to device not found");
}
}
Aggregations