Class XrPosef

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

public class XrPosef extends org.lwjgl.system.Struct<XrPosef> implements org.lwjgl.system.NativeResource
Location and orientation in a space.
Description

A runtime must return ERROR_POSE_INVALID if the orientation norm deviates by more than 1% from unit length.

See Also

XrActionSpaceCreateInfo, XrBodyJointLocationFB, XrBodyJointLocationHTC, XrBodySkeletonJointFB, XrBodySkeletonJointHTC, XrBoxf, XrCompositionLayerCylinderKHR, XrCompositionLayerEquirect2KHR, XrCompositionLayerEquirectKHR, XrCompositionLayerProjectionView, XrCompositionLayerQuad, XrCompositionLayerSpaceWarpInfoFB, XrControllerModelNodeStateMSFT, XrCoordinateSpaceCreateInfoML, XrEnvironmentDepthImageViewMETA, XrEventDataReferenceSpaceChangePending, XrExternalCameraExtrinsicsOCULUS, XrEyeGazeFB, XrFrustumf, XrGeometryInstanceCreateInfoFB, XrGeometryInstanceTransformFB, XrHandJointLocationEXT, XrHandMeshSpaceCreateInfoMSFT, XrHandTrackingAimStateFB, XrHandTrackingMeshFB, XrMarkerSpaceCreateInfoML, XrMarkerSpaceCreateInfoVARJO, XrPassthroughMeshTransformInfoHTC, XrPlaneDetectorBeginInfoEXT, XrPlaneDetectorLocationEXT, XrQuaternionf, XrReferenceSpaceCreateInfo, XrSceneComponentLocationMSFT, XrSceneFrustumBoundMSFT, XrSceneOrientedBoxBoundMSFT, XrSpaceLocation, XrSpaceLocationData, XrSpatialAnchorCreateInfoFB, XrSpatialAnchorCreateInfoHTC, XrSpatialAnchorCreateInfoMSFT, XrSpatialAnchorSpaceCreateInfoMSFT, XrSpatialAnchorsCreateInfoFromPoseML, XrSpatialGraphNodeBindingPropertiesMSFT, XrSpatialGraphNodeSpaceCreateInfoMSFT, XrSpatialGraphStaticNodeBindingCreateInfoMSFT, XrSpheref, XrVector2f, XrVector3f, XrVector4f, XrView, XrVirtualKeyboardInputInfoMETA, XrVirtualKeyboardLocationInfoMETA, XrVirtualKeyboardSpaceCreateInfoMETA, XrWorldMeshBlockStateML, XrWorldMeshStateRequestInfoML, SendVirtualKeyboardInputMETA, SetInputDeviceLocationEXT

Layout


 struct XrPosef {
     XrQuaternionf orientation();
     XrVector3f position;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ORIENTATION
      The struct member offsets.
    • POSITION

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

    • XrPosef

      public XrPosef(ByteBuffer container)
      Creates a XrPosef 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<XrPosef>
    • orientation

      public XrQuaternionf orientation()
      an XrQuaternionf representing the orientation within a space.
    • position$

      public XrVector3f position$()
      an XrVector3f representing position within a space.
    • orientation

      public XrPosef orientation(XrQuaternionf value)
      Copies the specified XrQuaternionf to the orientation() field.
    • orientation

      public XrPosef orientation(Consumer<XrQuaternionf> consumer)
      Passes the orientation() field to the specified Consumer.
    • position$

      public XrPosef position$(XrVector3f value)
      Copies the specified XrVector3f to the position$() field.
    • position$

      public XrPosef position$(Consumer<XrVector3f> consumer)
      Passes the position$() field to the specified Consumer.
    • set

      public XrPosef set(XrQuaternionf orientation, XrVector3f position$)
      Initializes this struct with the specified values.
    • set

      public XrPosef set(XrPosef src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XrPosef.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new XrPosef.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
    • norientation

      public static XrQuaternionf norientation(long struct)
      Unsafe version of orientation().
    • nposition$

      public static XrVector3f nposition$(long struct)
      Unsafe version of position$().
    • norientation

      public static void norientation(long struct, XrQuaternionf value)
      Unsafe version of orientation.
    • nposition$

      public static void nposition$(long struct, XrVector3f value)
      Unsafe version of position$.