Class RenderModelVertex

All Implemented Interfaces:
Pointer

public class RenderModelVertex extends Struct<RenderModelVertex>
A single vertex in a render model.

Layout


 struct RenderModel_Vertex_t {
     HmdVector3_t vPosition();
     HmdVector3_t vNormal;
     float rfTextureCoord[2];
 }
  • Field Details

    • SIZEOF

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

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

      public static final int VPOSITION
      The struct member offsets.
    • VNORMAL

      public static final int VNORMAL
      The struct member offsets.
    • RFTEXTURECOORD

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

    • RenderModelVertex

      public RenderModelVertex(ByteBuffer container)
      Creates a RenderModelVertex 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<RenderModelVertex>
    • vPosition

      public HmdVector3 vPosition()
      position in meters in device space
    • vNormal

      public HmdVector3 vNormal()
      Returns:
      a HmdVector3 view of the vNormal field.
    • rfTextureCoord

      public FloatBuffer rfTextureCoord()
      Returns:
      a FloatBuffer view of the rfTextureCoord field.
    • rfTextureCoord

      public float rfTextureCoord(int index)
      Returns:
      the value at the specified index of the rfTextureCoord field.
    • create

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

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

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

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

      public static HmdVector3 nvPosition(long struct)
      Unsafe version of vPosition().
    • nvNormal

      public static HmdVector3 nvNormal(long struct)
      Unsafe version of vNormal().
    • nrfTextureCoord

      public static FloatBuffer nrfTextureCoord(long struct)
      Unsafe version of rfTextureCoord().
    • nrfTextureCoord

      public static float nrfTextureCoord(long struct, int index)
      Unsafe version of rfTextureCoord.