com.io7m.r2.meshes.binary.r2mb

## Class R2MBHeaderByteBuffered

- java.lang.Object
- - com.io7m.r2.meshes.binary.r2mb.R2MBHeaderByteBuffered

- All Implemented Interfaces:
    com.io7m.jpra.runtime.java.JPRAValueType, R2MBHeaderReadableType, R2MBHeaderType, R2MBHeaderWritableType

      public final class R2MBHeaderByteBuffered
      extends Object
      implements R2MBHeaderType

  A `ByteBuffer` based implementation of the `R2MBHeader` record type.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `getMagic0()`
    `byte` | `getMagic1()`
    `byte` | `getMagic2()`
    `byte` | `getMagic3()`
    `int` | `getTriangleCount()`
    `int` | `getVersion()`
    `int` | `getVertexCount()`
    `int` | `metaMagic0OffsetFromCursor()`
    `int` | `metaMagic0OffsetFromType()`
    `static int` | `metaMagic0StaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaMagic0Type()`
    `int` | `metaMagic1OffsetFromCursor()`
    `int` | `metaMagic1OffsetFromType()`
    `static int` | `metaMagic1StaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaMagic1Type()`
    `int` | `metaMagic2OffsetFromCursor()`
    `int` | `metaMagic2OffsetFromType()`
    `static int` | `metaMagic2StaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaMagic2Type()`
    `int` | `metaMagic3OffsetFromCursor()`
    `int` | `metaMagic3OffsetFromType()`
    `static int` | `metaMagic3StaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaMagic3Type()`
    `int` | `metaTriangleCountOffsetFromCursor()`
    `int` | `metaTriangleCountOffsetFromType()`
    `static int` | `metaTriangleCountStaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaTriangleCountType()`
    `int` | `metaVersionOffsetFromCursor()`
    `int` | `metaVersionOffsetFromType()`
    `static int` | `metaVersionStaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaVersionType()`
    `int` | `metaVertexCountOffsetFromCursor()`
    `int` | `metaVertexCountOffsetFromType()`
    `static int` | `metaVertexCountStaticOffsetFromType()`
    `com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned` | `metaVertexCountType()`
    `static R2MBHeaderType` | `newValue(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)` Construct a view of a type.
    `static R2MBHeaderType` | `newValueWithOffset(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer, int in_base_offset)` Construct a view of a type.
    `void` | `setMagic0(byte x)` Set the value of the `magic0` field
    `void` | `setMagic1(byte x)` Set the value of the `magic1` field
    `void` | `setMagic2(byte x)` Set the value of the `magic2` field
    `void` | `setMagic3(byte x)` Set the value of the `magic3` field
    `void` | `setTriangleCount(int x)` Set the value of the `triangle_count` field
    `void` | `setVersion(int x)` Set the value of the `version` field
    `void` | `setVertexCount(int x)` Set the value of the `vertex_count` field
    `static int` | `sizeInOctets()`
    `int` | `sizeOctets()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### newValueWithOffset

          public static R2MBHeaderType newValueWithOffset(ByteBuffer in_buffer,
                                                          com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer,
                                                          int in_base_offset)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
        `in_base_offset` - The base offset from the cursor
      Returns:
        A view of a type

    - #### newValue

          public static R2MBHeaderType newValue(ByteBuffer in_buffer,
                                                com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
      Returns:
        A view of a type

    - #### sizeOctets

          public int sizeOctets()

      Specified by:
        `sizeOctets` in interface `com.io7m.jpra.runtime.java.JPRAValueType`

    - #### sizeInOctets

          public static int sizeInOctets()

      Returns:
        The size of the type in octets

    - #### metaMagic0OffsetFromType

          public int metaMagic0OffsetFromType()

      Specified by:
        `metaMagic0OffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic0` field, from the start of the type

    - #### metaMagic0StaticOffsetFromType

          public static int metaMagic0StaticOffsetFromType()

      Returns:
        The offset in octets of field `magic0` from the start of the type

    - #### metaMagic0OffsetFromCursor

          public int metaMagic0OffsetFromCursor()

      Specified by:
        `metaMagic0OffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic0` field, from the cursor

    - #### metaMagic0Type

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaMagic0Type()

      Specified by:
        `metaMagic0Type` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `magic0` field

    - #### getMagic0

          public byte getMagic0()

      Specified by:
        `getMagic0` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `magic0` field

    - #### setMagic0

          public void setMagic0(byte x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `magic0` field
      Specified by:
        `setMagic0` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaMagic1OffsetFromType

          public int metaMagic1OffsetFromType()

      Specified by:
        `metaMagic1OffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic1` field, from the start of the type

    - #### metaMagic1StaticOffsetFromType

          public static int metaMagic1StaticOffsetFromType()

      Returns:
        The offset in octets of field `magic1` from the start of the type

    - #### metaMagic1OffsetFromCursor

          public int metaMagic1OffsetFromCursor()

      Specified by:
        `metaMagic1OffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic1` field, from the cursor

    - #### metaMagic1Type

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaMagic1Type()

      Specified by:
        `metaMagic1Type` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `magic1` field

    - #### getMagic1

          public byte getMagic1()

      Specified by:
        `getMagic1` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `magic1` field

    - #### setMagic1

          public void setMagic1(byte x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `magic1` field
      Specified by:
        `setMagic1` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaMagic2OffsetFromType

          public int metaMagic2OffsetFromType()

      Specified by:
        `metaMagic2OffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic2` field, from the start of the type

    - #### metaMagic2StaticOffsetFromType

          public static int metaMagic2StaticOffsetFromType()

      Returns:
        The offset in octets of field `magic2` from the start of the type

    - #### metaMagic2OffsetFromCursor

          public int metaMagic2OffsetFromCursor()

      Specified by:
        `metaMagic2OffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic2` field, from the cursor

    - #### metaMagic2Type

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaMagic2Type()

      Specified by:
        `metaMagic2Type` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `magic2` field

    - #### getMagic2

          public byte getMagic2()

      Specified by:
        `getMagic2` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `magic2` field

    - #### setMagic2

          public void setMagic2(byte x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `magic2` field
      Specified by:
        `setMagic2` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaMagic3OffsetFromType

          public int metaMagic3OffsetFromType()

      Specified by:
        `metaMagic3OffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic3` field, from the start of the type

    - #### metaMagic3StaticOffsetFromType

          public static int metaMagic3StaticOffsetFromType()

      Returns:
        The offset in octets of field `magic3` from the start of the type

    - #### metaMagic3OffsetFromCursor

          public int metaMagic3OffsetFromCursor()

      Specified by:
        `metaMagic3OffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `magic3` field, from the cursor

    - #### metaMagic3Type

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaMagic3Type()

      Specified by:
        `metaMagic3Type` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `magic3` field

    - #### getMagic3

          public byte getMagic3()

      Specified by:
        `getMagic3` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `magic3` field

    - #### setMagic3

          public void setMagic3(byte x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `magic3` field
      Specified by:
        `setMagic3` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaVersionOffsetFromType

          public int metaVersionOffsetFromType()

      Specified by:
        `metaVersionOffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `version` field, from the start of the type

    - #### metaVersionStaticOffsetFromType

          public static int metaVersionStaticOffsetFromType()

      Returns:
        The offset in octets of field `version` from the start of the type

    - #### metaVersionOffsetFromCursor

          public int metaVersionOffsetFromCursor()

      Specified by:
        `metaVersionOffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `version` field, from the cursor

    - #### metaVersionType

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaVersionType()

      Specified by:
        `metaVersionType` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `version` field

    - #### getVersion

          public int getVersion()

      Specified by:
        `getVersion` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `version` field

    - #### setVersion

          public void setVersion(int x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `version` field
      Specified by:
        `setVersion` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaVertexCountOffsetFromType

          public int metaVertexCountOffsetFromType()

      Specified by:
        `metaVertexCountOffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `vertex_count` field, from the start of the type

    - #### metaVertexCountStaticOffsetFromType

          public static int metaVertexCountStaticOffsetFromType()

      Returns:
        The offset in octets of field `vertex_count` from the start of the type

    - #### metaVertexCountOffsetFromCursor

          public int metaVertexCountOffsetFromCursor()

      Specified by:
        `metaVertexCountOffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `vertex_count` field, from the cursor

    - #### metaVertexCountType

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaVertexCountType()

      Specified by:
        `metaVertexCountType` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `vertex_count` field

    - #### getVertexCount

          public int getVertexCount()

      Specified by:
        `getVertexCount` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `vertex_count` field

    - #### setVertexCount

          public void setVertexCount(int x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `vertex_count` field
      Specified by:
        `setVertexCount` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

    - #### metaTriangleCountOffsetFromType

          public int metaTriangleCountOffsetFromType()

      Specified by:
        `metaTriangleCountOffsetFromType` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `triangle_count` field, from the start of the type

    - #### metaTriangleCountStaticOffsetFromType

          public static int metaTriangleCountStaticOffsetFromType()

      Returns:
        The offset in octets of field `triangle_count` from the start of the type

    - #### metaTriangleCountOffsetFromCursor

          public int metaTriangleCountOffsetFromCursor()

      Specified by:
        `metaTriangleCountOffsetFromCursor` in interface `R2MBHeaderReadableType`
      Returns:
        The offset in octets of the `triangle_count` field, from the cursor

    - #### metaTriangleCountType

          public com.io7m.jpra.runtime.java.JPRATypeModel.JPRAIntegerUnsigned metaTriangleCountType()

      Specified by:
        `metaTriangleCountType` in interface `R2MBHeaderReadableType`
      Returns:
        The type of the `triangle_count` field

    - #### getTriangleCount

          public int getTriangleCount()

      Specified by:
        `getTriangleCount` in interface `R2MBHeaderReadableType`
      Returns:
        The value of the `triangle_count` field

    - #### setTriangleCount

          public void setTriangleCount(int x)

      Description copied from interface: `R2MBHeaderWritableType`
      Set the value of the `triangle_count` field
      Specified by:
        `setTriangleCount` in interface `R2MBHeaderWritableType`
      Parameters:
        `x` - The new value

Copyright © 2017 <code@io7m.com> http://io7m.com