aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/demos/julia3d/structs/Vec.java
blob: d4b2d48c172f604de003f2a94dabb87e2a7bf338 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* !---- DO NOT EDIT: This file autogenerated by com/sun/gluegen/JavaEmitter.java on Tue Feb 09 18:20:26 CET 2010 ----! */


package com.jogamp.opencl.demos.julia3d.structs;


import com.jogamp.common.nio.*;


public abstract class Vec {

  StructAccessor accessor;

  public static int size() {
//    if (CPU.is32Bit()) {
//      return Vec32.size();
//    } else {
      return Vec64.size();
//    }
  }

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

  public static Vec create(java.nio.ByteBuffer buf) {
//    if (CPU.is32Bit()) {
//      return new Vec32(buf);
//    } else {
      return new Vec64(buf);
//    }
  }

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

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

  public abstract Vec setX(float val);

  public abstract float getX();

  public abstract Vec setY(float val);

  public abstract float getY();

  public abstract Vec setZ(float val);

  public abstract float getZ();
}