All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jogamp.oculusvr.ovrHmdDesc Maven / Gradle / Ivy

/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Wed Mar 11 21:09:24 CET 2015 ----! */


package com.jogamp.oculusvr;

import java.nio.*;

import com.jogamp.gluegen.runtime.*;
import com.jogamp.common.os.*;
import com.jogamp.common.nio.*;
import jogamp.common.os.MachineDataInfoRuntime;

import com.jogamp.oculusvr.*;
import java.security.AccessController;
import java.security.PrivilegedAction;

public class ovrHmdDesc {

  StructAccessor accessor;

  private static final int mdIdx = MachineDataInfoRuntime.getStatic().ordinal();
  private final MachineDataInfo md;

  private static final int[] ovrHmdDesc_size = new int[] { 124 /* ARM_MIPS_32 */, 124 /* X86_32_UNIX */, 124 /* X86_32_MACOS */, 124 /* PPC_32_UNIX */, 124 /* SPARC_32_SUNOS */, 124 /* X86_32_WINDOWS */, 152 /* LP64_UNIX */, 152 /* X86_64_WINDOWS */  };
  private static final int[] Handle_offset = new int[] { 0 /* ARM_MIPS_32 */, 0 /* X86_32_UNIX */, 0 /* X86_32_MACOS */, 0 /* PPC_32_UNIX */, 0 /* SPARC_32_SUNOS */, 0 /* X86_32_WINDOWS */, 0 /* LP64_UNIX */, 0 /* X86_64_WINDOWS */ };
//private static final int[] Handle_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };// JType[OvrHmdContext / 'OvrHmdContext', is[compound, ], descriptor 'LOvrHmdContext;']
  private static final int[] Type_offset = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */ };
//private static final int[] Type_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] ProductName_offset = new int[] { 8 /* ARM_MIPS_32 */, 8 /* X86_32_UNIX */, 8 /* X86_32_MACOS */, 8 /* PPC_32_UNIX */, 8 /* SPARC_32_SUNOS */, 8 /* X86_32_WINDOWS */, 16 /* LP64_UNIX */, 16 /* X86_64_WINDOWS */ };
//private static final int[] ProductName_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, ], descriptor 'ANON_NIO']
  private static final int[] Manufacturer_offset = new int[] { 12 /* ARM_MIPS_32 */, 12 /* X86_32_UNIX */, 12 /* X86_32_MACOS */, 12 /* PPC_32_UNIX */, 12 /* SPARC_32_SUNOS */, 12 /* X86_32_WINDOWS */, 24 /* LP64_UNIX */, 24 /* X86_64_WINDOWS */ };
//private static final int[] Manufacturer_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, ], descriptor 'ANON_NIO']
  private static final int[] HmdCaps_offset = new int[] { 16 /* ARM_MIPS_32 */, 16 /* X86_32_UNIX */, 16 /* X86_32_MACOS */, 16 /* PPC_32_UNIX */, 16 /* SPARC_32_SUNOS */, 16 /* X86_32_WINDOWS */, 32 /* LP64_UNIX */, 32 /* X86_64_WINDOWS */ };
//private static final int[] HmdCaps_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] SensorCaps_offset = new int[] { 20 /* ARM_MIPS_32 */, 20 /* X86_32_UNIX */, 20 /* X86_32_MACOS */, 20 /* PPC_32_UNIX */, 20 /* SPARC_32_SUNOS */, 20 /* X86_32_WINDOWS */, 36 /* LP64_UNIX */, 36 /* X86_64_WINDOWS */ };
//private static final int[] SensorCaps_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] DistortionCaps_offset = new int[] { 24 /* ARM_MIPS_32 */, 24 /* X86_32_UNIX */, 24 /* X86_32_MACOS */, 24 /* PPC_32_UNIX */, 24 /* SPARC_32_SUNOS */, 24 /* X86_32_WINDOWS */, 40 /* LP64_UNIX */, 40 /* X86_64_WINDOWS */ };
//private static final int[] DistortionCaps_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };
  private static final int[] Resolution_offset = new int[] { 28 /* ARM_MIPS_32 */, 28 /* X86_32_UNIX */, 28 /* X86_32_MACOS */, 28 /* PPC_32_UNIX */, 28 /* SPARC_32_SUNOS */, 28 /* X86_32_WINDOWS */, 44 /* LP64_UNIX */, 44 /* X86_64_WINDOWS */ };
  private static final int[] Resolution_size = new int[] { 8 /* ARM_MIPS_32 */, 8 /* X86_32_UNIX */, 8 /* X86_32_MACOS */, 8 /* PPC_32_UNIX */, 8 /* SPARC_32_SUNOS */, 8 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };
  private static final int[] WindowsPos_offset = new int[] { 36 /* ARM_MIPS_32 */, 36 /* X86_32_UNIX */, 36 /* X86_32_MACOS */, 36 /* PPC_32_UNIX */, 36 /* SPARC_32_SUNOS */, 36 /* X86_32_WINDOWS */, 52 /* LP64_UNIX */, 52 /* X86_64_WINDOWS */ };
  private static final int[] WindowsPos_size = new int[] { 8 /* ARM_MIPS_32 */, 8 /* X86_32_UNIX */, 8 /* X86_32_MACOS */, 8 /* PPC_32_UNIX */, 8 /* SPARC_32_SUNOS */, 8 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };
  private static final int[] DefaultEyeFov_offset = new int[] { 44 /* ARM_MIPS_32 */, 44 /* X86_32_UNIX */, 44 /* X86_32_MACOS */, 44 /* PPC_32_UNIX */, 44 /* SPARC_32_SUNOS */, 44 /* X86_32_WINDOWS */, 60 /* LP64_UNIX */, 60 /* X86_64_WINDOWS */ };
  private static final int[] DefaultEyeFov_size = new int[] { 32 /* ARM_MIPS_32 */, 32 /* X86_32_UNIX */, 32 /* X86_32_MACOS */, 32 /* PPC_32_UNIX */, 32 /* SPARC_32_SUNOS */, 32 /* X86_32_WINDOWS */, 32 /* LP64_UNIX */, 32 /* X86_64_WINDOWS */  };
  private static final int[] MaxEyeFov_offset = new int[] { 76 /* ARM_MIPS_32 */, 76 /* X86_32_UNIX */, 76 /* X86_32_MACOS */, 76 /* PPC_32_UNIX */, 76 /* SPARC_32_SUNOS */, 76 /* X86_32_WINDOWS */, 92 /* LP64_UNIX */, 92 /* X86_64_WINDOWS */ };
  private static final int[] MaxEyeFov_size = new int[] { 32 /* ARM_MIPS_32 */, 32 /* X86_32_UNIX */, 32 /* X86_32_MACOS */, 32 /* PPC_32_UNIX */, 32 /* SPARC_32_SUNOS */, 32 /* X86_32_WINDOWS */, 32 /* LP64_UNIX */, 32 /* X86_64_WINDOWS */  };
  private static final int[] EyeRenderOrder_offset = new int[] { 108 /* ARM_MIPS_32 */, 108 /* X86_32_UNIX */, 108 /* X86_32_MACOS */, 108 /* PPC_32_UNIX */, 108 /* SPARC_32_SUNOS */, 108 /* X86_32_WINDOWS */, 124 /* LP64_UNIX */, 124 /* X86_64_WINDOWS */ };
  private static final int[] EyeRenderOrder_size = new int[] { 8 /* ARM_MIPS_32 */, 8 /* X86_32_UNIX */, 8 /* X86_32_MACOS */, 8 /* PPC_32_UNIX */, 8 /* SPARC_32_SUNOS */, 8 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };
  private static final int[] DisplayDeviceName_offset = new int[] { 116 /* ARM_MIPS_32 */, 116 /* X86_32_UNIX */, 116 /* X86_32_MACOS */, 116 /* PPC_32_UNIX */, 116 /* SPARC_32_SUNOS */, 116 /* X86_32_WINDOWS */, 136 /* LP64_UNIX */, 136 /* X86_64_WINDOWS */ };
//private static final int[] DisplayDeviceName_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 8 /* LP64_UNIX */, 8 /* X86_64_WINDOWS */  };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, ], descriptor 'ANON_NIO']
  private static final int[] DisplayId_offset = new int[] { 120 /* ARM_MIPS_32 */, 120 /* X86_32_UNIX */, 120 /* X86_32_MACOS */, 120 /* PPC_32_UNIX */, 120 /* SPARC_32_SUNOS */, 120 /* X86_32_WINDOWS */, 144 /* LP64_UNIX */, 144 /* X86_64_WINDOWS */ };
//private static final int[] DisplayId_size = new int[] { 4 /* ARM_MIPS_32 */, 4 /* X86_32_UNIX */, 4 /* X86_32_MACOS */, 4 /* PPC_32_UNIX */, 4 /* SPARC_32_SUNOS */, 4 /* X86_32_WINDOWS */, 4 /* LP64_UNIX */, 4 /* X86_64_WINDOWS */  };

  public static int size() {
    return ovrHmdDesc_size[mdIdx];
  }

  public static ovrHmdDesc create() {
    return create(Buffers.newDirectByteBuffer(size()));
  }

  public static ovrHmdDesc create(java.nio.ByteBuffer buf) {
      return new ovrHmdDesc(buf);
  }

  ovrHmdDesc(java.nio.ByteBuffer buf) {
    md = MachineDataInfo.StaticConfig.values()[mdIdx].md;
    accessor = new StructAccessor(buf);
  }

  public java.nio.ByteBuffer getBuffer() {
    return accessor.getBuffer();
  }

  // SKIP setter for complex-pointer type in struct: ovrHmdDesc.Handle: CType[(PointerType) typedef 'ovrHmd' -> (OvrHmdContext) * , size [fixed false, lnx64 8], [const[false], pointer*1]]

  /** Entry point to C language function: ovrHmd getHandle(ovrHmdDesc * const  this0, const int32_t elem_offset)
, covering an array of length 1 */ private native ByteBuffer getHandle0(ByteBuffer jthis0, int elem_offset); /** Getter for native field Handle: CType[(PointerType) typedef 'ovrHmd' -> (OvrHmdContext) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of 1 */ public OvrHmdContext getHandle() { final ByteBuffer source = getBuffer(); final ByteBuffer _res = getHandle0(source, 0); if (_res == null) return null; return OvrHmdContext.create(_res); } /** Setter for native field Type: CType[(EnumType) typedef 'ovrHmdType', size [fixed true, lnx64 4], [const[type , false], enum [const ] {6: ovrHmd_None = 0, ovrHmd_DK1 = 3, ovrHmd_DKHD = 4, ovrHmd_CrystalCoveProto = 5, ovrHmd_DK2 = 6, ovrHmd_Other = 7, }, int]] */ public ovrHmdDesc setType(int val) { accessor.setIntAt(Type_offset[mdIdx], val); return this; } /** Getter for native field Type: CType[(EnumType) typedef 'ovrHmdType', size [fixed true, lnx64 4], [const[type , false], enum [const ] {6: ovrHmd_None = 0, ovrHmd_DK1 = 3, ovrHmd_DKHD = 4, ovrHmd_CrystalCoveProto = 5, ovrHmd_DK2 = 6, ovrHmd_Other = 7, }, int]] */ public int getType() { return accessor.getIntAt(Type_offset[mdIdx]); } /** Entry point to C language function: const char * getProductName(ovrHmdDesc * const this0, const int32_t arrayLength)
, covering an array of length getCStringLengthImpl(pString)+1 */ private native ByteBuffer getProductName0(ByteBuffer jthis0, int arrayLength); /** Getter for native field ProductName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public ByteBuffer getProductName() { final int arrayLength = getProductNameArrayLength(); final ByteBuffer _res = getProductName0(getBuffer(), arrayLength); if (_res == null) return null; return Buffers.nativeOrder(_res); } /** Getter for native field ProductName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public String getProductNameAsString() { final int arrayLength = getProductNameArrayLength(); final ByteBuffer bb = getProductName0(getBuffer(), arrayLength); if (bb == null) return null; final byte[] ba = new byte[arrayLength]; int i = -1; while( ++i < arrayLength ) { ba[i] = bb.get(i); if( (byte)0 == ba[i] ) break; } return new String(ba, 0, i); } /** Getter for native field ProductName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public final int getProductNameArrayLength() { final long pString = PointerBuffer.wrap( accessor.slice(ProductName_offset[mdIdx], PointerBuffer.ELEMENT_SIZE) ).get(0); return getCStringLengthImpl(pString)+1; } /** Entry point to C language function: const char * getManufacturer(ovrHmdDesc * const this0, const int32_t arrayLength)
, covering an array of length getCStringLengthImpl(pString)+1 */ private native ByteBuffer getManufacturer0(ByteBuffer jthis0, int arrayLength); /** Getter for native field Manufacturer: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public ByteBuffer getManufacturer() { final int arrayLength = getManufacturerArrayLength(); final ByteBuffer _res = getManufacturer0(getBuffer(), arrayLength); if (_res == null) return null; return Buffers.nativeOrder(_res); } /** Getter for native field Manufacturer: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public String getManufacturerAsString() { final int arrayLength = getManufacturerArrayLength(); final ByteBuffer bb = getManufacturer0(getBuffer(), arrayLength); if (bb == null) return null; final byte[] ba = new byte[arrayLength]; int i = -1; while( ++i < arrayLength ) { ba[i] = bb.get(i); if( (byte)0 == ba[i] ) break; } return new String(ba, 0, i); } /** Getter for native field Manufacturer: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public final int getManufacturerArrayLength() { final long pString = PointerBuffer.wrap( accessor.slice(Manufacturer_offset[mdIdx], PointerBuffer.ELEMENT_SIZE) ).get(0); return getCStringLengthImpl(pString)+1; } /** Setter for native field HmdCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public ovrHmdDesc setHmdCaps(int val) { accessor.setIntAt(HmdCaps_offset[mdIdx], val, md.intSizeInBytes()); return this; } /** Getter for native field HmdCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public int getHmdCaps() { return accessor.getIntAt(HmdCaps_offset[mdIdx], md.intSizeInBytes()); } /** Setter for native field SensorCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public ovrHmdDesc setSensorCaps(int val) { accessor.setIntAt(SensorCaps_offset[mdIdx], val, md.intSizeInBytes()); return this; } /** Getter for native field SensorCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public int getSensorCaps() { return accessor.getIntAt(SensorCaps_offset[mdIdx], md.intSizeInBytes()); } /** Setter for native field DistortionCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public ovrHmdDesc setDistortionCaps(int val) { accessor.setIntAt(DistortionCaps_offset[mdIdx], val, md.intSizeInBytes()); return this; } /** Getter for native field DistortionCaps: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public int getDistortionCaps() { return accessor.getIntAt(DistortionCaps_offset[mdIdx], md.intSizeInBytes()); } /** Getter for native field Resolution: CType[(StructType) typedef 'ovrSizei', size [fixed false, lnx64 8], [const[false], struct{ovrSizei_: 2, }]] */ public ovrSizei getResolution() { return ovrSizei.create( accessor.slice( Resolution_offset[mdIdx], Resolution_size[mdIdx] ) ); } /** Getter for native field WindowsPos: CType[(StructType) typedef 'ovrVector2i', size [fixed false, lnx64 8], [const[false], struct{ovrVector2i_: 2, }]] */ public ovrVector2i getWindowsPos() { return ovrVector2i.create( accessor.slice( WindowsPos_offset[mdIdx], WindowsPos_size[mdIdx] ) ); } /** Getter for native field DefaultEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public static final int getDefaultEyeFovArrayLength() { return 2; } /** Setter for native field DefaultEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrHmdDesc setDefaultEyeFov(final int offset, ovrFovPort[] val) { final int arrayLength = 2; if( offset + val.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + val.length "+val.length+" > array-length "+arrayLength); }; final int elemSize = ovrFovPort.size(); final ByteBuffer destB = getBuffer(); final int bTotal = arrayLength * elemSize; if( bTotal > DefaultEyeFov_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+DefaultEyeFov_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); }; int bOffset = DefaultEyeFov_offset[mdIdx]; final int bLimes = bOffset + bTotal; if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); }; bOffset += elemSize * offset; for(int index=0; index= bLimes ) { throw new IndexOutOfBoundsException("elem-byte["+(offset+index)+"]["+f+"]: bOffset "+bOffset+" >= bLimes "+bLimes+", elemSize "+elemSize+" * "+arrayLength); }; destB.put(bOffset++, sourceB.get(f)); } } return this; } /** Setter for native field DefaultEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrHmdDesc setDefaultEyeFov(final int index, ovrFovPort val) { final int arrayLength = 2; final int elemSize = ovrFovPort.size(); final ByteBuffer destB = getBuffer(); final int bTotal = arrayLength * elemSize; if( bTotal > DefaultEyeFov_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+DefaultEyeFov_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); }; int bOffset = DefaultEyeFov_offset[mdIdx]; final int bLimes = bOffset + bTotal; if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); }; bOffset += elemSize * index; final ByteBuffer sourceB = val.getBuffer(); for(int f=0; f= bLimes ) { throw new IndexOutOfBoundsException("elem-byte["+index+"]["+f+"]: bOffset "+bOffset+" >= bLimes "+bLimes+", elemSize "+elemSize+" * "+arrayLength); }; destB.put(bOffset++, sourceB.get(f)); } return this; } /** Getter for native field DefaultEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrFovPort[] getDefaultEyeFov(final int offset, ovrFovPort result[]) { final int arrayLength = 2; if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); }; final int elemSize = ovrFovPort.size(); int bOffset = DefaultEyeFov_offset[mdIdx] + ( elemSize * offset ); for(int index=0; indexMaxEyeFov
: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public static final int getMaxEyeFovArrayLength() { return 2; } /** Setter for native field MaxEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrHmdDesc setMaxEyeFov(final int offset, ovrFovPort[] val) { final int arrayLength = 2; if( offset + val.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + val.length "+val.length+" > array-length "+arrayLength); }; final int elemSize = ovrFovPort.size(); final ByteBuffer destB = getBuffer(); final int bTotal = arrayLength * elemSize; if( bTotal > MaxEyeFov_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+MaxEyeFov_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); }; int bOffset = MaxEyeFov_offset[mdIdx]; final int bLimes = bOffset + bTotal; if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); }; bOffset += elemSize * offset; for(int index=0; index= bLimes ) { throw new IndexOutOfBoundsException("elem-byte["+(offset+index)+"]["+f+"]: bOffset "+bOffset+" >= bLimes "+bLimes+", elemSize "+elemSize+" * "+arrayLength); }; destB.put(bOffset++, sourceB.get(f)); } } return this; } /** Setter for native field MaxEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrHmdDesc setMaxEyeFov(final int index, ovrFovPort val) { final int arrayLength = 2; final int elemSize = ovrFovPort.size(); final ByteBuffer destB = getBuffer(); final int bTotal = arrayLength * elemSize; if( bTotal > MaxEyeFov_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+MaxEyeFov_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); }; int bOffset = MaxEyeFov_offset[mdIdx]; final int bLimes = bOffset + bTotal; if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); }; bOffset += elemSize * index; final ByteBuffer sourceB = val.getBuffer(); for(int f=0; f= bLimes ) { throw new IndexOutOfBoundsException("elem-byte["+index+"]["+f+"]: bOffset "+bOffset+" >= bLimes "+bLimes+", elemSize "+elemSize+" * "+arrayLength); }; destB.put(bOffset++, sourceB.get(f)); } return this; } /** Getter for native field MaxEyeFov: CType[(ArrayType) 'ovrFovPort *', size [fixed false, lnx64 32], [const[false], array*1]], with array length of 2 */ public ovrFovPort[] getMaxEyeFov(final int offset, ovrFovPort result[]) { final int arrayLength = 2; if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); }; final int elemSize = ovrFovPort.size(); int bOffset = MaxEyeFov_offset[mdIdx] + ( elemSize * offset ); for(int index=0; indexEyeRenderOrder: CType[(ArrayType) 'ovrEyeType *', size [fixed false, lnx64 8], [const[false], array*1]], with array length of 2 */ public static final int getEyeRenderOrderArrayLength() { return 2; } /** Setter for native field EyeRenderOrder: CType[(ArrayType) 'ovrEyeType *', size [fixed false, lnx64 8], [const[false], array*1]], with array length of 2 */ public ovrHmdDesc setEyeRenderOrder(final int offset, int[] val) { final int arrayLength = 2; if( offset + val.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + val.length "+val.length+" > array-length "+arrayLength); }; final int elemSize = Buffers.SIZEOF_INT; final ByteBuffer destB = getBuffer(); final int bTotal = arrayLength * elemSize; if( bTotal > EyeRenderOrder_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+EyeRenderOrder_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); }; int bOffset = EyeRenderOrder_offset[mdIdx]; final int bLimes = bOffset + bTotal; if( bLimes > destB.limit() ) { throw new IndexOutOfBoundsException("bLimes "+bLimes+" > buffer.limit "+destB.limit()+", elemOff "+bOffset+", elemSize "+elemSize+" * "+arrayLength); }; bOffset += elemSize * offset; accessor.setIntsAt(bOffset, val); return this; } /** Getter for native field EyeRenderOrder: CType[(ArrayType) 'ovrEyeType *', size [fixed false, lnx64 8], [const[false], array*1]], with array length of 2 */ public IntBuffer getEyeRenderOrder() { return accessor.slice(EyeRenderOrder_offset[mdIdx], Buffers.SIZEOF_INT * 2).asIntBuffer(); } /** Getter for native field EyeRenderOrder: CType[(ArrayType) 'ovrEyeType *', size [fixed false, lnx64 8], [const[false], array*1]], with array length of 2 */ public int[] getEyeRenderOrder(final int offset, int result[]) { final int arrayLength = 2; if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); }; return accessor.getIntsAt(EyeRenderOrder_offset[mdIdx] + (Buffers.SIZEOF_INT * offset), result); } /** Entry point to C language function: const char * getDisplayDeviceName(ovrHmdDesc * const this0, const int32_t arrayLength)
, covering an array of length getCStringLengthImpl(pString)+1 */ private native ByteBuffer getDisplayDeviceName0(ByteBuffer jthis0, int arrayLength); /** Getter for native field DisplayDeviceName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public ByteBuffer getDisplayDeviceName() { final int arrayLength = getDisplayDeviceNameArrayLength(); final ByteBuffer _res = getDisplayDeviceName0(getBuffer(), arrayLength); if (_res == null) return null; return Buffers.nativeOrder(_res); } /** Getter for native field DisplayDeviceName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public String getDisplayDeviceNameAsString() { final int arrayLength = getDisplayDeviceNameArrayLength(); final ByteBuffer bb = getDisplayDeviceName0(getBuffer(), arrayLength); if (bb == null) return null; final byte[] ba = new byte[arrayLength]; int i = -1; while( ++i < arrayLength ) { ba[i] = bb.get(i); if( (byte)0 == ba[i] ) break; } return new String(ba, 0, i); } /** Getter for native field DisplayDeviceName: CType[(PointerType) 'char *' -> (const char) * , size [fixed false, lnx64 8], [const[false], pointer*1]], with array length of getCStringLengthImpl(pString)+1 */ public final int getDisplayDeviceNameArrayLength() { final long pString = PointerBuffer.wrap( accessor.slice(DisplayDeviceName_offset[mdIdx], PointerBuffer.ELEMENT_SIZE) ).get(0); return getCStringLengthImpl(pString)+1; } /** Setter for native field DisplayId: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public ovrHmdDesc setDisplayId(int val) { accessor.setIntAt(DisplayId_offset[mdIdx], val, md.intSizeInBytes()); return this; } /** Getter for native field DisplayId: CType[(IntType) 'int', size [fixed false, lnx64 4], [const[false], int]] */ public int getDisplayId() { return accessor.getIntAt(DisplayId_offset[mdIdx], md.intSizeInBytes()); } private static native boolean initializeImpl(); private static native int getCStringLengthImpl(final long pString); static { if( !initializeImpl() ) { throw new RuntimeException("Initialization failure"); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy