source.ucregents.playground.physics
Class DrawableAxes

java.lang.Object
  extended by source.ucregents.playground.physics.DrawableAxes

public class DrawableAxes
extends java.lang.Object

This class is used for demonstration purposes to draw the axis and project all the polygons in the arena on to them. While drawing, efficiency is highly decreased


Constructor Summary
DrawableAxes(int x_origin, int y_origin)
           
DrawableAxes(java.awt.geom.Point2D.Double origin)
           
 
Method Summary
 void Draw(java.awt.Graphics2D g, java.util.Vector<BaseEntity> entitiesToDrawAxes)
           
 java.awt.geom.Point2D.Double getAxesOrigin()
          Gets the current origin of the axes
 void setAxesOrigin(int x_origin, int y_origin)
          Moves the center of all of the axes around in the editor and arena
 void setAxesOrigin(java.awt.geom.Point2D.Double newOrigin)
          Moves the center of all of the axes around in the editor and arena
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableAxes

public DrawableAxes(int x_origin,
                    int y_origin)

DrawableAxes

public DrawableAxes(java.awt.geom.Point2D.Double origin)
Method Detail

Draw

public void Draw(java.awt.Graphics2D g,
                 java.util.Vector<BaseEntity> entitiesToDrawAxes)

getAxesOrigin

public java.awt.geom.Point2D.Double getAxesOrigin()
Gets the current origin of the axes

Returns:
The current origin of the axes

setAxesOrigin

public void setAxesOrigin(int x_origin,
                          int y_origin)
Moves the center of all of the axes around in the editor and arena

Parameters:
x_origin - The new x coordinate for the origin of the axes
y_origin - The new y coordinate for the origin of the axes

setAxesOrigin

public void setAxesOrigin(java.awt.geom.Point2D.Double newOrigin)
Moves the center of all of the axes around in the editor and arena

Parameters:
newOrigin - The new origin for the axes