org.vizzini.ui.graphics.shape
Class Cylinder

java.lang.Object
  extended by org.vizzini.ui.graphics.shape.AbstractShape
      extended by org.vizzini.ui.graphics.shape.ExtrudedShape
          extended by org.vizzini.ui.graphics.shape.Cylinder
All Implemented Interfaces:
Comparable, IStateful, IShape

public class Cylinder
extends ExtrudedShape

Shape class for a simple cylinder. The sides of the cylinder are rectangles, and the end caps are polygons. This is not a smooth cylinder.

Since:
v0.2
Version:
v0.3
Author:
Jeffrey M. Thompson

Field Summary
 
Fields inherited from class org.vizzini.ui.graphics.shape.ExtrudedShape
_beginCap, _endCap, _isHighlighted, _polygons, _spineLength
 
Fields inherited from class org.vizzini.ui.graphics.shape.AbstractShape
_isWireframe, _points, _screenCenter, _screenPoints, _shapeGroup, _zNormal
 
Constructor Summary
Cylinder(int numSides, double width, double height, double depth)
          Construct this object with the given parameters.
 
Method Summary
protected  void computeCrossSection(int segments)
          Compute the cross-section points.
 
Methods inherited from class org.vizzini.ui.graphics.shape.ExtrudedShape
computePolygonShapes, computeScreenPoints, contains, drawOn, initPoints, processPolygonShape, releasePolygonShapes, setBeginCap, setEndCap, setHighlightColor, setHighlighted
 
Methods inherited from class org.vizzini.ui.graphics.shape.AbstractShape
add, clear, compareTo, computeCenteredScreenPoints, computeNormalZComponent, computeScreenCenter, createState, createStatefulSupport, drawOn, drawOnSolid, drawOnWireframe, getAbsoluteState, getBounds, getChildren, getColor, getColorForIntensity, getDepth, getDimensions, getHeight, getMinDimension, getName, getScreenCenter, getShapeGroup, getState, getStatefulParent, getTextureFilepath, getWidth, isInFrontOf, isLightSource, isTextureFilepathSet, isVisible, isWireframe, remove, setColor, setLightSource, setName, setStatefulParent, setTextureFilepath, setVisible, setWireframe, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cylinder

public Cylinder(int numSides,
                double width,
                double height,
                double depth)
Construct this object with the given parameters.

Parameters:
numSides - The number of sides to the cylinder.
width - Width.
height - Height.
depth - Depth.
Since:
v0.2
Method Detail

computeCrossSection

protected void computeCrossSection(int segments)
Compute the cross-section points.

Parameters:
segments - The number of segments.
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02