summaryrefslogtreecommitdiff
path: root/servers/xr/xr_positional_tracker.h
diff options
context:
space:
mode:
Diffstat (limited to 'servers/xr/xr_positional_tracker.h')
-rw-r--r--servers/xr/xr_positional_tracker.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/servers/xr/xr_positional_tracker.h b/servers/xr/xr_positional_tracker.h
index 515359e9b1..420d818342 100644
--- a/servers/xr/xr_positional_tracker.h
+++ b/servers/xr/xr_positional_tracker.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -50,8 +50,8 @@ class XRPositionalTracker : public Object {
public:
enum TrackerHand {
TRACKER_HAND_UNKNOWN, /* unknown or not applicable */
- TRACKER_LEFT_HAND, /* controller is the left hand controller */
- TRACKER_RIGHT_HAND /* controller is the right hand controller */
+ TRACKER_HAND_LEFT, /* controller is the left hand controller */
+ TRACKER_HAND_RIGHT /* controller is the right hand controller */
};
private:
@@ -59,9 +59,9 @@ private:
StringName name; // (unique) name of the tracker
int tracker_id; // tracker index id that is unique per type
int joy_id; // if we also have a related joystick entity, the id of the joystick
- bool tracks_orientation; // do we track orientation?
+ bool tracking_orientation; // do we track orientation?
Basis orientation; // our orientation
- bool tracks_position; // do we track position?
+ bool tracking_position; // do we track position?
Vector3 rw_position; // our position "in the real world, so without world_scale applied"
Ref<Mesh> mesh; // when available, a mesh that can be used to render this tracker
TrackerHand hand; // if known, the hand this tracker is held in
@@ -71,23 +71,23 @@ protected:
static void _bind_methods();
public:
- void set_type(XRServer::TrackerType p_type);
- XRServer::TrackerType get_type() const;
- void set_name(const String &p_name);
- StringName get_name() const;
+ void set_tracker_type(XRServer::TrackerType p_type);
+ XRServer::TrackerType get_tracker_type() const;
+ void set_tracker_name(const String &p_name);
+ StringName get_tracker_name() const;
int get_tracker_id() const;
void set_joy_id(int p_joy_id);
int get_joy_id() const;
- bool get_tracks_orientation() const;
+ bool is_tracking_orientation() const;
void set_orientation(const Basis &p_orientation);
Basis get_orientation() const;
- bool get_tracks_position() const;
+ bool is_tracking_position() const;
void set_position(const Vector3 &p_position); // set position with world_scale applied
Vector3 get_position() const; // get position with world_scale applied
void set_rw_position(const Vector3 &p_rw_position);
Vector3 get_rw_position() const;
- XRPositionalTracker::TrackerHand get_hand() const;
- void set_hand(const XRPositionalTracker::TrackerHand p_hand);
+ XRPositionalTracker::TrackerHand get_tracker_hand() const;
+ void set_tracker_hand(const XRPositionalTracker::TrackerHand p_hand);
real_t get_rumble() const;
void set_rumble(real_t p_rumble);
void set_mesh(const Ref<Mesh> &p_mesh);