Class XrBodyJointLocationsHTC

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrBodyJointLocationsHTC>
org.lwjgl.openxr.XrBodyJointLocationsHTC
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class XrBodyJointLocationsHTC extends org.lwjgl.system.Struct<XrBodyJointLocationsHTC> implements org.lwjgl.system.NativeResource
Returns the body joint data.
Description

The application must set jointLocationCount as appropriate for the chosen XrBodyJointSetHTC value when creating the XrBodyTrackerHTC. If jointLocationCount does not match the value associated with the supplied XrBodyJointSetHTC value, the runtime must return ERROR_VALIDATION_FAILURE from LocateBodyJointsHTC.

An application must allocate the output jointLocations array with a minimum capacity of jointLocationCount of XrBodyJointLocationHTC elements. If the application supplies a NULL value for jointLocations, the runtime must return ERROR_VALIDATION_FAILURE.

The runtime must update the jointLocations array elements indexed using the corresponding body joint enumeration (e.g. XrBodyJointHTC for the joint set BODY_JOINT_SET_FULL_HTC) as described by XrBodyJointSetHTC when creating the XrBodyTrackerHTC. For example, when the XrBodyTrackerHTC is created with BODY_JOINT_SET_FULL_HTC, the runtime must fill the jointLocations array with body joint data indexed by the XrBodyJointHTC enumeration.

If the runtime returns combinedLocationFlags with SPACE_LOCATION_POSITION_VALID_BIT and SPACE_LOCATION_ORIENTATION_VALID_BIT set, it indicates that the body tracker detects the joint space locations. If the runtime returns combinedLocationFlags with neither SPACE_LOCATION_POSITION_VALID_BIT nor SPACE_LOCATION_ORIENTATION_VALID_BIT set, it indicates that the body tracker did not detect the joint space locations.

The purpose of the skeleton is to provide data about the body size. The calculation of the body size may be updated during a session. Each time the calculation of the size is changed, XrBodyJointLocationsHTC::skeletonGenerationId is changed to indicate that a new skeleton may be retrieved. GetBodySkeletonHTC can be called with the specified skeletonGenerationId to get the corresponding skeleton.

Valid Usage (Implicit)
See Also

XrBodyJointLocationHTC, LocateBodyJointsHTC

Layout


 struct XrBodyJointLocationsHTC {
     XrStructureType type();
     void * next();
     XrSpaceLocationFlags combinedLocationFlags();
     XrBodyJointConfidenceHTC confidenceLevel();
     uint32_t jointLocationCount();
     XrBodyJointLocationHTC * jointLocations();
     uint32_t skeletonGenerationId();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • COMBINEDLOCATIONFLAGS

      public static final int COMBINEDLOCATIONFLAGS
      The struct member offsets.
    • CONFIDENCELEVEL

      public static final int CONFIDENCELEVEL
      The struct member offsets.
    • JOINTLOCATIONCOUNT

      public static final int JOINTLOCATIONCOUNT
      The struct member offsets.
    • JOINTLOCATIONS

      public static final int JOINTLOCATIONS
      The struct member offsets.
    • SKELETONGENERATIONID

      public static final int SKELETONGENERATIONID
      The struct member offsets.
  • Constructor Details

    • XrBodyJointLocationsHTC

      public XrBodyJointLocationsHTC(ByteBuffer container)
      Creates a XrBodyJointLocationsHTC instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrBodyJointLocationsHTC>
    • type

      public int type()
      the XrStructureType of this structure.
    • next

      public long next()
      NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
    • combinedLocationFlags

      public long combinedLocationFlags()
      a bitfield, with bit masks defined in XrSpaceLocationFlagBits, containing the bitwise OR of the location flags of all body joints.
    • confidenceLevel

      public int confidenceLevel()
      an XrBodyJointConfidenceHTC value which indicates the confidence level for the returned body joint pose.
    • jointLocationCount

      public int jointLocationCount()
      a uint32_t describing the count of elements in jointLocations array.
    • jointLocations

      public XrBodyJointLocationHTC.Buffer jointLocations()
      an application-allocated XrBodyJointLocationHTC array filled in by the runtime specifying the locations for individual body joints.
    • skeletonGenerationId

      public int skeletonGenerationId()
      a unique identifier, representing the skeleton which is generated when the tracking auto-calibrates the user skeleton scale and proportions.
    • type

      public XrBodyJointLocationsHTC type(int value)
      Sets the specified value to the type() field.
    • type$Default

      public XrBodyJointLocationsHTC type$Default()
      Sets the TYPE_BODY_JOINT_LOCATIONS_HTC value to the type() field.
    • next

      public XrBodyJointLocationsHTC next(long value)
      Sets the specified value to the next() field.
    • combinedLocationFlags

      public XrBodyJointLocationsHTC combinedLocationFlags(long value)
      Sets the specified value to the combinedLocationFlags() field.
    • confidenceLevel

      public XrBodyJointLocationsHTC confidenceLevel(int value)
      Sets the specified value to the confidenceLevel() field.
    • jointLocations

      Sets the address of the specified XrBodyJointLocationHTC.Buffer to the jointLocations() field.
    • skeletonGenerationId

      public XrBodyJointLocationsHTC skeletonGenerationId(int value)
      Sets the specified value to the skeletonGenerationId() field.
    • set

      public XrBodyJointLocationsHTC set(int type, long next, long combinedLocationFlags, int confidenceLevel, XrBodyJointLocationHTC.Buffer jointLocations, int skeletonGenerationId)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrBodyJointLocationsHTC malloc()
      Returns a new XrBodyJointLocationsHTC instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrBodyJointLocationsHTC calloc()
      Returns a new XrBodyJointLocationsHTC instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrBodyJointLocationsHTC create()
      Returns a new XrBodyJointLocationsHTC instance allocated with BufferUtils.
    • create

      public static XrBodyJointLocationsHTC create(long address)
      Returns a new XrBodyJointLocationsHTC instance for the specified memory address.
    • createSafe

      public static @Nullable XrBodyJointLocationsHTC createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrBodyJointLocationsHTC.Buffer malloc(int capacity)
      Returns a new XrBodyJointLocationsHTC.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrBodyJointLocationsHTC.Buffer calloc(int capacity)
      Returns a new XrBodyJointLocationsHTC.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrBodyJointLocationsHTC.Buffer create(int capacity)
      Returns a new XrBodyJointLocationsHTC.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrBodyJointLocationsHTC.Buffer create(long address, int capacity)
      Create a XrBodyJointLocationsHTC.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrBodyJointLocationsHTC.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static XrBodyJointLocationsHTC malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrBodyJointLocationsHTC instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrBodyJointLocationsHTC calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new XrBodyJointLocationsHTC instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrBodyJointLocationsHTC.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrBodyJointLocationsHTC.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrBodyJointLocationsHTC.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrBodyJointLocationsHTC.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • ncombinedLocationFlags

      public static long ncombinedLocationFlags(long struct)
      Unsafe version of combinedLocationFlags().
    • nconfidenceLevel

      public static int nconfidenceLevel(long struct)
      Unsafe version of confidenceLevel().
    • njointLocationCount

      public static int njointLocationCount(long struct)
      Unsafe version of jointLocationCount().
    • njointLocations

      public static XrBodyJointLocationHTC.Buffer njointLocations(long struct)
      Unsafe version of jointLocations().
    • nskeletonGenerationId

      public static int nskeletonGenerationId(long struct)
      Unsafe version of skeletonGenerationId().
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • ncombinedLocationFlags

      public static void ncombinedLocationFlags(long struct, long value)
      Unsafe version of combinedLocationFlags.
    • nconfidenceLevel

      public static void nconfidenceLevel(long struct, int value)
      Unsafe version of confidenceLevel.
    • njointLocationCount

      public static void njointLocationCount(long struct, int value)
      Sets the specified value to the jointLocationCount field of the specified struct.
    • njointLocations

      public static void njointLocations(long struct, XrBodyJointLocationHTC.Buffer value)
      Unsafe version of jointLocations.
    • nskeletonGenerationId

      public static void nskeletonGenerationId(long struct, int value)
      Unsafe version of skeletonGenerationId.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate