Class Panel3D.DrawablePolygon

  extended by smithers.java3d.Drawable3D
      extended by smithers.java3d.Panel3D.DrawablePolygon
Enclosing class:

public static class Panel3D.DrawablePolygon
extends Drawable3D

A simple drawable object which draws and fills a Polygon3D.

Field Summary
Fields inherited from class smithers.java3d.Drawable3D
Constructor Summary
Panel3D.DrawablePolygon(Polygon3D poly, java.awt.Color draw, java.awt.Color fill)
          Creates a new DrawablePolygon with the specified polygon and draw and fill colours.
Method Summary
 java.awt.Shape drawOn(java.awt.Graphics2D g, Transformation trans)
          Draws this object.
Methods inherited from class smithers.java3d.Drawable3D
addMouesWheelListener, addMouseListener, addMouseMotionListener, getShape, removeMouesWheelListener, removeMouseListener, removeMouseMotionListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Panel3D.DrawablePolygon(Polygon3D poly,
                               java.awt.Color draw,
                               java.awt.Color fill)
Creates a new DrawablePolygon with the specified polygon and draw and fill colours. The colours can be null, which indicates not to perform the corresponding operation.

poly - the polygon to draw
draw - the colour to outline the polygon in
fill - the colour to fill the polygon with
Method Detail


public java.awt.Shape drawOn(java.awt.Graphics2D g,
                             Transformation trans)
Draws this object. This method should draw the object, as transformed by trans, on g. The method should return a Shape, indicating the region which it covered. This is to enable the container to deliver mouse events.

Specified by:
drawOn in class Drawable3D
g - the graphics object on which to draw
trans - the transformation to use
the region of space which was filled