As discussed in the forum
(http://hub.jmonkeyengine.org/forum/topic/pyramid-dome-gets-point-light-in-wrong
-sides/), the Dome class generates outward-facing normal vectors when
insideView is true and inward-facing normal vectors when insideView is false.
Here is a two-line fix:
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- 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
Original issue reported on code.google.com by sg...@sonic.net on 19 Dec 2013 at 3:00
Original issue reported on code.google.com by
sg...@sonic.net
on 19 Dec 2013 at 3:00