diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-02-12 18:57:14 +0000 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2011-02-12 18:57:14 +0000 |
commit | c663dffc86a7fcec9f05aaf8a107e6200a35c2fa (patch) | |
tree | 4642d001dddf0042854c77cafd245b37cb9062ee /src/tesseract/objects/HalfSpace.java | |
parent | 354a7aa455a016ac179d7f027014e6b9c2a2433a (diff) |
Added HalfSpaces to the bounds. Fixed collisions and particle emitters. Corrected typo in PlanarPolygonMenuItem. Added removeForce() to world and cleaned up the force adding/removing.
Diffstat (limited to 'src/tesseract/objects/HalfSpace.java')
-rw-r--r-- | src/tesseract/objects/HalfSpace.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tesseract/objects/HalfSpace.java b/src/tesseract/objects/HalfSpace.java new file mode 100644 index 0000000..df3f715 --- /dev/null +++ b/src/tesseract/objects/HalfSpace.java @@ -0,0 +1,17 @@ +package tesseract.objects; + +import javax.vecmath.Vector3f; + +public class HalfSpace extends PhysicalObject { + public Vector3f normal; + // Right-hand side of the plane equation: Ax + By + Cz = D + public float intercept; + + public HalfSpace(Vector3f position, Vector3f normal) { + super(position, Float.POSITIVE_INFINITY); + + this.normal = new Vector3f(normal); + this.normal.normalize(); + this.intercept = this.normal.dot(position); + } +} |