summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-02-16 01:07:11 +0000
committerJesse Morgan <jesse@jesterpm.net>2011-02-16 01:07:11 +0000
commit65e7c0b8e4eb05510b25d44f6679a69166bdfeaa (patch)
tree8dd885e575dabe386b05168a9559586feea32eec
parent82f9b5c81896cbd62c84df89df839c497a3e2ebc (diff)
Cleaned up code.
-rw-r--r--src/tesseract/objects/ChainLink2.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/tesseract/objects/ChainLink2.java b/src/tesseract/objects/ChainLink2.java
index e98280b..0678c69 100644
--- a/src/tesseract/objects/ChainLink2.java
+++ b/src/tesseract/objects/ChainLink2.java
@@ -105,22 +105,17 @@ public class ChainLink2 extends PhysicalObject {
double theta = 2 * Math.PI / sliceDivisions;
float radius = diameter / 2.0f;
- // Translate the coords to the correct place.
- Transform3D t3d = new Transform3D();
-
for (int i = 0; i < sliceDivisions; i++) {
coords[0][i] = new Point3f(
0f,
(float) (radius * Math.cos(i * theta)),
(float) (radius * Math.sin(i * theta)));
-
- // Move to the right place.
- //t3d.transform(coords[0][i]);
}
// Create the arc
radius = (width - radius) / 2.0f;
+ Transform3D t3d = new Transform3D();
t3d.setIdentity();
t3d.setTranslation(new Vector3f(0, -radius, 0));
@@ -128,7 +123,6 @@ public class ChainLink2 extends PhysicalObject {
tmp.rotZ(Math.PI / (sliceCount / 2.0 - 1));
t3d.mul(tmp);
tmp.setIdentity();
- //new Vector3f(-(length / 2.0f - radius), -width / 2.0f, 0));
tmp.setTranslation(new Vector3f(0, radius, 0));
t3d.mul(tmp);
@@ -167,7 +161,6 @@ public class ChainLink2 extends PhysicalObject {
PointArray.COORDINATES,
4 * sliceDivisions * sliceCount);
- // TODO: Remove /2
for (int i = 0; i < sliceCount; i++) {
geometry.setCoordinates(i * sliceDivisions, coords[i]);
}