
com.jogamp.oculusvr.ovrHmdDesc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jogl-all Show documentation
Show all versions of jogl-all Show documentation
Java™ Binding for the OpenGL® API
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Thu Aug 07 00:34:50 CEST 2014 ----! */ 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.MachineDescriptionRuntime; import com.jogamp.oculusvr.*; import java.security.AccessController; import java.security.PrivilegedAction; public class ovrHmdDesc { StructAccessor accessor; private static final int mdIdx = MachineDescriptionRuntime.getStatic().ordinal(); private static final int[] ovrHmdDesc_size = new int[] { 124 /* ARMle_EABI */, 124 /* X86_32_UNIX */, 152 /* X86_64_UNIX */, 124 /* X86_32_MACOS */, 124 /* X86_32_WINDOWS */, 152 /* X86_64_WINDOWS */, 124 /* SPARC_32_SUNOS */ }; private static final int[] Handle_offset = new int[] { 0 /* ARMle_EABI */, 0 /* X86_32_UNIX */, 0 /* X86_64_UNIX */, 0 /* X86_32_MACOS */, 0 /* X86_32_WINDOWS */, 0 /* X86_64_WINDOWS */, 0 /* SPARC_32_SUNOS */ }; //private static final int[] Handle_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ };// JType[OvrHmdContext / 'OvrHmdContext', is[compound, descriptor 'LOvrHmdContext;' private static final int[] Type_offset = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; //private static final int[] Type_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; private static final int[] ProductName_offset = new int[] { 8 /* ARMle_EABI */, 8 /* X86_32_UNIX */, 16 /* X86_64_UNIX */, 8 /* X86_32_MACOS */, 8 /* X86_32_WINDOWS */, 16 /* X86_64_WINDOWS */, 8 /* SPARC_32_SUNOS */ }; //private static final int[] ProductName_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, descriptor 'ANON_NIO' private static final int[] Manufacturer_offset = new int[] { 12 /* ARMle_EABI */, 12 /* X86_32_UNIX */, 24 /* X86_64_UNIX */, 12 /* X86_32_MACOS */, 12 /* X86_32_WINDOWS */, 24 /* X86_64_WINDOWS */, 12 /* SPARC_32_SUNOS */ }; //private static final int[] Manufacturer_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, descriptor 'ANON_NIO' private static final int[] HmdCaps_offset = new int[] { 16 /* ARMle_EABI */, 16 /* X86_32_UNIX */, 32 /* X86_64_UNIX */, 16 /* X86_32_MACOS */, 16 /* X86_32_WINDOWS */, 32 /* X86_64_WINDOWS */, 16 /* SPARC_32_SUNOS */ }; //private static final int[] HmdCaps_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; private static final int[] SensorCaps_offset = new int[] { 20 /* ARMle_EABI */, 20 /* X86_32_UNIX */, 36 /* X86_64_UNIX */, 20 /* X86_32_MACOS */, 20 /* X86_32_WINDOWS */, 36 /* X86_64_WINDOWS */, 20 /* SPARC_32_SUNOS */ }; //private static final int[] SensorCaps_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; private static final int[] DistortionCaps_offset = new int[] { 24 /* ARMle_EABI */, 24 /* X86_32_UNIX */, 40 /* X86_64_UNIX */, 24 /* X86_32_MACOS */, 24 /* X86_32_WINDOWS */, 40 /* X86_64_WINDOWS */, 24 /* SPARC_32_SUNOS */ }; //private static final int[] DistortionCaps_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; private static final int[] Resolution_offset = new int[] { 28 /* ARMle_EABI */, 28 /* X86_32_UNIX */, 44 /* X86_64_UNIX */, 28 /* X86_32_MACOS */, 28 /* X86_32_WINDOWS */, 44 /* X86_64_WINDOWS */, 28 /* SPARC_32_SUNOS */ }; private static final int[] Resolution_size = new int[] { 8 /* ARMle_EABI */, 8 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 8 /* X86_32_MACOS */, 8 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 8 /* SPARC_32_SUNOS */ }; private static final int[] WindowsPos_offset = new int[] { 36 /* ARMle_EABI */, 36 /* X86_32_UNIX */, 52 /* X86_64_UNIX */, 36 /* X86_32_MACOS */, 36 /* X86_32_WINDOWS */, 52 /* X86_64_WINDOWS */, 36 /* SPARC_32_SUNOS */ }; private static final int[] WindowsPos_size = new int[] { 8 /* ARMle_EABI */, 8 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 8 /* X86_32_MACOS */, 8 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 8 /* SPARC_32_SUNOS */ }; private static final int[] DefaultEyeFov_offset = new int[] { 44 /* ARMle_EABI */, 44 /* X86_32_UNIX */, 60 /* X86_64_UNIX */, 44 /* X86_32_MACOS */, 44 /* X86_32_WINDOWS */, 60 /* X86_64_WINDOWS */, 44 /* SPARC_32_SUNOS */ }; private static final int[] DefaultEyeFov_size = new int[] { 32 /* ARMle_EABI */, 32 /* X86_32_UNIX */, 32 /* X86_64_UNIX */, 32 /* X86_32_MACOS */, 32 /* X86_32_WINDOWS */, 32 /* X86_64_WINDOWS */, 32 /* SPARC_32_SUNOS */ }; private static final int[] MaxEyeFov_offset = new int[] { 76 /* ARMle_EABI */, 76 /* X86_32_UNIX */, 92 /* X86_64_UNIX */, 76 /* X86_32_MACOS */, 76 /* X86_32_WINDOWS */, 92 /* X86_64_WINDOWS */, 76 /* SPARC_32_SUNOS */ }; private static final int[] MaxEyeFov_size = new int[] { 32 /* ARMle_EABI */, 32 /* X86_32_UNIX */, 32 /* X86_64_UNIX */, 32 /* X86_32_MACOS */, 32 /* X86_32_WINDOWS */, 32 /* X86_64_WINDOWS */, 32 /* SPARC_32_SUNOS */ }; private static final int[] EyeRenderOrder_offset = new int[] { 108 /* ARMle_EABI */, 108 /* X86_32_UNIX */, 124 /* X86_64_UNIX */, 108 /* X86_32_MACOS */, 108 /* X86_32_WINDOWS */, 124 /* X86_64_WINDOWS */, 108 /* SPARC_32_SUNOS */ }; private static final int[] EyeRenderOrder_size = new int[] { 8 /* ARMle_EABI */, 8 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 8 /* X86_32_MACOS */, 8 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 8 /* SPARC_32_SUNOS */ }; private static final int[] DisplayDeviceName_offset = new int[] { 116 /* ARMle_EABI */, 116 /* X86_32_UNIX */, 136 /* X86_64_UNIX */, 116 /* X86_32_MACOS */, 116 /* X86_32_WINDOWS */, 136 /* X86_64_WINDOWS */, 116 /* SPARC_32_SUNOS */ }; //private static final int[] DisplayDeviceName_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ };// JType[ANON / NIL, primitivePointerType = CHAR, is[C-Primitive-Pointer, descriptor 'ANON_NIO' private static final int[] DisplayId_offset = new int[] { 120 /* ARMle_EABI */, 120 /* X86_32_UNIX */, 144 /* X86_64_UNIX */, 120 /* X86_32_MACOS */, 120 /* X86_32_WINDOWS */, 144 /* X86_64_WINDOWS */, 120 /* SPARC_32_SUNOS */ }; //private static final int[] DisplayId_size = new int[] { 4 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 4 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 4 /* X86_32_WINDOWS */, 4 /* X86_64_WINDOWS */, 4 /* SPARC_32_SUNOS */ }; 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) { accessor = new StructAccessor(buf); } public java.nio.ByteBuffer getBuffer() { return accessor.getBuffer(); } // SKIP setter for complex-pointer type in struct: ovrHmdDesc.Handle: CType['ovrHmd' (typedef), size [fixed false, lnx64 8], [pointer*1]] /** Entry point to C language function:
*/ public final int getMaxEyeFovArrayLength() { return 2; } /** Setter for native field: CType['ovrFovPort *', size [fixed false, lnx64 32], [array*1]], with array length ofovrHmd getHandle(ovrHmdDesc * const this0, const int32_t elem_offset)
, covering an array of length1
*/ private native ByteBuffer getHandle0(ByteBuffer jthis0, int elem_offset); /** Getter for native field: CType['ovrHmd' (typedef), size [fixed false, lnx64 8], [pointer*1]], with array length of1
*/ 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: CType['ovrHmdType', size [fixed true, lnx64 4], [enum, int]] */ public ovrHmdDesc setType(int val) { accessor.setIntAt(Type_offset[mdIdx], val); return this; } /** Getter for native field: CType['ovrHmdType', size [fixed true, lnx64 4], [enum, 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 lengthgetCStringLengthImpl(pString)+1
*/ private native ByteBuffer getProductName0(ByteBuffer jthis0, int arrayLength); /** Getter for native field: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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 lengthgetCStringLengthImpl(pString)+1
*/ private native ByteBuffer getManufacturer0(ByteBuffer jthis0, int arrayLength); /** Getter for native field: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['int', size [fixed false, lnx64 4], [int]] */ public ovrHmdDesc setHmdCaps(int val) { accessor.setIntAt(HmdCaps_offset[mdIdx], val, MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); return this; } /** Getter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public int getHmdCaps() { return accessor.getIntAt(HmdCaps_offset[mdIdx], MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); } /** Setter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public ovrHmdDesc setSensorCaps(int val) { accessor.setIntAt(SensorCaps_offset[mdIdx], val, MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); return this; } /** Getter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public int getSensorCaps() { return accessor.getIntAt(SensorCaps_offset[mdIdx], MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); } /** Setter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public ovrHmdDesc setDistortionCaps(int val) { accessor.setIntAt(DistortionCaps_offset[mdIdx], val, MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); return this; } /** Getter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public int getDistortionCaps() { return accessor.getIntAt(DistortionCaps_offset[mdIdx], MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); } /** Getter for native field: CType['ovrSizei' (typedef), size [fixed false, lnx64 8], [struct{2}]] */ public ovrSizei getResolution() { return ovrSizei.create( accessor.slice( Resolution_offset[mdIdx], Resolution_size[mdIdx] ) ); } /** Getter for native field: CType['ovrVector2i' (typedef), size [fixed false, lnx64 8], [struct{2}]] */ public ovrVector2i getWindowsPos() { return ovrVector2i.create( accessor.slice( WindowsPos_offset[mdIdx], WindowsPos_size[mdIdx] ) ); } /** Getter for native field: CType['ovrFovPort *', size [fixed false, lnx64 32], [array*1]], with array length of2
*/ public final int getDefaultEyeFovArrayLength() { return 2; } /** Setter for native field: CType['ovrFovPort *', size [fixed false, lnx64 32], [array*1]], with array length of2
*/ 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: CType['ovrFovPort *', size [fixed false, lnx64 32], [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: CType['ovrFovPort *', size [fixed false, lnx64 32], [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; index2 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: CType['ovrFovPort *', size [fixed false, lnx64 32], [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: CType['ovrFovPort *', size [fixed false, lnx64 32], [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; index2 */ public final int getEyeRenderOrderArrayLength() { return 2; } /** Setter for native field: CType['ovrEyeType *', size [fixed false, lnx64 8], [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: CType['ovrEyeType *', size [fixed false, lnx64 8], [array*1]], with array length of2
*/ public IntBuffer getEyeRenderOrder() { return accessor.slice(EyeRenderOrder_offset[mdIdx], Buffers.SIZEOF_INT * 2).asIntBuffer(); } /** Getter for native field: CType['ovrEyeType *', size [fixed false, lnx64 8], [array*1]], with array length of2
*/ 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 lengthgetCStringLengthImpl(pString)+1
*/ private native ByteBuffer getDisplayDeviceName0(ByteBuffer jthis0, int arrayLength); /** Getter for native field: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['char *', size [fixed false, lnx64 8], [pointer*1]], with array length ofgetCStringLengthImpl(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: CType['int', size [fixed false, lnx64 4], [int]] */ public ovrHmdDesc setDisplayId(int val) { accessor.setIntAt(DisplayId_offset[mdIdx], val, MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); return this; } /** Getter for native field: CType['int', size [fixed false, lnx64 4], [int]] */ public int getDisplayId() { return accessor.getIntAt(DisplayId_offset[mdIdx], MachineDescriptionRuntime.getStatic().md.intSizeInBytes()); } private static native boolean initializeImpl(); private static native int getCStringLengthImpl(final long pString); static { if( !initializeImpl() ) { throw new RuntimeException("Initialization failure"); } } }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy