Proposed fix for issue #615

May I commit the following patch to

/trunk/engine/src/core/com/jme3/scene/shape/Dome.java
and
/branches/gradle-restructure/jme3-core/src/main/java/com/jme3/scene/shape/Dome.java

--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -250,7 +250,7 @@
                 BufferUtils.populateFromBuffer(tempVa, vb, i);
                 kNormal = tempVa.subtractLocal(center);
                 kNormal.normalizeLocal();
-                if (insideView) {
+                if (!insideView) {
                     nb.put(kNormal.x).put(kNormal.y).put(kNormal.z);
                 } else {
                     nb.put(-kNormal.x).put(-kNormal.y).put(-kNormal.z);
@@ -267,7 +267,7 @@
 
         // pole
         vb.put(center.x).put(center.y + radius).put(center.z);
-        nb.put(0).put(insideView ? 1 : -1).put(0);
\ No newline at end of file
+        nb.put(0).put(insideView ? -1 : 1).put(0);
\ No newline at end of file
         tb.put(0.5f).put(1.0f);
 
         // allocate connectivity

An alternative would be to rename “insideView” to “outsideView” and rewrite the javadoc accordingly – slightly confusing but less likely to break existing apps.

1 Like

I’m fine with it. It probably breaks people that are used to the ‘bug’ but I’m ok with that on trunk for this.

Okay, I’ve tested and committed the proposed fix to both trunk and gradle-restructure. Again, I could use some help closing out the issue.

1 Like

I closed it
thanks

3 Likes