Bugfix: issue #615 (backward Dome normals) in trunk
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11076 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
e4b56f2976
commit
f5acd4f1b7
@ -250,7 +250,7 @@ public class Dome extends Mesh {
|
|||||||
BufferUtils.populateFromBuffer(tempVa, vb, i);
|
BufferUtils.populateFromBuffer(tempVa, vb, i);
|
||||||
kNormal = tempVa.subtractLocal(center);
|
kNormal = tempVa.subtractLocal(center);
|
||||||
kNormal.normalizeLocal();
|
kNormal.normalizeLocal();
|
||||||
if (insideView) {
|
if (!insideView) {
|
||||||
nb.put(kNormal.x).put(kNormal.y).put(kNormal.z);
|
nb.put(kNormal.x).put(kNormal.y).put(kNormal.z);
|
||||||
} else {
|
} else {
|
||||||
nb.put(-kNormal.x).put(-kNormal.y).put(-kNormal.z);
|
nb.put(-kNormal.x).put(-kNormal.y).put(-kNormal.z);
|
||||||
@ -267,7 +267,7 @@ public class Dome extends Mesh {
|
|||||||
|
|
||||||
// pole
|
// pole
|
||||||
vb.put(center.x).put(center.y + radius).put(center.z);
|
vb.put(center.x).put(center.y + radius).put(center.z);
|
||||||
nb.put(0).put(insideView ? 1 : -1).put(0);
|
nb.put(0).put(insideView ? -1 : 1).put(0);
|
||||||
tb.put(0.5f).put(1.0f);
|
tb.put(0.5f).put(1.0f);
|
||||||
|
|
||||||
// allocate connectivity
|
// allocate connectivity
|
||||||
|
Loading…
x
Reference in New Issue
Block a user