Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some javadoc cleanup #1986

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@
import java.nio.ByteBuffer;

/**
* Represents the android implementation for the native <a href="https://xiph.org"/> vorbis file decoder.
* Represents the android implementation for the native <a href="https://xiph.org"> vorbis file decoder.</a>
* This decoder initializes an OggVorbis_File from an already opened file designated by the {@link NativeVorbisFile#fd}.
* <br/>
*
* Code by Kirill Vainer.
* <br/>
*
* Modified by pavl_g.
* @author Kirill Vainer
* @author Modified by pavl_g
*/
public class NativeVorbisFile {

Expand Down
51 changes: 32 additions & 19 deletions jme3-vr/src/main/java/com/jme3/input/vr/VRInputAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
public interface VRInputAPI {

/**
* Registers an action manifest. An actions manifest is a file that defines "actions" a player can make.
* Registers an action manifest. An action manifest is a file that defines "actions" a player can make.
* (An action is an abstract version of a button press). The action manifest may then also include references to
* further files that define default mappings between those actions and physical buttons on the VR controllers.
*
* Note that registering an actions manifest will deactivate legacy inputs (i.e. methods such as {@link #isButtonDown}
* Note that registering an actions manifest will deactivate legacy inputs. i.e. methods such as {@link #isButtonDown}
* will no longer work
*
* See https://github.com/ValveSoftware/openvr/wiki/Action-manifest for documentation on how to create an
Expand Down Expand Up @@ -138,7 +138,8 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
/**
* Check if the given button is down (more generally if the given input type is activated).
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
* @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*
* @param controllerIndex the index of the controller to check.
* @param checkButton the button / input to check.
Expand All @@ -150,28 +151,34 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
/**
* Check if the given button / input from the given controller has been just pressed / activated.
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
* @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*
* @param controllerIndex the index of the controller.
* @param checkButton the button / input to check.
* @return <code>true</code> if the given button / input from the given controller has been just pressed / activated and <code>false</code> otherwise.
* @return <code>true</code> if the given input from the given controller has just been activated,
* <code>false</code> otherwise.
*/
@Deprecated
public boolean wasButtonPressedSinceLastCall(int controllerIndex, VRInputType checkButton);

/**
* Reset the current activation of the inputs. After a call to this method, all input activation is considered as new activation.
* Reset the current activation of the inputs. After a call to this method, any input activation is
* considered a new activation.
*
* @see #wasButtonPressedSinceLastCall(int, VRInputType)
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
* @deprecated Use the action-manifest approach instead. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*/
@Deprecated
public void resetInputSinceLastCall();

/**
* Get the controller axis delta from the last value.
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
* @deprecated Use action-manifest approach instead. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*
* @param controllerIndex the index of the controller.
* @param forAxis the axis.
Expand All @@ -198,9 +205,11 @@ default AnalogActionState getAnalogActionState( String actionName, String restri

/**
* Get the axis value for the given input on the given controller.
* This value is the {@link #getAxisRaw(int, VRInputType) raw value} multiplied by the {@link #getAxisMultiplier() axis multiplier}.
* This value is the {@link #getAxisRaw(int, VRInputType) raw value} multiplied by the
* {@link #getAxisMultiplier() axis multiplier}.
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest}. Note; action based will only work with the OpenVR api
* @deprecated Use action-manifest approach instead. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*
* @param controllerIndex the index of the controller.
* @param forAxis the axis.
Expand All @@ -214,7 +223,8 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
/**
* Get the axis value for the given input on the given controller.
*
* Deprecated as should use an actions manifest approach. See {@link #registerActionManifest} Note; action based will only work with the OpenVR api
* @deprecated Use the action-manifest approach. See {@link #registerActionManifest}.
* Note: action-manifest will only work with the OpenVR api.
*
* @param controllerIndex the index of the controller.
* @param forAxis the axis.
Expand Down Expand Up @@ -333,7 +343,7 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
/**
* Trigger a haptic pulse on the selected controller for the duration given in parameters (in seconds).
*
* Deprecated, use triggerHapticAction instead (as it has more options and doesn't use deprecated methods)
* @deprecated Use triggerHapticAction instead - it has more options and doesn't use deprecated methods.
*
* @param controllerIndex the index of the controller.
* @param seconds the duration of the pulse in seconds.
Expand All @@ -344,9 +354,10 @@ default AnalogActionState getAnalogActionState( String actionName, String restri
/**
* Triggers a haptic action (aka a vibration).
*
* Note if you want a haptic action in only one hand that is done either by only binding the action to one hand in
* the action manifest's standard bindings or by binding to both and using {@link #triggerHapticAction(String, float, float, float, String)}
* to control which input it gets set to at run time
* Note: if you want a haptic action in only one hand, you can either bind the action to one hand in
* the action manifest's standard bindings or bind to both and use
* {@link #triggerHapticAction(String, float, float, float, String)}
* to control which input it gets set to at runtime.
*
* @param actionName The name of the action. Will be something like /actions/main/out/vibrate
* @param duration how long in seconds the
Expand All @@ -360,16 +371,18 @@ default void triggerHapticAction( String actionName, float duration, float frequ
/**
* Triggers a haptic action (aka a vibration) restricted to just one input (e.g. left or right hand).
*
* Note that restrictToInput only restricts, it must still be bound to the input you want to send the haptic to in
* the action manifest default bindings.
* Note: restrictToInput only restricts which input is used at runtime. You must still bind the input
* you want to send the haptic to in the action manifest default bindings.
*
* This method is typically used to bind the haptic to both hands then decide at run time which hand to sent to *
* This method is typically used by binding the haptic to both hands, and then deciding at runtime which
* hand it should be sent to.
*
* @param actionName The name of the action. Will be something like /actions/main/out/vibrate
* @param duration how long in seconds the
* @param frequency in cycles per second
* @param amplitude between 0 and 1
* @param restrictToInput the input to restrict the action to. E.g. /user/hand/right, /user/hand/left. Or null, which means "any input"
* @param restrictToInput the input to restrict the action to, such as <code>/user/hand/right</code> or
* <code>/user/hand/left</code>. <code>null</code> means "any input".
*/
default void triggerHapticAction( String actionName, float duration, float frequency, float amplitude, String restrictToInput){
throw new UnsupportedOperationException("Action manifests are not supported for the currently used VR API");
Expand Down