mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 09:31:20 -08:00
protocol rework Sets -> Map
This commit is contained in:
1 parent
f961318035
commit
9fc5d41e1b
30 files changed
+3886
-3729
No files matched your search
@@ -35,6 +35,9 @@ import io.eiren.util.collections.FastList;
|
||||
import io.eiren.yaml.YamlException;
|
||||
import io.eiren.yaml.YamlFile;
|
||||
import io.eiren.yaml.YamlNode;
|
||||
import slimevr_protocol.datatypes.DeviceId;
|
||||
import slimevr_protocol.datatypes.TrackerId;
|
||||
import slimevr_protocol.datatypes.TrackerIdT;
|
||||
|
||||
public class VRServer extends Thread {
|
||||
|
||||
@@ -313,6 +316,22 @@ public class VRServer extends Thread {
|
||||
return new FastList<>(trackers);
|
||||
}
|
||||
|
||||
public Tracker getTrackerById(TrackerIdT id) {
|
||||
for (Tracker tracker : trackers) {
|
||||
if (tracker.getTrackerNum() != id.getTrackerNum())
|
||||
continue;
|
||||
if (tracker.getDevice() == null && id.getDeviceId() != null)
|
||||
continue;
|
||||
if (tracker.getDevice() != null && id.getDeviceId() == null)
|
||||
continue;
|
||||
if (tracker.getDevice().getId() != id.getDeviceId().getId())
|
||||
continue;
|
||||
return tracker;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public BVHRecorder getBvhRecorder() {
|
||||
return this.bvhRecorder;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user