Class RenderModelVertex

  • All Implemented Interfaces:
    Pointer

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

    Member documentation

    • vPosition – position in meters in device space

    Layout

    
     struct RenderModel_Vertex_t {
         HmdVector3_t vPosition;
         HmdVector3_t vNormal;
         float rfTextureCoord[2];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • VPOSITION, VNORMAL, RFTEXTURECOORD

        The struct member offsets.
    • Constructor Detail

      • RenderModelVertex

        public RenderModelVertex​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • vPosition

        public RenderModelVertex vPosition​(java.util.function.Consumer<HmdVector3> consumer)
        Passes the vPosition field to the specified Consumer.
      • vNormal

        public RenderModelVertex vNormal​(java.util.function.Consumer<HmdVector3> consumer)
        Passes the vNormal field to the specified Consumer.
      • rfTextureCoord

        public java.nio.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.
      • createSafe

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

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

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

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