From d70174d91a9d187e4a61494df7782237dd328fe2 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Wed, 18 Sep 2013 08:57:39 +0000 Subject: [PATCH] Added a proper toString() to CollisionResult. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10790 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../core/com/jme3/collision/CollisionResult.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/engine/src/core/com/jme3/collision/CollisionResult.java b/engine/src/core/com/jme3/collision/CollisionResult.java index 40b938c61..a777bc9b6 100644 --- a/engine/src/core/com/jme3/collision/CollisionResult.java +++ b/engine/src/core/com/jme3/collision/CollisionResult.java @@ -38,9 +38,9 @@ import com.jme3.scene.Mesh; /** * A CollisionResult represents a single collision instance - * between two {@link Collidable}. A collision check can result in many + * between two {@link Collidable}. A collision check can result in many * collision instances (places where collision has occured). - * + * * @author Kirill Vainer */ public class CollisionResult implements Comparable { @@ -108,7 +108,7 @@ public class CollisionResult implements Comparable { } return super.equals(obj); } - + public Vector3f getContactPoint() { return contactPoint; } @@ -129,4 +129,12 @@ public class CollisionResult implements Comparable { return triangleIndex; } + public String toString() { + return "CollisionResult[geometry=" + geometry + + ", contactPoint=" + contactPoint + + ", contactNormal=" + contactNormal + + ", distance=" + distance + + ", triangleIndex=" + triangleIndex + + "]"; + } }