Environment2D
Class Environment2D

java.lang.Object
  extended by Environment2D.Environment2D

public class Environment2D
extends java.lang.Object

Represents a 2D euclidean plane on which objects can be placed and manipulated.


Constructor Summary
Environment2D()
           
 
Method Summary
 void addMember(Shape2D p_shape)
          Adds a member to the plane so that it may be manipulated or displayed.
 void removeMember(Shape2D p_shape)
          Removes a member from the plane.
 void view(java.awt.Graphics g, Viewport2D p_view, java.awt.Dimension p_graphicsSize)
          Draws a set viewport onto a graphics plane, applying transformatinos as necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Environment2D

public Environment2D()
Method Detail

addMember

public void addMember(Shape2D p_shape)
Adds a member to the plane so that it may be manipulated or displayed.

Parameters:
p_shape - A shape to add to the plane

removeMember

public void removeMember(Shape2D p_shape)
Removes a member from the plane. Does nothing if the member is not present.

Parameters:
p_shape - A reference to the shape to remove.

view

public void view(java.awt.Graphics g,
                 Viewport2D p_view,
                 java.awt.Dimension p_graphicsSize)
Draws a set viewport onto a graphics plane, applying transformatinos as necessary.

Parameters:
g - The graphics object on which to draw.
p_view - A viewport defining the x, y, width and height to output from the plane.
p_graphicsSize - The size of the graphics plane you wish to output onto (or the segment on it).