bTransform.setRotationQuaternion(b.parentGeom.getWorldRotation()); bTransform.setTranslation(b.parentGeom.getWorldTranslation()); bTransform.setScale(b.parentGeom.getWorldScale());
bTransform.setRotationQuaternion(b.getParentGeom().getWorldRotation()); bTransform.setTranslation(b.getParentGeom().getWorldTranslation()); bTransform.setScale(b.getParentGeom().getWorldScale());
	public static boolean meshIntersection(TriangleBatch a, TriangleBatch b) {		IntBuffer indexA = a.getIndexBuffer();		IntBuffer indexB = b.getIndexBuffer();		TransformMatrix aTransform = new TransformMatrix();		aTransform.setRotationQuaternion(a.parentGeom.getWorldRotation());		aTransform.setTranslation(a.parentGeom.getWorldTranslation());		aTransform.setScale(a.parentGeom.getWorldScale());		TransformMatrix bTransform = new TransformMatrix();		bTransform.setRotationQuaternion(b.parentGeom.getWorldRotation());		bTransform.setTranslation(b.parentGeom.getWorldTranslation());		bTransform.setScale(b.parentGeom.getWorldScale());		Vector3f[] vertA = BufferUtils.getVector3Array(a.getVertexBuffer());		for (int i = 0; i < vertA.length; i++)			aTransform.multPoint(vertA[i]);		Vector3f[] vertB = BufferUtils.getVector3Array(b.getVertexBuffer());		for (int i = 0; i < vertB.length; i++)			bTransform.multPoint(vertB[i]);		for (int i = 0; i < a.getTriangleCount(); i++) {			for (int j = 0; j < b.getTriangleCount(); j++) {				if (intersection(vertA[indexA.get(i * 3 + 0)],						vertA[indexA.get(i * 3 + 1)], vertA[indexA.get(i * 3 + 2)],						vertB[indexB.get(j * 3 + 0)], vertB[indexB.get(j * 3 + 1)],						vertB[indexB.get(j * 3 + 2)]))					return true;			}		}		return false;	}