Class XrScenePlaneMSFT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class XrScenePlaneMSFT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Scene plane.
    Description

    The size of a plane refers to the plane’s size in the x-y plane of the plane’s coordinate system. A plane with a position of {0,0,0}, rotation of {0,0,0,1} (no rotation), and an extent of {1,1} refers to a 1 meter x 1 meter plane centered at {0,0,0} with its front face normal vector pointing towards the +Z direction in the plane component’s space. For planes with an alignment of SCENE_PLANE_ALIGNMENT_TYPE_VERTICAL_MSFT, the +Y direction must point up away from the direction of gravity.

    Note

    OpenXR uses an X-Y plane with +Z as the plane normal but other APIs may use an X-Z plane with +Y as the plane normal. The X-Y plane can be converted to an X-Z plane by rotating -π/2 radians around the +X axis.

    Valid Usage (Implicit)
    See Also

    XrExtent2Df, XrScenePlanesMSFT

    Layout

    
     struct XrScenePlaneMSFT {
         XrScenePlaneAlignmentTypeMSFT alignment();
         XrExtent2Df size();
         uint64_t meshBufferId();
         XrBool32 supportsIndicesUint16();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ALIGNMENT, SIZE, MESHBUFFERID, SUPPORTSINDICESUINT16

        The struct member offsets.
    • Constructor Detail

      • XrScenePlaneMSFT

        public XrScenePlaneMSFT​(java.nio.ByteBuffer container)
        Creates a XrScenePlaneMSFT 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • alignment

        public int alignment()
        the alignment type of the plane specified by XrScenePlaneAlignmentTypeMSFT.
      • size

        public XrExtent2Df size()
        the 2D size of the plane’s extent, where size::width is the width of the plane along the X axis, and size::height is the height of the plane along the Y axis.
      • meshBufferId

        public long meshBufferId()
        the uint64_t identifier that specifies the scene mesh buffer of this plane’s triangle mesh. If meshBufferId is zero then this plane does not have a mesh. The triangles in a planar mesh are coplanar.
      • supportsIndicesUint16

        public boolean supportsIndicesUint16()
        TRUE if the mesh supports reading 16-bit unsigned indices.
      • set

        public XrScenePlaneMSFT set​(int alignment,
                                    XrExtent2Df size,
                                    long meshBufferId,
                                    boolean supportsIndicesUint16)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

        public static int nalignment​(long struct)
        Unsafe version of alignment().
      • nmeshBufferId

        public static long nmeshBufferId​(long struct)
        Unsafe version of meshBufferId().
      • nsupportsIndicesUint16

        public static int nsupportsIndicesUint16​(long struct)
        Unsafe version of supportsIndicesUint16().
      • nalignment

        public static void nalignment​(long struct,
                                      int value)
        Unsafe version of alignment.
      • nsize

        public static void nsize​(long struct,
                                 XrExtent2Df value)
        Unsafe version of size.
      • nmeshBufferId

        public static void nmeshBufferId​(long struct,
                                         long value)
        Unsafe version of meshBufferId.
      • nsupportsIndicesUint16

        public static void nsupportsIndicesUint16​(long struct,
                                                  int value)
        Unsafe version of supportsIndicesUint16.