/* * Copyright (c) Meta Platforms, Inc. and affiliates. * All rights reserved. * * Licensed under the Oculus SDK License Agreement (the "License"); * you may not use the Oculus SDK except in compliance with the License, * which is provided at the time of installation or download, or which * otherwise accompanies this software in either electronic or hard copy form. * * You may obtain a copy of the License at * * https://developer.oculus.com/licenses/oculussdk/ * * Unless required by applicable law or agreed to in writing, the Oculus SDK * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using UnityEngine; namespace Oculus.Interaction { /// /// Defines the essential functionalities for movement operations, modifying how an Interactable moves when selected by an Interactor . /// This interface provides methods to initiate, update, and stop movements, as well as to perform per-frame updates to support smooth and responsive interactions. /// public interface IMovement { /// /// Gets the current pose of the movement. This property allows developers to retrieve the real-time position and orientation of the object implementing this interface /// For an example implementation, see /// Pose Pose { get; } /// /// Indicates whether the movement has stopped. /// For an example implementation, see /// bool Stopped { get; } /// /// Moves the object to the specified target pose. This method is essential for setting the initial target and starting the movement based on the provided pose. /// For an example implementation, see /// /// The target pose to which the object will move. void MoveTo(Pose target); /// /// Updates the current target to a new pose. This method allows for dynamic changes to the target during movement, which is useful in scenarios where the target is not static. /// For an example implementation, see /// /// The new target pose to which the object will move. void UpdateTarget(Pose target); /// /// Stops the movement and sets the pose to the specified pose. This method provides a way to immediately halt any ongoing movement and reset the pose, which can be critical in stopping interactions gracefully when an Interactable is selected or unselected. /// For an example implementation, see /// /// The pose to set when the movement is stopped. void StopAndSetPose(Pose pose); /// /// Updates the movement logic on each frame tick. This method ensures that the movement logic is processed, keeping the movement consistent with the frame rate. /// For an example implementation, see /// void Tick(); } }