Normand Briere
2019-06-11 5e6a6f3319f0c4c687fe71952ac9ecc17792b83a
Fix normal for mesh
2 files modified
4 ■■■■ changed files
Vertex.java 2 ●●● patch | view | raw | blame | history
cSpring.java 2 ●●● patch | view | raw | blame | history
Vertex.java
....@@ -122,7 +122,7 @@
122122
123123 public boolean equals(Object o)
124124 {
125
- assert(norm.normalized());
125
+ // JUNE 2019. norm can be null (e.g. Box) Grafreed.Assert(norm.normalized());
126126 //if (true) return false;
127127
128128 Vertex vert = (Vertex) o;
cSpring.java
....@@ -1724,7 +1724,7 @@
17241724
17251725 // Phys.matrix.Transform(normal);
17261726
1727
- if (position instanceof Vertex)
1727
+ if (position instanceof Vertex && ((Vertex)position).norm != null)
17281728 ((Vertex)position).norm.set(normal.x,normal.y,normal.z);
17291729 }
17301730