/**************************************************************************/1/* xr_pose.h */2/**************************************************************************/3/* This file is part of: */4/* GODOT ENGINE */5/* https://godotengine.org */6/**************************************************************************/7/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */8/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */9/* */10/* Permission is hereby granted, free of charge, to any person obtaining */11/* a copy of this software and associated documentation files (the */12/* "Software"), to deal in the Software without restriction, including */13/* without limitation the rights to use, copy, modify, merge, publish, */14/* distribute, sublicense, and/or sell copies of the Software, and to */15/* permit persons to whom the Software is furnished to do so, subject to */16/* the following conditions: */17/* */18/* The above copyright notice and this permission notice shall be */19/* included in all copies or substantial portions of the Software. */20/* */21/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */22/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */23/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */24/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */25/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */26/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */27/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */28/**************************************************************************/2930#pragma once3132#include "core/object/ref_counted.h"3334class XRPose : public RefCounted {35GDCLASS(XRPose, RefCounted);3637public:38// TrackingConfidence gives an indication of how reliable our transform data is.39enum TrackingConfidence {40XR_TRACKING_CONFIDENCE_NONE, // No tracking information is available for this pose.41XR_TRACKING_CONFIDENCE_LOW, // Tracking information may be inaccurate or estimated.42XR_TRACKING_CONFIDENCE_HIGH // Tracking information is deemed accurate and up to date.43};4445private:46bool has_tracking_data = false;47StringName name;48Transform3D transform;49Vector3 linear_velocity;50Vector3 angular_velocity;51TrackingConfidence tracking_confidence = XR_TRACKING_CONFIDENCE_NONE;5253protected:54static void _bind_methods();5556public:57void set_has_tracking_data(const bool p_has_tracking_data);58bool get_has_tracking_data() const;5960void set_name(const StringName &p_name);61StringName get_name() const;6263void set_transform(const Transform3D p_transform);64Transform3D get_transform() const;65Transform3D get_adjusted_transform() const;6667void set_linear_velocity(const Vector3 p_velocity);68Vector3 get_linear_velocity() const;6970void set_angular_velocity(const Vector3 p_velocity);71Vector3 get_angular_velocity() const;7273void set_tracking_confidence(const TrackingConfidence p_tracking_confidence);74TrackingConfidence get_tracking_confidence() const;75};7677VARIANT_ENUM_CAST(XRPose::TrackingConfidence);787980