physics
Class CollisionGroup

java.lang.Object
  extended by physics.CollisionGroup

public class CollisionGroup
extends java.lang.Object


Constructor Summary
CollisionGroup(DrawingCanvas dp)
          Creates a new CollisionGroup instance.
 
Method Summary
 void add(CollisionObject co)
          Adds a CollisionObject to the CollisionGroup
 void addAllWalls()
          Add all the walls to the Collision Group
 void addEastWall()
          Adds the East Wall to the Collision Group
 void addNorthWall()
          Adds the North Wall to the Collision Group
 void addSouthWall()
          Adds the South Wall to the Collision Group
 void addWestWall()
          addWestWall Adds the West Wall to the Collision Group
 DrawingCanvas getDP()
          Returns the DrawingPanel that the Collision Objects are on
 java.util.ArrayList getGroup()
          Returns the Arraylist containing the CollsionObjects
 void remove(CollisionObject co)
          Removes the CollisionObject from the group
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionGroup

public CollisionGroup(DrawingCanvas dp)
Creates a new CollisionGroup instance.

Parameters:
dp - a NGP.Containers.DrawingPanel that the Collision Objects of this group are on
Method Detail

add

public void add(CollisionObject co)
Adds a CollisionObject to the CollisionGroup

Parameters:
co - a CollisionObject to add to the group

getGroup

public java.util.ArrayList getGroup()
Returns the Arraylist containing the CollsionObjects

Returns:
an ArrayList containing the CollisionObjects in this group

remove

public void remove(CollisionObject co)
Removes the CollisionObject from the group

Parameters:
co - a CollisionObject to be removed

addNorthWall

public void addNorthWall()
Adds the North Wall to the Collision Group


addSouthWall

public void addSouthWall()
Adds the South Wall to the Collision Group


addWestWall

public void addWestWall()
addWestWall Adds the West Wall to the Collision Group


addEastWall

public void addEastWall()
Adds the East Wall to the Collision Group


addAllWalls

public void addAllWalls()
Add all the walls to the Collision Group


getDP

public DrawingCanvas getDP()
Returns the DrawingPanel that the Collision Objects are on

Returns:
a NGP.Containers.DrawingPanel that contains the Collision Objects