As collision-detection-algorithms are not implemented for QuadMesh (caution: QuadMesh!=Quad) we need something like a warning! Actually I think that mostly people using HottBJ-Exporter might find this problem. I quite often forget to convert the mesh to triangles and then wonder why the collision is not working. I have for me decided to throw an exception to notify me about this. Might be bit drastic, but as logger-output is very fast overseen it seems to me the best way. Here a patch that is more a suggestion or a first approach. What is the rest of the community thinking how to handle not implemented methods (there might be more of such cases??).
Index: src/com/jme/scene/QuadMesh.java
===================================================================
--- src/com/jme/scene/QuadMesh.java (revision 4792)
+++ src/com/jme/scene/QuadMesh.java (working copy)
@@ -381,13 +381,13 @@
@Override
public void findCollisions(
Spatial scene, CollisionResults results, int requiredOnBits) {
- ; // unsupported
+ throw new RuntimeException("FIND COLLISIONS NOT IMPLEMENTS FOR QUADMESH! ("+toString()+")");
}
@Override
public boolean hasCollision(
Spatial scene, boolean checkTriangles, int requiredOnBits) {
- return false;
+ throw new RuntimeException("hasCollision NOT IMPLEMENTS FOR QUADMESH!");
}
}
PS: hehe! ok the text could be changed
