|
||||||||||
| 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.ExtrudedShape
org.vizzini.ui.game.boardgame.chess.PieceShape
public class PieceShape
Provides a base shape class for 3D game pieces.
| Field Summary | |
|---|---|
static int |
_segments
Number of segments in the cross section. |
| 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 | |
|---|---|
PieceShape(ITeam team,
double width,
double height,
double depth)
Construct this object for the given team. |
|
| Method Summary | |
|---|---|
void |
configure(Properties properties,
int index)
Configure this token. |
IAgent |
getAgent()
Return this token's agent. |
protected ITeam |
getTeam()
Return the team. |
protected static Color |
getTeamColor(ITeam team)
Return the color for the given team. |
protected static Color |
getTeamHighlight(ITeam team)
Return the highlight color for the given team. |
IToken |
getToken()
Return this token's agent. |
void |
initPoints(double width,
double height,
double depth,
Vector[] spine,
double[] scale)
Initialize the points of this shape. |
protected Vector[] |
preprocessSpine(Vector[] spine)
Process the spine to adjust to the BoardShape. |
void |
setAgent(IAgent agent)
Set the associated agent. |
static void |
setTeamColor(ITeam team,
Color color)
Set the given team's color to the given value. |
static void |
setTeamHighlight(ITeam team,
Color color)
Set the given team's highlight color to the given value. |
void |
setToken(IToken token)
Set the associated token. |
| 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 |
| Methods inherited from interface org.vizzini.math.IStateful |
|---|
getAbsoluteState, getState, getStatefulParent, setStatefulParent |
| Field Detail |
|---|
public static final int _segments
| Constructor Detail |
|---|
public PieceShape(ITeam team,
double width,
double height,
double depth)
| Method Detail |
|---|
public static void setTeamColor(ITeam team,
Color color)
public static void setTeamHighlight(ITeam team,
Color color)
public void configure(Properties properties,
int index)
throws InstantiationException,
IllegalAccessException
configure in interface ITokenUIproperties - Source of configuration information.index - Index of this token's properties.
InstantiationException
IllegalAccessExceptionpublic IAgent getAgent()
public IToken getToken()
getToken in interface ITokenUI
public void initPoints(double width,
double height,
double depth,
Vector[] spine,
double[] scale)
public void setAgent(IAgent agent)
agent - The associated agent.public void setToken(IToken token)
setToken in interface ITokenUItoken - The associated token.protected static Color getTeamColor(ITeam team)
protected static Color getTeamHighlight(ITeam team)
protected ITeam getTeam()
protected Vector[] preprocessSpine(Vector[] spine)
|
||||||||||
| 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 |