summaryrefslogtreecommitdiff
path: root/servers/xr_server.h
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-03-29 21:15:53 +1100
committerBastiaan Olij <mux213@gmail.com>2021-03-29 23:01:47 +1100
commit454c889e616917021379ebff5bde3f458cd68eb2 (patch)
treef2ffcdd0782015404289558d3b39bcd0d9cbcb50 /servers/xr_server.h
parent02471ba44d4b00af51af7bb3061437c6001d2c88 (diff)
Change XRPositionalTracker to a reference and better expose it to GDNative
Diffstat (limited to 'servers/xr_server.h')
-rw-r--r--servers/xr_server.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/servers/xr_server.h b/servers/xr_server.h
index d3972be838..46243d7fd0 100644
--- a/servers/xr_server.h
+++ b/servers/xr_server.h
@@ -77,7 +77,7 @@ public:
private:
Vector<Ref<XRInterface>> interfaces;
- Vector<XRPositionalTracker *> trackers;
+ Vector<Ref<XRPositionalTracker>> trackers;
Ref<XRInterface> primary_interface; /* we'll identify one interface as primary, this will be used by our viewports */
@@ -167,11 +167,11 @@ public:
*/
bool is_tracker_id_in_use_for_type(TrackerType p_tracker_type, int p_tracker_id) const;
int get_free_tracker_id_for_type(TrackerType p_tracker_type);
- void add_tracker(XRPositionalTracker *p_tracker);
- void remove_tracker(XRPositionalTracker *p_tracker);
+ void add_tracker(Ref<XRPositionalTracker> p_tracker);
+ void remove_tracker(Ref<XRPositionalTracker> p_tracker);
int get_tracker_count() const;
- XRPositionalTracker *get_tracker(int p_index) const;
- XRPositionalTracker *find_by_type_and_id(TrackerType p_tracker_type, int p_tracker_id) const;
+ Ref<XRPositionalTracker> get_tracker(int p_index) const;
+ Ref<XRPositionalTracker> find_by_type_and_id(TrackerType p_tracker_type, int p_tracker_id) const;
uint64_t get_last_process_usec();
uint64_t get_last_commit_usec();