Prechádzať zdrojové kódy

rename private variables (#1736)

* rename private fields for clarity

* TestShadowsPerf:  rename "createballs()" for clarity

* rename more private fields

* MorphControl: rename a private method
Stephen Gold 3 rokov pred
rodič
commit
0b5e8693f1

+ 3 - 3
jme3-core/src/main/java/com/jme3/anim/MorphControl.java

@@ -142,7 +142,7 @@ public class MorphControl extends AbstractControl implements Savable {
                 lastGpuTargetIndex = i;
                 // binding the morph target's buffers to the mesh morph buffers.
                 MorphTarget t = morphTargets[i];
-                boundBufferIdx = bindMorphtargetBuffer(mesh, targetNumBuffers, boundBufferIdx, t);
+                boundBufferIdx = bindMorphTargetBuffer(mesh, targetNumBuffers, boundBufferIdx, t);
                 // setting the weight in the mat param array
                 matWeights[nbGPUTargets] = weights[i];
                 nbGPUTargets++;
@@ -179,7 +179,7 @@ public class MorphControl extends AbstractControl implements Savable {
                 writeCpuBuffer(targetNumBuffers, mt);
 
                 // binding the merged morph target
-                bindMorphtargetBuffer(mesh, targetNumBuffers, (nbGPUTargets - 1) * targetNumBuffers, mt);
+                bindMorphTargetBuffer(mesh, targetNumBuffers, (nbGPUTargets - 1) * targetNumBuffers, mt);
 
                 // setting the eight of the merged targets
                 matWeights[nbGPUTargets - 1] = cpuWeightSum;
@@ -236,7 +236,7 @@ public class MorphControl extends AbstractControl implements Savable {
         return maxGPUTargets;
     }
 
-    private int bindMorphtargetBuffer(Mesh mesh, int targetNumBuffers, int boundBufferIdx, MorphTarget t) {
+    private int bindMorphTargetBuffer(Mesh mesh, int targetNumBuffers, int boundBufferIdx, MorphTarget t) {
         int start = VertexBuffer.Type.MorphTarget0.ordinal();
         if (targetNumBuffers >= 1) {
             activateBuffer(mesh, boundBufferIdx, start, t.getBuffer(VertexBuffer.Type.Position));

+ 15 - 15
jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java

@@ -61,9 +61,9 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
     private final ByteBuffer nativeBuf = BufferUtils.createByteBuffer(BUFFER_SIZE);
     private final byte[] arrayBuf = new byte[BUFFER_SIZE];
     private int[] channels;
-    private AudioSource[] chanSrcs;
+    private AudioSource[] channelSources;
     private int nextChan = 0;
-    private final ArrayList<Integer> freeChans = new ArrayList<>();
+    private final ArrayList<Integer> freeChannels = new ArrayList<>();
     private Listener listener;
     private boolean audioDisabled = false;
     private boolean supportEfx = false;
@@ -116,7 +116,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
         }
 
         ib = BufferUtils.createIntBuffer(channels.length);
-        chanSrcs = new AudioSource[channels.length];
+        channelSources = new AudioSource[channels.length];
 
         final String deviceName = alc.alcGetString(ALC.ALC_DEVICE_SPECIFIER);
 
@@ -189,8 +189,8 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
         }
 
         // stop any playing channels
-        for (int i = 0; i < chanSrcs.length; i++) {
-            if (chanSrcs[i] != null) {
+        for (int i = 0; i < channelSources.length; i++) {
+            if (channelSources[i] != null) {
                 clearChannel(i);
             }
         }
@@ -643,8 +643,8 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
     }
 
     private int newChannel() {
-        if (freeChans.size() > 0) {
-            return freeChans.remove(0);
+        if (freeChannels.size() > 0) {
+            return freeChannels.remove(0);
         } else if (nextChan < channels.length) {
             return nextChan++;
         } else {
@@ -656,7 +656,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
         if (index == nextChan - 1) {
             nextChan--;
         } else {
-            freeChans.add(index);
+            freeChannels.add(index);
         }
     }
 
@@ -817,8 +817,8 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
 
     private void clearChannel(int index) {
         // make room at this channel
-        if (chanSrcs[index] != null) {
-            AudioSource src = chanSrcs[index];
+        if (channelSources[index] != null) {
+            AudioSource src = channelSources[index];
 
             int sourceId = channels[index];
             al.alSourceStop(sourceId);
@@ -837,7 +837,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
                 }
             }
 
-            chanSrcs[index] = null;
+            channelSources[index] = null;
         }
     }
 
@@ -891,7 +891,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
         }
 
         for (int i = 0; i < channels.length; i++) {
-            AudioSource src = chanSrcs[i];
+            AudioSource src = channelSources[i];
 
             if (src == null) {
                 continue;
@@ -974,7 +974,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
         }
 
         for (int i = 0; i < channels.length; i++) {
-            AudioSource src = chanSrcs[i];
+            AudioSource src = channelSources[i];
 
             if (src == null || !(src.getAudioData() instanceof AudioStream)) {
                 continue;
@@ -1080,7 +1080,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
             // set parameters, like position and max distance
             setSourceParams(sourceId, src, true);
             attachAudioToSource(sourceId, src.getAudioData(), false);
-            chanSrcs[index] = src;
+            channelSources[index] = src;
 
             // play the channel
             al.alSourcePlay(sourceId);
@@ -1116,7 +1116,7 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
                     updateAudioData(data);
                 }
 
-                chanSrcs[index] = src;
+                channelSources[index] = src;
                 setSourceParams(channels[index], src, false);
                 attachAudioToSource(channels[index], data, src.isLooping());
             }

+ 23 - 23
jme3-core/src/main/java/com/jme3/collision/bih/BIHTriangle.java

@@ -36,29 +36,29 @@ import com.jme3.math.Vector3f;
 
 public final class BIHTriangle {
 
-    private final Vector3f pointa = new Vector3f();
-    private final Vector3f pointb = new Vector3f();
-    private final Vector3f pointc = new Vector3f();
+    private final Vector3f pointA = new Vector3f();
+    private final Vector3f pointB = new Vector3f();
+    private final Vector3f pointC = new Vector3f();
     private final Vector3f center = new Vector3f();
 
     public BIHTriangle(Vector3f p1, Vector3f p2, Vector3f p3) {
-        pointa.set(p1);
-        pointb.set(p2);
-        pointc.set(p3);
-        center.set(pointa);
-        center.addLocal(pointb).addLocal(pointc).multLocal(FastMath.ONE_THIRD);
+        pointA.set(p1);
+        pointB.set(p2);
+        pointC.set(p3);
+        center.set(pointA);
+        center.addLocal(pointB).addLocal(pointC).multLocal(FastMath.ONE_THIRD);
     }
 
     public Vector3f get1() {
-        return pointa;
+        return pointA;
     }
 
     public Vector3f get2() {
-        return pointb;
+        return pointB;
     }
 
     public Vector3f get3() {
-        return pointc;
+        return pointC;
     }
 
     public Vector3f getCenter() {
@@ -66,9 +66,9 @@ public final class BIHTriangle {
     }
 
     public Vector3f getNormal() {
-        Vector3f normal = new Vector3f(pointb);
-        normal.subtractLocal(pointa)
-                .crossLocal(pointc.x - pointa.x, pointc.y - pointa.y, pointc.z - pointa.z);
+        Vector3f normal = new Vector3f(pointB);
+        normal.subtractLocal(pointA)
+                .crossLocal(pointC.x - pointA.x, pointC.y - pointA.y, pointC.z - pointA.z);
         normal.normalizeLocal();
         return normal;
     }
@@ -77,19 +77,19 @@ public final class BIHTriangle {
         float v1, v2, v3;
         switch (axis) {
             case 0:
-                v1 = pointa.x;
-                v2 = pointb.x;
-                v3 = pointc.x;
+                v1 = pointA.x;
+                v2 = pointB.x;
+                v3 = pointC.x;
                 break;
             case 1:
-                v1 = pointa.y;
-                v2 = pointb.y;
-                v3 = pointc.y;
+                v1 = pointA.y;
+                v2 = pointB.y;
+                v3 = pointC.y;
                 break;
             case 2:
-                v1 = pointa.z;
-                v2 = pointb.z;
-                v3 = pointc.z;
+                v1 = pointA.z;
+                v2 = pointB.z;
+                v3 = pointC.z;
                 break;
             default:
                 assert false;

+ 3 - 3
jme3-core/src/main/java/com/jme3/font/StringBlock.java

@@ -46,7 +46,7 @@ class StringBlock implements Cloneable {
     private String text;
     private Rectangle textBox;
     private Align alignment = Align.Left;
-    private VAlign valignment = VAlign.Top;
+    private VAlign vAlignment = VAlign.Top;
     private float size;
     private ColorRGBA color = new ColorRGBA(ColorRGBA.White);
     private boolean kerning;
@@ -118,7 +118,7 @@ class StringBlock implements Cloneable {
     }
 
     BitmapFont.VAlign getVerticalAlignment() {
-        return valignment;
+        return vAlignment;
     }
 
     void setAlignment(BitmapFont.Align alignment) {
@@ -126,7 +126,7 @@ class StringBlock implements Cloneable {
     }
 
     void setVerticalAlignment(BitmapFont.VAlign alignment) {
-        this.valignment = alignment;
+        this.vAlignment = alignment;
     }
 
     float getSize() {

+ 39 - 39
jme3-core/src/main/java/com/jme3/math/Triangle.java

@@ -47,9 +47,9 @@ import java.io.IOException;
 public class Triangle extends AbstractTriangle implements Savable, Cloneable, java.io.Serializable {
     static final long serialVersionUID = 1;
 
-    private Vector3f pointa = new Vector3f();
-    private Vector3f pointb = new Vector3f();
-    private Vector3f pointc = new Vector3f();
+    private Vector3f pointA = new Vector3f();
+    private Vector3f pointB = new Vector3f();
+    private Vector3f pointC = new Vector3f();
     private transient Vector3f center;
     private transient Vector3f normal;
     private float projection;
@@ -71,9 +71,9 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      * @param p3 the location of the 3rd vertex (not null, unaffected)
      */
     public Triangle(Vector3f p1, Vector3f p2, Vector3f p3) {
-        pointa.set(p1);
-        pointb.set(p2);
-        pointc.set(p3);
+        pointA.set(p1);
+        pointB.set(p2);
+        pointC.set(p3);
     }
 
     /**
@@ -85,11 +85,11 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
     public Vector3f get(int i) {
         switch (i) {
             case 0:
-                return pointa;
+                return pointA;
             case 1:
-                return pointb;
+                return pointB;
             case 2:
-                return pointc;
+                return pointC;
             default:
                 return null;
         }
@@ -102,7 +102,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     @Override
     public Vector3f get1() {
-        return pointa;
+        return pointA;
     }
 
     /**
@@ -112,7 +112,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     @Override
     public Vector3f get2() {
-        return pointb;
+        return pointB;
     }
 
     /**
@@ -122,7 +122,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     @Override
     public Vector3f get3() {
-        return pointc;
+        return pointC;
     }
 
     /**
@@ -138,13 +138,13 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
 
         switch (i) {
             case 0:
-                pointa.set(point);
+                pointA.set(point);
                 break;
             case 1:
-                pointb.set(point);
+                pointB.set(point);
                 break;
             case 2:
-                pointc.set(point);
+                pointC.set(point);
                 break;
         }
     }
@@ -164,13 +164,13 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
 
         switch (i) {
             case 0:
-                pointa.set(x, y, z);
+                pointA.set(x, y, z);
                 break;
             case 1:
-                pointb.set(x, y, z);
+                pointB.set(x, y, z);
                 break;
             case 2:
-                pointc.set(x, y, z);
+                pointC.set(x, y, z);
                 break;
         }
     }
@@ -185,7 +185,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
         center = null;
         normal = null;
 
-        pointa.set(v);
+        pointA.set(v);
     }
 
     /**
@@ -198,7 +198,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
         center = null;
         normal = null;
 
-        pointb.set(v);
+        pointB.set(v);
     }
 
     /**
@@ -211,7 +211,7 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
         center = null;
         normal = null;
 
-        pointc.set(v);
+        pointC.set(v);
     }
 
     /**
@@ -227,9 +227,9 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
         center = null;
         normal = null;
 
-        pointa.set(v1);
-        pointb.set(v2);
-        pointc.set(v3);
+        pointA.set(v1);
+        pointB.set(v2);
+        pointC.set(v3);
     }
 
     /**
@@ -237,11 +237,11 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     public void calculateCenter() {
         if (center == null) {
-            center = new Vector3f(pointa);
+            center = new Vector3f(pointA);
         } else {
-            center.set(pointa);
+            center.set(pointA);
         }
-        center.addLocal(pointb).addLocal(pointc).multLocal(FastMath.ONE_THIRD);
+        center.addLocal(pointB).addLocal(pointC).multLocal(FastMath.ONE_THIRD);
     }
 
     /**
@@ -249,11 +249,11 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     public void calculateNormal() {
         if (normal == null) {
-            normal = new Vector3f(pointb);
+            normal = new Vector3f(pointB);
         } else {
-            normal.set(pointb);
+            normal.set(pointB);
         }
-        normal.subtractLocal(pointa).crossLocal(pointc.x - pointa.x, pointc.y - pointa.y, pointc.z - pointa.z);
+        normal.subtractLocal(pointA).crossLocal(pointC.x - pointA.x, pointC.y - pointA.y, pointC.z - pointA.z);
         normal.normalizeLocal();
     }
 
@@ -359,9 +359,9 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     @Override
     public void write(JmeExporter e) throws IOException {
-        e.getCapsule(this).write(pointa, "pointa", Vector3f.ZERO);
-        e.getCapsule(this).write(pointb, "pointb", Vector3f.ZERO);
-        e.getCapsule(this).write(pointc, "pointc", Vector3f.ZERO);
+        e.getCapsule(this).write(pointA, "pointa", Vector3f.ZERO);
+        e.getCapsule(this).write(pointB, "pointb", Vector3f.ZERO);
+        e.getCapsule(this).write(pointC, "pointc", Vector3f.ZERO);
     }
 
     /**
@@ -373,9 +373,9 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
      */
     @Override
     public void read(JmeImporter importer) throws IOException {
-        pointa = (Vector3f) importer.getCapsule(this).readSavable("pointa", Vector3f.ZERO.clone());
-        pointb = (Vector3f) importer.getCapsule(this).readSavable("pointb", Vector3f.ZERO.clone());
-        pointc = (Vector3f) importer.getCapsule(this).readSavable("pointc", Vector3f.ZERO.clone());
+        pointA = (Vector3f) importer.getCapsule(this).readSavable("pointa", Vector3f.ZERO.clone());
+        pointB = (Vector3f) importer.getCapsule(this).readSavable("pointb", Vector3f.ZERO.clone());
+        pointC = (Vector3f) importer.getCapsule(this).readSavable("pointc", Vector3f.ZERO.clone());
     }
 
     /**
@@ -387,9 +387,9 @@ public class Triangle extends AbstractTriangle implements Savable, Cloneable, ja
     public Triangle clone() {
         try {
             Triangle t = (Triangle) super.clone();
-            t.pointa = pointa.clone();
-            t.pointb = pointb.clone();
-            t.pointc = pointc.clone();
+            t.pointA = pointA.clone();
+            t.pointB = pointB.clone();
+            t.pointC = pointC.clone();
             // XXX: the center and normal are not cloned!
             return t;
         } catch (CloneNotSupportedException e) {

+ 2 - 2
jme3-examples/src/main/java/jme3test/bullet/TestRagDoll.java

@@ -52,7 +52,7 @@ public class TestRagDoll extends SimpleApplication implements ActionListener {
     private BulletAppState bulletAppState;
     final private Node ragDoll = new Node();
     private Node shoulders;
-    final private Vector3f upforce = new Vector3f(0, 200, 0);
+    final private Vector3f upForce = new Vector3f(0, 200, 0);
     private boolean applyForce = false;
 
     public static void main(String[] args) {
@@ -146,7 +146,7 @@ public class TestRagDoll extends SimpleApplication implements ActionListener {
     @Override
     public void simpleUpdate(float tpf) {
         if (applyForce) {
-            shoulders.getControl(RigidBodyControl.class).applyForce(upforce, Vector3f.ZERO);
+            shoulders.getControl(RigidBodyControl.class).applyForce(upForce, Vector3f.ZERO);
         }
     }
 }

+ 4 - 4
jme3-examples/src/main/java/jme3test/light/TestShadowsPerf.java

@@ -105,7 +105,7 @@ public class TestShadowsPerf extends SimpleApplication {
         rootNode.addLight(al);
         //rootNode.setShadowMode(ShadowMode.CastAndReceive);
 
-        createballs();
+        createBalls();
 
         final DirectionalLightShadowRenderer pssmRenderer = new DirectionalLightShadowRenderer(assetManager, 1024, 4);
         viewPort.addProcessor(pssmRenderer);
@@ -131,7 +131,7 @@ public class TestShadowsPerf extends SimpleApplication {
                     System.out.println("tetetetet");
                 }
                 if (name.equals("add") && isPressed) {
-                    createballs();
+                    createBalls();
                 }
             }
         }, "display", "add");
@@ -140,7 +140,7 @@ public class TestShadowsPerf extends SimpleApplication {
     }
     private int val = 0;
 
-    private void createballs() {
+    private void createBalls() {
         System.out.println((frames / time) + ";" + val);
 
 
@@ -167,7 +167,7 @@ public class TestShadowsPerf extends SimpleApplication {
         time += tpf;
         frames++;
         if (time > 1) {
-            createballs();
+            createBalls();
         }
     }
 }

+ 7 - 7
jme3-examples/src/main/java/jme3test/stress/TestLodGeneration.java

@@ -66,7 +66,7 @@ public class TestLodGeneration extends SimpleApplication {
     }
 
     private boolean wireFrame = false;
-    private float reductionvalue = 0.0f;
+    private float reductionValue = 0.0f;
     private int lodLevel = 0;
     private BitmapText hudText;
     final private List<Geometry> listGeoms = new ArrayList<>();
@@ -106,11 +106,11 @@ public class TestLodGeneration extends SimpleApplication {
             skControl.setEnabled(false);
         }
 
-        reductionvalue = 0.80f;
+        reductionValue = 0.80f;
         lodLevel = 1;
         for (final Geometry geom : listGeoms) {
             LodGenerator lodGenerator = new LodGenerator(geom);
-            lodGenerator.bakeLods(LodGenerator.TriangleReductionMethod.PROPORTIONAL, reductionvalue);
+            lodGenerator.bakeLods(LodGenerator.TriangleReductionMethod.PROPORTIONAL, reductionValue);
             geom.setLodLevel(lodLevel);
         }
 
@@ -129,11 +129,11 @@ public class TestLodGeneration extends SimpleApplication {
             public void onAction(String name, boolean isPressed, float tpf) {
                 if (isPressed) {
                     if (name.equals("plus")) {
-                        reductionvalue += 0.05f;
+                        reductionValue += 0.05f;
                         updateLod();
                     }
                     if (name.equals("minus")) {
-                        reductionvalue -= 0.05f;
+                        reductionValue -= 0.05f;
                         updateLod();
                     }
                     if (name.equals("wireFrame")) {
@@ -163,8 +163,8 @@ public class TestLodGeneration extends SimpleApplication {
     }
 
     private void updateLod() {
-        reductionvalue = FastMath.clamp(reductionvalue, 0.0f, 1.0f);
-        makeLod(LodGenerator.TriangleReductionMethod.PROPORTIONAL, reductionvalue, 1);
+        reductionValue = FastMath.clamp(reductionValue, 0.0f, 1.0f);
+        makeLod(LodGenerator.TriangleReductionMethod.PROPORTIONAL, reductionValue, 1);
     }
 
     private int computeNbTri() {

+ 4 - 4
jme3-jogg/src/main/java/com/jme3/audio/plugins/CachedOggStream.java

@@ -61,7 +61,7 @@ public class CachedOggStream implements PhysicalOggStream {
     private OggPage lastPage;
    
     private int pageNumber;
-    private int serialno;
+    private int serialNumber;
     
     public CachedOggStream(InputStream in) throws IOException {
         sourceStream = in;
@@ -109,8 +109,8 @@ public class CachedOggStream implements PhysicalOggStream {
 
     public LogicalOggStream reloadLogicalOggStream() {
         logicalStreams.clear();
-        LogicalOggStreamImpl los = new LogicalOggStreamImpl(this, serialno);
-        logicalStreams.put(serialno, los);
+        LogicalOggStreamImpl los = new LogicalOggStreamImpl(this, serialNumber);
+        logicalStreams.put(serialNumber, los);
 
         for (IntMap.Entry<OggPage> entry : oggPages) {
             los.addPageNumberMapping(entry.getKey());
@@ -133,7 +133,7 @@ public class CachedOggStream implements PhysicalOggStream {
 
        LogicalOggStreamImpl los = (LogicalOggStreamImpl) logicalStreams.get(op.getStreamSerialNumber());
        if (los == null) {
-           serialno = op.getStreamSerialNumber();
+           serialNumber = op.getStreamSerialNumber();
            los = new LogicalOggStreamImpl(this, op.getStreamSerialNumber());
            logicalStreams.put(op.getStreamSerialNumber(), los);
            los.checkFormat(op);

+ 4 - 4
jme3-lwjgl/src/main/java/com/jme3/input/lwjgl/JInputJoyInput.java

@@ -61,7 +61,7 @@ public class JInputJoyInput implements JoyInput {
 
     private static final Logger logger = Logger.getLogger(InputManager.class.getName());
 
-    private boolean inited = false;
+    private boolean initialized = false;
     private JInputJoystick[] joysticks;
     private RawInputListener listener;
 
@@ -117,7 +117,7 @@ public class JInputJoyInput implements JoyInput {
 
     @Override
     public void initialize() {
-        inited = true;
+        initialized = true;
     }
 
     @Override
@@ -191,12 +191,12 @@ public class JInputJoyInput implements JoyInput {
 
     @Override
     public void destroy() {
-        inited = false;
+        initialized = false;
     }
 
     @Override
     public boolean isInitialized() {
-        return inited;
+        return initialized;
     }
 
     @Override

+ 4 - 4
jme3-terrain/src/main/java/com/jme3/terrain/heightmap/RawHeightMap.java

@@ -61,7 +61,7 @@ public class RawHeightMap extends AbstractHeightMap {
      */
     public static final int FORMAT_16BITBE = 2;
     private int format;
-    private boolean swapxy;
+    private boolean swapXy;
     private InputStream stream;
 
     /**
@@ -131,7 +131,7 @@ public class RawHeightMap extends AbstractHeightMap {
         this.stream = stream;
         this.size = size;
         this.format = format;
-        this.swapxy = swapxy;
+        this.swapXy = swapxy;
         load();
     }
 
@@ -173,7 +173,7 @@ public class RawHeightMap extends AbstractHeightMap {
                 // read the raw file
                 for (int i = 0; i < size; i++) {
                     for (int j = 0; j < size; j++) {
-                        if (swapxy) {
+                        if (swapXy) {
                             index = i + j * size;
                         } else {
                             index = (i * size) + j;
@@ -188,7 +188,7 @@ public class RawHeightMap extends AbstractHeightMap {
                 for (int i = 0; i < size; i++) {
                     for (int j = 0; j < size; j++) {
                         int index;
-                        if (swapxy) {
+                        if (swapXy) {
                             index = i + j * size;
                         } else {
                             index = (i * size) + j;

+ 24 - 24
jme3-vr/src/main/java/com/jme3/app/VRApplication.java

@@ -165,7 +165,7 @@ public abstract class VRApplication implements Application, SystemListener {
         FORCE_DISABLE_MSAA
     }
 
-    private VRAPI VRhardware            = null;
+    private VRAPI vrHardware = null;
     private VRGuiManager guiManager     = null;
     private OpenVRMouseManager mouseManager = null;
     private OpenVRViewManager viewManager = null;
@@ -273,14 +273,14 @@ public abstract class VRApplication implements Application, SystemListener {
         } else if( VRSupportedOS && DISABLE_VR == false ) {
             if( CONSTRUCT_WITH_OSVR ) {
                 //FIXME: WARNING !!
-                VRhardware = new OSVR(null);
+                vrHardware = new OSVR(null);
                 logger.config("Creating OSVR wrapper [SUCCESS]");
             } else {
                 //FIXME: WARNING !!
-                VRhardware = new OpenVR(null);
+                vrHardware = new OpenVR(null);
                 logger.config("Creating OpenVR wrapper [SUCCESS]");
             }
-            if( VRhardware.initialize() ) {
+            if( vrHardware.initialize() ) {
                 setPauseOnLostFocus(false);
             }
         }
@@ -291,7 +291,7 @@ public abstract class VRApplication implements Application, SystemListener {
      * @return the VR underlying hardware.
      */
     public VRAPI getVRHardware() {
-        return VRhardware;
+        return vrHardware;
     }
 
     /**
@@ -299,8 +299,8 @@ public abstract class VRApplication implements Application, SystemListener {
      * @return the VR dedicated input.
      */
     public VRInputAPI getVRinput() {
-        if( VRhardware == null ) return null;
-        return VRhardware.getVRinput();
+        if( vrHardware == null ) return null;
+        return vrHardware.getVRinput();
     }
 
     /**
@@ -749,10 +749,10 @@ public abstract class VRApplication implements Application, SystemListener {
             settings.setHeight(yWin);
             settings.setBitsPerPixel(24);
             settings.setFrameRate(0); // never sleep in main loop
-            settings.setFrequency(VRhardware.getDisplayFrequency());
+            settings.setFrequency(vrHardware.getDisplayFrequency());
             settings.setFullscreen(false);
             settings.setVSync(false); // stop vsyncing on primary monitor!
-            settings.setSwapBuffers(!disableSwapBuffers || VRhardware instanceof OSVR);
+            settings.setSwapBuffers(!disableSwapBuffers || vrHardware instanceof OSVR);
             settings.setTitle("Put Headset On Now: " + settings.getTitle());
             settings.setResizable(true);
         }
@@ -861,8 +861,8 @@ public abstract class VRApplication implements Application, SystemListener {
                 if( value == false ) disableSwapBuffers = false;
                 break;
             case FLIP_EYES:
-                if( VRhardware == null ) return;
-                VRhardware.setFlipEyes(value);
+                if( vrHardware == null ) return;
+                vrHardware.setFlipEyes(value);
                 break;
             case INSTANCE_VR_RENDERING:
                 instanceVR = value;
@@ -897,12 +897,12 @@ public abstract class VRApplication implements Application, SystemListener {
      */
     public void setSeatedExperience(boolean isSeated) {
         seated = isSeated;
-        if( VRhardware instanceof OpenVR ) {
-            if( VRhardware.getCompositor() == null ) return;
+        if( vrHardware instanceof OpenVR ) {
+            if( vrHardware.getCompositor() == null ) return;
             if( seated ) {
-                ((OpenVR)VRhardware).getCompositor().SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseSeated);
+                ((OpenVR) vrHardware).getCompositor().SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseSeated);
             } else {
-                ((OpenVR)VRhardware).getCompositor().SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseStanding);
+                ((OpenVR) vrHardware).getCompositor().SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseStanding);
             }
         }
     }
@@ -921,7 +921,7 @@ public abstract class VRApplication implements Application, SystemListener {
      */
     public void resetSeatedPose(){
         if( VRSupportedOS == false || isSeatedExperience() == false ) return;
-        VRhardware.reset();
+        vrHardware.reset();
     }
 
     /**
@@ -937,7 +937,7 @@ public abstract class VRApplication implements Application, SystemListener {
      * @return <code>true</code> if the VR mode is enabled and <code>false</code> otherwise.
      */
     public boolean isInVR() {
-        return DISABLE_VR == false && (forceVR || VRSupportedOS && VRhardware != null && VRhardware.isInitialized());
+        return DISABLE_VR == false && (forceVR || VRSupportedOS && vrHardware != null && vrHardware.isInitialized());
     }
 
 
@@ -1035,7 +1035,7 @@ public abstract class VRApplication implements Application, SystemListener {
         } else {
             tempq.set(observer.getWorldRotation());
         }
-        return tempq.multLocal(VRhardware.getOrientation());
+        return tempq.multLocal(vrHardware.getOrientation());
     }
 
     /**
@@ -1049,7 +1049,7 @@ public abstract class VRApplication implements Application, SystemListener {
                 return getCamera().getLocation();
             } else return observer.getWorldTranslation();
         }
-        Vector3f pos = VRhardware.getPosition();
+        Vector3f pos = vrHardware.getPosition();
         if( observer == null ) {
             dummyCam.getRotation().mult(pos, pos);
             return pos.addLocal(dummyCam.getLocation());
@@ -1347,8 +1347,8 @@ public abstract class VRApplication implements Application, SystemListener {
         if( isInVR() ) {
             logger.config("VR mode enabled.");
 
-            if( VRhardware != null ) {
-                VRhardware.initVRCompositor(compositorAllowed());
+            if( vrHardware != null ) {
+                vrHardware.initVRCompositor(compositorAllowed());
             } else {
                 logger.warning("No VR system found.");
             }
@@ -1398,9 +1398,9 @@ public abstract class VRApplication implements Application, SystemListener {
      */
     @Override
     public void destroy() {
-        if( VRhardware != null ) {
-            VRhardware.destroy();
-            VRhardware = null;
+        if( vrHardware != null ) {
+            vrHardware.destroy();
+            vrHardware = null;
         }
         DISABLE_VR = true;
         stateManager.cleanup();

+ 4 - 4
jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVRInput.java

@@ -28,7 +28,7 @@ public class OculusVRInput implements VRInputAPI {
 
     // Used to calculate sinceLastCall stuff
     private int lastButtons, lastTouch;
-    private final Vector2f[][] lastAxises;
+    private final Vector2f[][] lastAxes;
 
     /**
      * The state data (linear and angular velocity and acceleration) for each hand
@@ -59,7 +59,7 @@ public class OculusVRInput implements VRInputAPI {
 
         handStates = new OVRPoseStatef[ovrHand_Count];
         handPoses = new OVRPosef[handStates.length];
-        lastAxises = new Vector2f[handStates.length][3]; // trigger+grab+thumbstick for each hand.
+        lastAxes = new Vector2f[handStates.length][3]; // trigger+grab+thumbstick for each hand.
     }
 
     public void dispose() {
@@ -256,9 +256,9 @@ public class OculusVRInput implements VRInputAPI {
                 return null;
         }
 
-        Vector2f last = lastAxises[controllerIndex][index];
+        Vector2f last = lastAxes[controllerIndex][index];
         if (last == null) {
-            last = lastAxises[controllerIndex][index] = new Vector2f();
+            last = lastAxes[controllerIndex][index] = new Vector2f();
         }
 
         Vector2f current = getAxis(controllerIndex, forAxis);

+ 40 - 40
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java

@@ -38,7 +38,7 @@ public class OpenVR implements VRAPI {
     private static final Logger logger = Logger.getLogger(OpenVR.class.getName());
 
     private static VR_IVRCompositor_FnTable compositorFunctions;
-    private static VR_IVRSystem_FnTable vrsystemFunctions;
+    private static VR_IVRSystem_FnTable vrSystemFunctions;
     private static VR_IVRTrackedCamera_FnTable cameraFunctions;
 
     private static boolean initSuccess = false;
@@ -76,7 +76,7 @@ public class OpenVR implements VRAPI {
     private float vsyncToPhotons;
     private double timePerFrame, frameCountRun;
     private long frameCount;
-    private OpenVRInput VRinput;
+    private OpenVRInput vrInput;
 
     private VREnvironment environment = null;
 
@@ -119,12 +119,12 @@ public class OpenVR implements VRAPI {
 
     @Override
     public OpenVRInput getVRinput() {
-        return VRinput;
+        return vrInput;
     }
 
     @Override
     public VR_IVRSystem_FnTable getVRSystem() {
-        return vrsystemFunctions;
+        return vrSystemFunctions;
     }
 
     @Override
@@ -166,7 +166,7 @@ public class OpenVR implements VRAPI {
         logger.config("Initializing OpenVR system...");
 
         hmdErrorStore = new IntByReference();
-        vrsystemFunctions = null;
+        vrSystemFunctions = null;
 
         // Init the native linking to the OpenVR library.
         try{
@@ -179,18 +179,18 @@ public class OpenVR implements VRAPI {
         JOpenVRLibrary.VR_InitInternal(hmdErrorStore, JOpenVRLibrary.EVRApplicationType.EVRApplicationType_VRApplication_Scene);
 
         if( hmdErrorStore.getValue() == 0 ) {
-            vrsystemFunctions = new VR_IVRSystem_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRSystem_Version, hmdErrorStore).getPointer());
+            vrSystemFunctions = new VR_IVRSystem_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRSystem_Version, hmdErrorStore).getPointer());
         }
 
-        if( vrsystemFunctions == null || hmdErrorStore.getValue() != 0 ) {
+        if( vrSystemFunctions == null || hmdErrorStore.getValue() != 0 ) {
             logger.severe("OpenVR Initialize Result: " + JOpenVRLibrary.VR_GetVRInitErrorAsEnglishDescription(hmdErrorStore.getValue()).getString(0));
             logger.severe("Initializing OpenVR system [FAILED]");
             return false;
         } else {
             logger.config("OpenVR initialized & VR connected.");
 
-            vrsystemFunctions.setAutoSynch(false);
-            vrsystemFunctions.read();
+            vrSystemFunctions.setAutoSynch(false);
+            vrSystemFunctions.read();
 
             tlastVsync = new FloatByReference();
             _tframeCount = new LongByReference();
@@ -215,9 +215,9 @@ public class OpenVR implements VRAPI {
             }
 
             // init controllers for the first time
-            VRinput = new OpenVRInput(environment);
-            VRinput.init();
-            VRinput.updateConnectedControllers();
+            vrInput = new OpenVRInput(environment);
+            vrInput.init();
+            vrInput.updateConnectedControllers();
 
             // init bounds & chaperone info
             OpenVRBounds bounds = new OpenVRBounds();
@@ -233,7 +233,7 @@ public class OpenVR implements VRAPI {
     @Override
     public boolean initVRCompositor(boolean allowed) {
         hmdErrorStore.setValue(0); // clear the error store
-        if( allowed && vrsystemFunctions != null ) {
+        if( allowed && vrSystemFunctions != null ) {
 
             IntByReference intptr = JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRCompositor_Version, hmdErrorStore);
             if (intptr != null){
@@ -265,8 +265,8 @@ public class OpenVR implements VRAPI {
         }
         if( compositorFunctions == null ) {
             logger.severe("Skipping VR Compositor...");
-            if( vrsystemFunctions != null ) {
-                vsyncToPhotons = vrsystemFunctions.GetFloatTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd, JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float, hmdErrorStore);
+            if( vrSystemFunctions != null ) {
+                vsyncToPhotons = vrSystemFunctions.GetFloatTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd, JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float, hmdErrorStore);
             } else {
                 vsyncToPhotons = 0f;
             }
@@ -281,7 +281,7 @@ public class OpenVR implements VRAPI {
     public void initCamera(boolean allowed) {
       hmdErrorStore.setValue(0); // clear the error store
 
-      if( allowed && vrsystemFunctions != null ) {
+      if( allowed && vrSystemFunctions != null ) {
         IntByReference intptr = JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRTrackedCamera_Version, hmdErrorStore);
           if (intptr != null){
             cameraFunctions = new VR_IVRTrackedCamera_FnTable(intptr.getPointer());
@@ -306,21 +306,21 @@ public class OpenVR implements VRAPI {
 
     @Override
     public void reset() {
-        if( vrsystemFunctions == null ) return;
-        vrsystemFunctions.ResetSeatedZeroPose.apply();
+        if( vrSystemFunctions == null ) return;
+        vrSystemFunctions.ResetSeatedZeroPose.apply();
         hmdSeatToStand = null;
     }
 
     @Override
     public void getRenderSize(Vector2f store) {
-        if( vrsystemFunctions == null ) {
+        if( vrSystemFunctions == null ) {
             // 1344x1512
             store.x = 1344f;
             store.y = 1512f;
         } else {
             IntByReference x = new IntByReference();
             IntByReference y = new IntByReference();
-            vrsystemFunctions.GetRecommendedRenderTargetSize.apply(x, y);
+            vrSystemFunctions.GetRecommendedRenderTargetSize.apply(x, y);
             store.x = x.getValue();
             store.y = y.getValue();
         }
@@ -345,8 +345,8 @@ public class OpenVR implements VRAPI {
 
     @Override
     public float getInterpupillaryDistance() {
-        if( vrsystemFunctions == null ) return 0.065f;
-        return vrsystemFunctions.GetFloatTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd, JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_UserIpdMeters_Float, hmdErrorStore);
+        if( vrSystemFunctions == null ) return 0.065f;
+        return vrSystemFunctions.GetFloatTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd, JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_UserIpdMeters_Float, hmdErrorStore);
     }
 
     @Override
@@ -374,14 +374,14 @@ public class OpenVR implements VRAPI {
 
     @Override
     public void updatePose(){
-        if(vrsystemFunctions == null) return;
+        if(vrSystemFunctions == null) return;
         if(compositorFunctions != null) {
            compositorFunctions.WaitGetPoses.apply(hmdTrackedDevicePoseReference, JOpenVRLibrary.k_unMaxTrackedDeviceCount, null, 0);
         } else {
             // wait
             if( latencyWaitTime > 0 ) VRUtil.sleepNanos(latencyWaitTime);
 
-            vrsystemFunctions.GetTimeSinceLastVsync.apply(tlastVsync, _tframeCount);
+            vrSystemFunctions.GetTimeSinceLastVsync.apply(tlastVsync, _tframeCount);
             float fSecondsUntilPhotons = (float)timePerFrame - tlastVsync.getValue() + vsyncToPhotons;
 
             if( enableDebugLatency ) {
@@ -410,7 +410,7 @@ public class OpenVR implements VRAPI {
 
             frameCount = nowCount;
 
-            vrsystemFunctions.GetDeviceToAbsoluteTrackingPose.apply(
+            vrSystemFunctions.GetDeviceToAbsoluteTrackingPose.apply(
                     environment.isSeatedExperience()?JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseSeated:
                                                        JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseStanding,
                     fSecondsUntilPhotons, hmdTrackedDevicePoseReference, JOpenVRLibrary.k_unMaxTrackedDeviceCount);
@@ -450,10 +450,10 @@ public class OpenVR implements VRAPI {
     public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam){
         if( hmdProjectionLeftEye != null ) {
             return hmdProjectionLeftEye;
-        } else if(vrsystemFunctions == null){
+        } else if(vrSystemFunctions == null){
             return cam.getProjectionMatrix();
         } else {
-            HmdMatrix44_t mat = vrsystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left, cam.getFrustumNear(), cam.getFrustumFar());
+            HmdMatrix44_t mat = vrSystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left, cam.getFrustumNear(), cam.getFrustumFar());
             hmdProjectionLeftEye = new Matrix4f();
             convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionLeftEye);
             return hmdProjectionLeftEye;
@@ -464,10 +464,10 @@ public class OpenVR implements VRAPI {
     public Matrix4f getHMDMatrixProjectionRightEye(Camera cam){
         if( hmdProjectionRightEye != null ) {
             return hmdProjectionRightEye;
-        } else if(vrsystemFunctions == null){
+        } else if(vrSystemFunctions == null){
             return cam.getProjectionMatrix();
         } else {
-            HmdMatrix44_t mat = vrsystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right, cam.getFrustumNear(), cam.getFrustumFar());
+            HmdMatrix44_t mat = vrSystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right, cam.getFrustumNear(), cam.getFrustumFar());
             hmdProjectionRightEye = new Matrix4f();
             convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionRightEye);
             return hmdProjectionRightEye;
@@ -505,10 +505,10 @@ public class OpenVR implements VRAPI {
         if( environment.isSeatedExperience() == false ) return Vector3f.ZERO;
         if( hmdSeatToStand == null ) {
             hmdSeatToStand = new Vector3f();
-            HmdMatrix34_t mat = vrsystemFunctions.GetSeatedZeroPoseToStandingAbsoluteTrackingPose.apply();
-            Matrix4f tempmat = new Matrix4f();
-            convertSteamVRMatrix3ToMatrix4f(mat, tempmat);
-            tempmat.toTranslationVector(hmdSeatToStand);
+            HmdMatrix34_t mat = vrSystemFunctions.GetSeatedZeroPoseToStandingAbsoluteTrackingPose.apply();
+            Matrix4f tempMatrix = new Matrix4f();
+            convertSteamVRMatrix3ToMatrix4f(mat, tempMatrix);
+            tempMatrix.toTranslationVector(hmdSeatToStand);
         }
         return hmdSeatToStand;
     }
@@ -517,10 +517,10 @@ public class OpenVR implements VRAPI {
     public Matrix4f getHMDMatrixPoseLeftEye(){
         if( hmdPoseLeftEye != null ) {
             return hmdPoseLeftEye;
-        } else if(vrsystemFunctions == null) {
+        } else if(vrSystemFunctions == null) {
             return Matrix4f.IDENTITY;
         } else {
-            HmdMatrix34_t mat = vrsystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left);
+            HmdMatrix34_t mat = vrSystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left);
             hmdPoseLeftEye = new Matrix4f();
             return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseLeftEye);
         }
@@ -528,15 +528,15 @@ public class OpenVR implements VRAPI {
 
     @Override
     public HmdType getType() {
-        if( vrsystemFunctions != null ) {
+        if( vrSystemFunctions != null ) {
             Pointer str1 = new Memory(128);
             Pointer str2 = new Memory(128);
             String completeName = "";
-            vrsystemFunctions.GetStringTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd,
+            vrSystemFunctions.GetStringTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd,
                                                                    JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_ManufacturerName_String,
                                                                    str1, 128, hmdErrorStore);
             if( hmdErrorStore.getValue() == 0 ) completeName += str1.getString(0);
-            vrsystemFunctions.GetStringTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd,
+            vrSystemFunctions.GetStringTrackedDeviceProperty.apply(JOpenVRLibrary.k_unTrackedDeviceIndex_Hmd,
                                                                    JOpenVRLibrary.ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_ModelNumber_String,
                                                                    str2, 128, hmdErrorStore);
             if( hmdErrorStore.getValue() == 0 ) completeName += " " + str2.getString(0);
@@ -573,10 +573,10 @@ public class OpenVR implements VRAPI {
     public Matrix4f getHMDMatrixPoseRightEye(){
         if( hmdPoseRightEye != null ) {
             return hmdPoseRightEye;
-        } else if(vrsystemFunctions == null) {
+        } else if(vrSystemFunctions == null) {
             return Matrix4f.IDENTITY;
         } else {
-            HmdMatrix34_t mat = vrsystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right);
+            HmdMatrix34_t mat = vrSystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right);
             hmdPoseRightEye = new Matrix4f();
             return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseRightEye);
         }

+ 4 - 4
jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java

@@ -91,7 +91,7 @@ public class OpenVRInput implements VRInputAPI {
 
     private final Vector3f tempVel = new Vector3f();
 
-    private final Quaternion tempq = new Quaternion();
+    private final Quaternion tempQuaternion = new Quaternion();
 
     private VREnvironment environment;
 
@@ -386,12 +386,12 @@ public class OpenVRInput implements VRInputAPI {
 
                 Object obs = environment.getObserver();
                 if( obs instanceof Camera ) {
-                    tempq.set(((Camera)obs).getRotation());
+                    tempQuaternion.set(((Camera)obs).getRotation());
                 } else {
-                    tempq.set(((Spatial)obs).getWorldRotation());
+                    tempQuaternion.set(((Spatial)obs).getWorldRotation());
                 }
 
-                return tempq.multLocal(getOrientation(index));
+                return tempQuaternion.multLocal(getOrientation(index));
             } else {
                 throw new IllegalStateException("VR environment has no valid view manager.");
             }