A B C D F G H I L M O P R S T U V X Y

## A

actionPerformed(ActionEvent) - Method in class ButtonPanel
  Handle the events from the drop down menu and the buttons.
add(Vector2D) - Method in class Vector2D
  Return the result of adding this vector to a.
add(Vector2D, Vector2D) - Static method in class Vector2D
  Return the result of adding a and b.
addOn(Vector2D) - Method in class Vector2D
  Add v to this vector.

## B

Block - Class in <Unnamed>
  An instance is a square block/pixel primitive for representing image-based rigid objects and resolving contacts.
BlockTree - Class in <Unnamed>
  An instance is a non-empty collection of points organized in a hierarchical binary tree structure.
BlockTree(ArrayList<Block>) - Constructor for class BlockTree
  Constructor: a binary tree containing blocks.
BoundingBox - Class in <Unnamed>
  An instance is a 2D bounding box.
BoundingBox(BoundingBox) - Constructor for class BoundingBox
  Constructor: an instance is a copy of bounding box b.
BoundingBox(Vector2D, Vector2D) - Constructor for class BoundingBox
  Constructor: An instance with lower as smaller coordinates and upper as larger coordinates.
ButtonPanel - Class in <Unnamed>
  JPanel for the image drop down menu and the buttons.
ButtonPanel(Canvas, String[]) - Constructor for class ButtonPanel
  Constructor: an instance using canvas c and names bmpFileNames

## C

Canvas - Class in <Unnamed>
  This JPanel represents the area on the main window where images/shapes are drawn.
Canvas(GUI, int, int) - Constructor for class Canvas
  Constructor: a canvas of width w and height h on mainWindow.
clear() - Method in class Shape
  "Clear" the shape from displacement and turned on flags.
click() - Method in class Shape
  Toggle the clickedOn flag.
contains(Vector2D) - Method in class Block
  Return true iff this block contains point p
contains(Vector2D) - Method in class BlockTree
  Return true iff this collection of blocks contains point p.
contains(Vector2D) - Method in class BoundingBox
  Return true iff this bounding box contains p.
contains(Vector2D) - Method in class Shape
  Return true iff this shape contains point p.

## D

displace(Vector2D) - Method in class Shape
  (Further) displace this shape by displacement vector v.
displaced(Vector2D) - Method in class BoundingBox
  Return the result of displacing this bounding box by d.
display(Graphics, double, Vector2D, boolean, boolean) - Method in class Block
  Draw this block using g, which must be a Graphics2D object.
dist(Vector2D, Vector2D) - Static method in class Vector2D
  Return the Euclidean distance between points a and b.

## F

findBBox(Iterator<Block>) - Static method in class BoundingBox
  Return the bounding box of blocks given by iter.

## G

getArea() - Method in class BoundingBox
  Return the area of this bounding box.
getBBox() - Method in class Block
  Return the bounding box of this block.
getBlocks() - Method in class ImageBlocker
  Return the nonempty Blocks of the image.
getBox() - Method in class BlockTree
  Return the bounding box of the collection of blocks.
getCenter() - Method in class BoundingBox
  Return the center of this bounding box.
getCol() - Method in class Block
  Return the Image column.
getColorMass() - Method in class Block
  Return the color-based mass on [0,1] with white having 0 mass and darker colors approaching 1 (feel free to modify).
getHalfwidth() - Method in class Block
  Return the halfwidth of block.
getHeight() - Method in class BoundingBox
  Return the height of this bounding box (along y-dimension).
getLargeConnectedComponents(double) - Method in class ImageBlocker
  Return a list of the largest connected components.
getLength() - Method in class BoundingBox
  Return the larger of the width and height of this bounding box.
getNumBlocks() - Method in class BlockTree
  Return the number of blocks contained in this tree.
getPosition() - Method in class Block
  Return the center position of this Block (in body coordinates).
getRow() - Method in class Block
  Return the Image row.
getWidth() - Method in class BoundingBox
  Return the width of this bounding box (along x-dimension).
GUI - Class in <Unnamed>
  The class for the main program.
GUI() - Constructor for class GUI
  Constructor: an instance that has the GUI

## H

halfwidth - Variable in class Block

## I

ImageBlocker - Class in <Unnamed>
  Convert an image into Block objects, and identifies connected components to generate "RigidBody" objects.
ImageBlocker(String) - Constructor for class ImageBlocker
  Constructor: an imageblocker for image with name fileName.
isIntermediate() - Method in class BlockTree
  Return true iff this is an intermediate node.
isLeaf() - Method in class BlockTree
  Return true iff this is a leaf node.

## L

lower - Variable in class BoundingBox
  The corner of the bounding box with the smaller x,y coordinates.

## M

main(String[]) - Static method in class GUI
  Main program.
main(String[]) - Static method in class ImageBlocker
  Program entry point.
minus(Vector2D) - Method in class Vector2D
  Return the result of subtracting b from this vector.
mouseClicked(MouseEvent) - Method in class Canvas
  Process click event e
mouseDragged(MouseEvent) - Method in class Canvas
  Process the event of mouse being dragged.
mouseEntered(MouseEvent) - Method in class Canvas
mouseExited(MouseEvent) - Method in class Canvas
mouseMoved(MouseEvent) - Method in class Canvas
mousePressed(MouseEvent) - Method in class Canvas
  Process the event of left mouse button being pressed.
mouseReleased(MouseEvent) - Method in class Canvas
  Process the event of left mouse button being released.

## O

overlaps(Block, Vector2D, Block, Vector2D) - Static method in class Block
  Return true iff block b displaced by u overlaps block c displaced by v.
overlaps(Vector2D, BlockTree, Vector2D) - Method in class BlockTree
  Return true iff (this tree displaced by thisD) and (tree t displaced by d) overlap.
overlaps(BoundingBox) - Method in class BoundingBox
  Return true iff this bounding box overlaps with box.

## P

paint(Graphics) - Method in class Canvas
  Paint the canvas using g.
paint(Graphics, double) - Method in class Shape
  Paint using g, using scale to scale the image.
position - Variable in class Block
  Body-frame position --- needed for contact processing.

## R

resetObjects() - Method in class Canvas
  Reset the shapes to their original positions.

## S

setNewImage(String) - Method in class Canvas
  Change the current image to imgFileName.
Shape - Class in <Unnamed>
  An instance is a collection of blocks.
Shape(HashSet<Block>) - Constructor for class Shape
  Constructor: An instance containing blocks.
shuffleObjects() - Method in class Canvas
  Shuffle the objects.

## T

toString() - Method in class Block
  Return a representation of this Block.
toString() - Method in class BlockTree
  Return a representation of this instance.
toString(Vector2D) - Method in class BlockTree
  Return a representation of this tree displaced by d.
toString() - Method in class BoundingBox
  Return a representation of this bounding box.
toString() - Method in class Vector2D
  Return a representation (x, y) of this instance.

## U

upper - Variable in class BoundingBox
  The corner of the bounding box with the larger x,y coordinates.

## V

Vector2D - Class in <Unnamed>
  A 2D vector with components of double precision.
Vector2D(Vector2D) - Constructor for class Vector2D
  Constructor: A copy of p.
Vector2D(Point2d) - Constructor for class Vector2D
  Constructor: a copy of p.
Vector2D(double, double) - Constructor for class Vector2D
  Constructor a Vector with components x and y.

## X

x - Variable in class Vector2D

## Y

y - Variable in class Vector2D

A B C D F G H I L M O P R S T U V X Y