|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Player
| Field Summary | |
protected Canvas3DEx |
m_cCanvas3D
Player window canvas |
protected PlayerKeyNavigator |
m_cKeyNavigator
|
protected PlayerWall |
m_cPlayerWall
|
protected javax.vecmath.Point3f |
m_cStartPoint
Start position in the playfield |
protected javax.media.j3d.View |
m_cView
Player view |
protected javax.media.j3d.BranchGroup |
m_cViewBrGroup
View branch group |
protected javax.media.j3d.BranchGroup |
m_cWallBrGroup
View branch group |
protected javax.vecmath.Color3f |
m_cWallColor
Wall color |
protected javax.media.j3d.TransformGroup |
m_cWallTrGroup
Wall transform group |
| Constructor Summary | |
Player(javax.vecmath.Point3f cStartPoint)
Creates all elements needed for a new player: - Player view - Key and collision handler |
|
| Method Summary | |
protected void |
constructPlayerBranch()
Creates the player branch group. |
void |
endGame()
Command for stopping the game. |
Canvas3DEx |
getCanvas()
Returns the canvas of the player view window. |
javax.media.j3d.View |
getView()
Returns the player view. |
javax.media.j3d.BranchGroup |
getViewBrGroup()
Returns the view branch group. |
javax.media.j3d.BranchGroup |
getWallBrGroup()
Returns the wall branch group. |
void |
setForwardKey(int iKey)
Sets the forward motion key. |
void |
setLeftKey(int iKey)
Sets the key for a left turn. |
void |
setRightKey(int iKey)
Sets the key for a right turn. |
void |
setWallColor(javax.vecmath.Color3f cCol)
Sets the wall color of the player's wall. |
void |
startGame()
Command for starting the game. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Canvas3DEx m_cCanvas3D
protected javax.media.j3d.View m_cView
protected PlayerKeyNavigator m_cKeyNavigator
protected PlayerWall m_cPlayerWall
protected javax.media.j3d.BranchGroup m_cViewBrGroup
protected javax.media.j3d.BranchGroup m_cWallBrGroup
protected javax.media.j3d.TransformGroup m_cWallTrGroup
protected javax.vecmath.Point3f m_cStartPoint
protected javax.vecmath.Color3f m_cWallColor
| Constructor Detail |
public Player(javax.vecmath.Point3f cStartPoint)
cStartPoint - Defines the start coordinates of the player in the play field| Method Detail |
public void startGame()
public void endGame()
public void setWallColor(javax.vecmath.Color3f cCol)
cCol - The wall color.public void setForwardKey(int iKey)
iKey - Associeted keypublic void setLeftKey(int iKey)
iKey - Associeted keypublic void setRightKey(int iKey)
iKey - Associeted keypublic final javax.media.j3d.BranchGroup getWallBrGroup()
public final javax.media.j3d.BranchGroup getViewBrGroup()
public final Canvas3DEx getCanvas()
public final javax.media.j3d.View getView()
protected void constructPlayerBranch()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||