Class XrScenePlaneMSFT

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

public class XrScenePlaneMSFT extends org.lwjgl.system.Struct<XrScenePlaneMSFT> 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 Details

    • SIZEOF

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

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

      public static final int ALIGNMENT
      The struct member offsets.
    • SIZE

      public static final int SIZE
      The struct member offsets.
    • MESHBUFFERID

      public static final int MESHBUFFERID
      The struct member offsets.
    • SUPPORTSINDICESUINT16

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

    • XrScenePlaneMSFT

      public XrScenePlaneMSFT(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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<XrScenePlaneMSFT>
    • 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 XrExtent2Df::width is the width of the plane along the X axis, and XrExtent2Df::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.
    • alignment

      public XrScenePlaneMSFT alignment(int value)
      Sets the specified value to the alignment() field.
    • size

      public XrScenePlaneMSFT size(XrExtent2Df value)
      Copies the specified XrExtent2Df to the size() field.
    • size

      public XrScenePlaneMSFT size(Consumer<XrExtent2Df> consumer)
      Passes the size() field to the specified Consumer.
    • meshBufferId

      public XrScenePlaneMSFT meshBufferId(long value)
      Sets the specified value to the meshBufferId() field.
    • supportsIndicesUint16

      public XrScenePlaneMSFT supportsIndicesUint16(boolean value)
      Sets the specified value to the supportsIndicesUint16() field.
    • set

      public XrScenePlaneMSFT set(int alignment, XrExtent2Df size, long meshBufferId, boolean supportsIndicesUint16)
      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 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

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

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

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

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

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

      public static @Nullable 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • 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:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nalignment

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

      public static XrExtent2Df nsize(long struct)
      Unsafe version of size().
    • 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.