public int collideWith(Collidable other,
            Matrix4f worldMatrix,
            BoundingVolume worldBound,
            CollisionResults results) {

        switch (mode) {
            case Points:
            case Lines:
            case LineStrip:
            case LineLoop:
                /*
                 * Collisions can be detected only with triangles,
                 * and there are no triangles in this mesh.
                 */
                return 0;
        }

        if (getVertexCount() == 0) {
            return 0;
        }

        if (collisionTree == null) {
            createCollisionData();
        }

        return collisionTree.collideWith(other, worldMatrix, worldBound, results);
    }
Handles collision detection, internal use only.
User code should only use collideWith() on scene
graph elements such as {@link Spatial}s.

@param other the other Collidable
@param worldMatrix the world matrix
@param worldBound the world bound
@param results storage for the results
@return the number of collisions detected (&ge;0)
jme3-core/src/main/java/com/jme3/scene/Mesh.java