Fixed bug in normal rendering, caused the angle to rotate for more
thorough testing. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1553 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: WhichSideViz.java,v 1.1 2002/06/28 01:29:32 mdb Exp $
|
// $Id: WhichSideViz.java,v 1.2 2002/06/28 01:31:11 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.geom;
|
package com.threerings.geom;
|
||||||
|
|
||||||
@@ -45,8 +45,8 @@ public class WhichSideViz extends JPanel
|
|||||||
g.setColor(Color.white);
|
g.setColor(Color.white);
|
||||||
g.drawLine(_center.x, _center.y, _center.x - dx, _center.y - dy);
|
g.drawLine(_center.x, _center.y, _center.x - dx, _center.y - dy);
|
||||||
|
|
||||||
int nx = (int)Math.round(1000*Math.cos(_theta + Math.PI/2)),
|
int nx = _center.x + (int)Math.round(1000*Math.cos(_theta + Math.PI/2)),
|
||||||
ny = (int)Math.round(1000*Math.sin(_theta + Math.PI/2));
|
ny = _center.y + (int)Math.round(1000*Math.sin(_theta + Math.PI/2));
|
||||||
g.setColor(Color.pink);
|
g.setColor(Color.pink);
|
||||||
g.drawLine(_center.x, _center.y, nx, ny);
|
g.drawLine(_center.x, _center.y, nx, ny);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ public class WhichSideViz extends JPanel
|
|||||||
g.drawString(str, _spot.x, _spot.y);
|
g.drawString(str, _spot.x, _spot.y);
|
||||||
|
|
||||||
// kick theta along for the next tick because it's fun
|
// kick theta along for the next tick because it's fun
|
||||||
// _theta += (float)(Math.PI/100);
|
_theta += (float)(Math.PI/100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mouseDragged (MouseEvent event)
|
public void mouseDragged (MouseEvent event)
|
||||||
|
|||||||
Reference in New Issue
Block a user