Skip to content

Commit e78c17e

Browse files
committed
renaming classes in VR library
1 parent 5466625 commit e78c17e

File tree

9 files changed

+28
-29
lines changed

9 files changed

+28
-29
lines changed

core/src/processing/core/PConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public interface PConstants {
4949
static final String P2DX = "processing.opengl.PGraphics2DX";
5050
static final String P3D = "processing.opengl.PGraphics3D";
5151
static final String OPENGL = P3D;
52-
static final String STEREO = "processing.vr.PGraphicsVRStereo";
53-
static final String MONO = "processing.vr.PGraphicsVRMono";
52+
static final String STEREO = "processing.vr.VRGraphicsStereo";
53+
static final String MONO = "processing.vr.VRPGraphicsMono";
5454
static final String VR = STEREO;
5555
static final String AR = "processing.ar.ARGraphics";
5656
static final String ARCORE = AR;

mode/libraries/ar/library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name = AR
2-
authorList = Syam Sundar K
2+
authorList = The Processing Foundation, Syam Sundar K
33
url = http://android.processing.org
44
category = 3D
55
sentence = Renderer to develop AR apps
66
paragraph =
7-
version = 8
8-
prettyVersion = 0.9.5
7+
version = 9
8+
prettyVersion = 0.9.9
99
minRevision = 248
1010
maxRevision = 0

mode/libraries/vr/library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ url = http://android.processing.org
44
category = 3D
55
sentence = Renderer to develop VR apps
66
paragraph =
7-
version = 9
8-
prettyVersion = 1.0.0
7+
version = 10
8+
prettyVersion = 1.9.0
99
minRevision = 248
1010
maxRevision = 0

mode/libraries/vr/src/processing/vr/PVR.java renamed to mode/libraries/vr/src/processing/vr/VRActivity.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,31 @@
2323
package processing.vr;
2424

2525
import com.google.vr.sdk.base.GvrActivity;
26-
import com.google.vr.sdk.base.Eye;
2726

2827
import android.content.Intent;
2928
import android.util.DisplayMetrics;
3029
import processing.android.AppComponent;
3130
import processing.android.ServiceEngine;
3231
import processing.core.PApplet;
3332

34-
public class PVR extends GvrActivity implements AppComponent {
35-
public static final int LEFT = Eye.Type.LEFT;
36-
public static final int RIGHT = Eye.Type.RIGHT;
37-
public static final int MONOCULAR = Eye.Type.MONOCULAR;
38-
33+
public class VRActivity extends GvrActivity implements AppComponent {
3934
static public final int GVR = 3;
4035

4136
private DisplayMetrics metrics;
4237
private PApplet sketch;
4338

4439

45-
public PVR() {
40+
public VRActivity() {
4641

4742
}
4843

4944

50-
static public PGraphicsVR getRenderer(PApplet p) {
51-
return (PGraphicsVR) p.g;
45+
static public VRGraphics getRenderer(PApplet p) {
46+
return (VRGraphics) p.g;
5247
}
5348

5449

55-
public PVR(PApplet sketch) {
50+
public VRActivity(PApplet sketch) {
5651
this.sketch = sketch;
5752
}
5853

@@ -89,7 +84,7 @@ public void dispose() {
8984
public void setSketch(PApplet sketch) {
9085
this.sketch = sketch;
9186
if (sketch != null) {
92-
sketch.initSurface(PVR.this, null);
87+
sketch.initSurface(VRActivity.this, null);
9388
// Required to read the paired viewer's distortion parameters.
9489
sketch.requestPermission("android.permission.READ_EXTERNAL_STORAGE");
9590
}

mode/libraries/vr/src/processing/vr/PGraphicsVR.java renamed to mode/libraries/vr/src/processing/vr/VRGraphics.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
import processing.opengl.PGraphics3D;
3636
import processing.opengl.PGraphicsOpenGL;
3737

38-
public class PGraphicsVR extends PGraphics3D {
38+
public class VRGraphics extends PGraphics3D {
39+
static public final int LEFT = Eye.Type.LEFT;
40+
static public final int RIGHT = Eye.Type.RIGHT;
41+
static public final int MONOCULAR = Eye.Type.MONOCULAR;
42+
3943
private boolean initialized = false;
4044

4145
public HeadTransform headTransform;

mode/libraries/vr/src/processing/vr/PGraphicsVRMono.java renamed to mode/libraries/vr/src/processing/vr/VRGraphicsMono.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
import processing.android.AppComponent;
2727
import processing.core.PSurface;
2828

29-
public class PGraphicsVRMono extends PGraphicsVR {
29+
public class VRGraphicsMono extends VRGraphics {
3030
@Override
3131
public PSurface createSurface(AppComponent component, SurfaceHolder holder, boolean reset) { // ignore
3232
if (reset) pgl.resetFBOLayer();
33-
return new PSurfaceVR(this, component, holder, false);
33+
return new VRSurface(this, component, holder, false);
3434
}
3535
}

mode/libraries/vr/src/processing/vr/PGraphicsVRStereo.java renamed to mode/libraries/vr/src/processing/vr/VRGraphicsStereo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
import processing.android.AppComponent;
2727
import processing.core.PSurface;
2828

29-
public class PGraphicsVRStereo extends PGraphicsVR {
29+
public class VRGraphicsStereo extends VRGraphics {
3030
@Override
3131
public PSurface createSurface(AppComponent component, SurfaceHolder holder, boolean reset) { // ignore
3232
if (reset) pgl.resetFBOLayer();
33-
return new PSurfaceVR(this, component, holder, true);
33+
return new VRSurface(this, component, holder, true);
3434
}
3535
}

mode/libraries/vr/src/processing/vr/PSurfaceVR.java renamed to mode/libraries/vr/src/processing/vr/VRSurface.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,24 @@
5050
import android.view.Window;
5151
import android.view.WindowManager;
5252

53-
public class PSurfaceVR extends PSurfaceGLES {
53+
public class VRSurface extends PSurfaceGLES {
5454
protected SurfaceViewVR vrView;
55-
protected PGraphicsVR pvr;
55+
protected VRGraphics pvr;
5656

5757
protected GvrActivity vrActivity;
5858
protected AndroidVRStereoRenderer renderer;
5959

6060
private boolean needCalculate;
6161

62-
public PSurfaceVR(PGraphics graphics, AppComponent component, SurfaceHolder holder, boolean vr) {
62+
public VRSurface(PGraphics graphics, AppComponent component, SurfaceHolder holder, boolean vr) {
6363
this.sketch = graphics.parent;
6464
this.graphics = graphics;
6565
this.component = component;
6666
this.pgl = (PGLES)((PGraphicsOpenGL)graphics).pgl;
6767

6868
vrActivity = (GvrActivity)component;
6969
this.activity = vrActivity;
70-
pvr = (PGraphicsVR)graphics;
70+
pvr = (VRGraphics)graphics;
7171

7272
vrView = new SurfaceViewVR(vrActivity);
7373

mode/templates/VRActivity.java.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package @@package_name@@;
22

33
import android.os.Bundle;
44

5-
import processing.vr.PVR;
5+
import processing.vr.VRActivity;
66
import processing.core.PApplet;
77

8-
public class MainActivity extends PVR {
8+
public class MainActivity extends VRActivity {
99
@Override
1010
public void onCreate(Bundle savedInstanceState) {
1111
super.onCreate(savedInstanceState);

0 commit comments

Comments
 (0)