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

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

There is a newer version: 2.3.2
Show newest version
/* !---- 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 ovrFrameTiming {

  StructAccessor accessor;

  private static final int mdIdx = MachineDescriptionRuntime.getStatic().ordinal();

  private static final int[] ovrFrameTiming_size = new int[] { 56 /* ARMle_EABI */, 52 /* X86_32_UNIX */, 56 /* X86_64_UNIX */, 52 /* X86_32_MACOS */, 56 /* X86_32_WINDOWS */, 56 /* X86_64_WINDOWS */, 56 /* SPARC_32_SUNOS */  };
  private static final int[] DeltaSeconds_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[] DeltaSeconds_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[] ThisFrameSeconds_offset = new int[] { 8 /* ARMle_EABI */, 4 /* X86_32_UNIX */, 8 /* X86_64_UNIX */, 4 /* X86_32_MACOS */, 8 /* X86_32_WINDOWS */, 8 /* X86_64_WINDOWS */, 8 /* SPARC_32_SUNOS */ };
//private static final int[] ThisFrameSeconds_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[] TimewarpPointSeconds_offset = new int[] { 16 /* ARMle_EABI */, 12 /* X86_32_UNIX */, 16 /* X86_64_UNIX */, 12 /* X86_32_MACOS */, 16 /* X86_32_WINDOWS */, 16 /* X86_64_WINDOWS */, 16 /* SPARC_32_SUNOS */ };
//private static final int[] TimewarpPointSeconds_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[] NextFrameSeconds_offset = new int[] { 24 /* ARMle_EABI */, 20 /* X86_32_UNIX */, 24 /* X86_64_UNIX */, 20 /* X86_32_MACOS */, 24 /* X86_32_WINDOWS */, 24 /* X86_64_WINDOWS */, 24 /* SPARC_32_SUNOS */ };
//private static final int[] NextFrameSeconds_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[] ScanoutMidpointSeconds_offset = new int[] { 32 /* ARMle_EABI */, 28 /* X86_32_UNIX */, 32 /* X86_64_UNIX */, 28 /* X86_32_MACOS */, 32 /* X86_32_WINDOWS */, 32 /* X86_64_WINDOWS */, 32 /* SPARC_32_SUNOS */ };
//private static final int[] ScanoutMidpointSeconds_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[] EyeScanoutSeconds_offset = new int[] { 40 /* ARMle_EABI */, 36 /* X86_32_UNIX */, 40 /* X86_64_UNIX */, 36 /* X86_32_MACOS */, 40 /* X86_32_WINDOWS */, 40 /* X86_64_WINDOWS */, 40 /* SPARC_32_SUNOS */ };
  private static final int[] EyeScanoutSeconds_size = new int[] { 16 /* ARMle_EABI */, 16 /* X86_32_UNIX */, 16 /* X86_64_UNIX */, 16 /* X86_32_MACOS */, 16 /* X86_32_WINDOWS */, 16 /* X86_64_WINDOWS */, 16 /* SPARC_32_SUNOS */  };

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

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

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

  ovrFrameTiming(java.nio.ByteBuffer buf) {
    accessor = new StructAccessor(buf);
  }

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

  /** Setter for native field: CType['float', size [fixed true, lnx64 4], [float]] */
  public ovrFrameTiming setDeltaSeconds(float val) {
    accessor.setFloatAt(DeltaSeconds_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field: CType['float', size [fixed true, lnx64 4], [float]] */
  public float getDeltaSeconds() {
    return accessor.getFloatAt(DeltaSeconds_offset[mdIdx]);
  }

  /** Setter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public ovrFrameTiming setThisFrameSeconds(double val) {
    accessor.setDoubleAt(ThisFrameSeconds_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public double getThisFrameSeconds() {
    return accessor.getDoubleAt(ThisFrameSeconds_offset[mdIdx]);
  }

  /** Setter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public ovrFrameTiming setTimewarpPointSeconds(double val) {
    accessor.setDoubleAt(TimewarpPointSeconds_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public double getTimewarpPointSeconds() {
    return accessor.getDoubleAt(TimewarpPointSeconds_offset[mdIdx]);
  }

  /** Setter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public ovrFrameTiming setNextFrameSeconds(double val) {
    accessor.setDoubleAt(NextFrameSeconds_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public double getNextFrameSeconds() {
    return accessor.getDoubleAt(NextFrameSeconds_offset[mdIdx]);
  }

  /** Setter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public ovrFrameTiming setScanoutMidpointSeconds(double val) {
    accessor.setDoubleAt(ScanoutMidpointSeconds_offset[mdIdx], val);
    return this;
  }

  /** Getter for native field: CType['double', size [fixed true, lnx64 8], [double]] */
  public double getScanoutMidpointSeconds() {
    return accessor.getDoubleAt(ScanoutMidpointSeconds_offset[mdIdx]);
  }

  /** Getter for native field: CType['double *', size [fixed false, lnx64 16], [array*1]], with array length of 2 */
  public final int getEyeScanoutSecondsArrayLength() {
    return 2;
  }

  /** Setter for native field: CType['double *', size [fixed false, lnx64 16], [array*1]], with array length of 2 */
  public ovrFrameTiming setEyeScanoutSeconds(final int offset, double[] 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_DOUBLE;
    final ByteBuffer destB = getBuffer();
    final int bTotal = arrayLength * elemSize;
    if( bTotal > EyeScanoutSeconds_size[mdIdx] ) { throw new IndexOutOfBoundsException("bTotal "+bTotal+" > size "+EyeScanoutSeconds_size[mdIdx]+", elemSize "+elemSize+" * "+arrayLength); };
    int bOffset = EyeScanoutSeconds_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.setDoublesAt(bOffset, val);
    return this;
  }

  /** Getter for native field: CType['double *', size [fixed false, lnx64 16], [array*1]], with array length of 2 */
  public DoubleBuffer getEyeScanoutSeconds() {
    return accessor.slice(EyeScanoutSeconds_offset[mdIdx],  Buffers.SIZEOF_DOUBLE * 2).asDoubleBuffer();
  }

  /** Getter for native field: CType['double *', size [fixed false, lnx64 16], [array*1]], with array length of 2 */
  public double[] getEyeScanoutSeconds(final int offset, double result[]) {
    final int arrayLength = 2;
    if( offset + result.length > arrayLength ) { throw new IndexOutOfBoundsException("offset "+offset+" + result.length "+result.length+" > array-length "+arrayLength); };
    return accessor.getDoublesAt(EyeScanoutSeconds_offset[mdIdx] + (Buffers.SIZEOF_DOUBLE * offset), result);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy