|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.ui.graphics.shape.AbstractShape
org.vizzini.ui.graphics.shape.PolygonShape
public final class PolygonShape
Provides a polygon shape for the 3D graphics system. For this object the points and screenPoints are interchangeable.
Field Summary |
---|
Fields inherited from class org.vizzini.ui.graphics.shape.AbstractShape |
---|
_isWireframe, _points, _screenCenter, _screenPoints, _shapeGroup, _zNormal |
Constructor Summary | |
---|---|
PolygonShape()
Construct this object. |
|
PolygonShape(Color color,
List points)
Construct this object with the given parameters. |
|
PolygonShape(Color color,
List points,
boolean isWireframe)
Construct this object with the given parameters. |
Method Summary | |
---|---|
int |
compareTo(Object object)
Compare this shape to the given object. |
void |
computeScreenPoints(Quaternion q,
Vector v,
double magnify,
int offsetX,
int offsetY,
double d)
Compute the points of this shape in screen coordinates. |
boolean |
contains(Point point)
Return true if the given point is within this shape. |
void |
drawOn(Graphics g,
double magnify)
Draw this shape on the given graphics with the given magnification. |
protected double |
getScreenZ()
Compute the Z coordinate in screen coordinates. |
void |
initPoints(List points)
Initialize this polygon with the given points. |
void |
setHighlightColor(Color color)
Set the highlight color. |
void |
setHighlightSegment(int node1,
int node2)
Set a segment for highlighting. |
Polygon |
toPolygon()
Return a java.awt.Polygon instance of this. |
String |
toString()
Return a string representation of this object. |
Methods inherited from class org.vizzini.ui.graphics.shape.AbstractShape |
---|
add, clear, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PolygonShape()
public PolygonShape(Color color, List points)
public PolygonShape(Color color, List points, boolean isWireframe)
Method Detail |
---|
public int compareTo(Object object)
compareTo
in interface Comparable
compareTo
in class AbstractShape
public void computeScreenPoints(Quaternion q, Vector v, double magnify, int offsetX, int offsetY, double d)
computeScreenPoints
in interface IShape
computeScreenPoints
in class AbstractShape
q
- The parent quaternion.magnify
- The magnification.offsetX
- The offset X coordinate.offsetY
- The offset Y coordinate.d
- Perspective constant.v
- The parent position in world coordinates..public boolean contains(Point point)
contains
in interface IShape
contains
in class AbstractShape
public void drawOn(Graphics g, double magnify)
drawOn
in interface IShape
drawOn
in class AbstractShape
g
- The graphics.magnify
- The magnification.public void initPoints(List points)
public void setHighlightColor(Color color)
public void setHighlightSegment(int node1, int node2)
node1
- The index of the start point.node2
- The index of the end point.public Polygon toPolygon()
java.awt.Polygon
instance of this.
public String toString()
toString
in interface IShape
toString
in class AbstractShape
protected double getScreenZ()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |