nl.tudelft.goal.ut2004.visualizer.timeline.map
Class PlayerRenderer

Package class diagram package PlayerRenderer
java.lang.Object
  extended by nl.tudelft.goal.ut2004.visualizer.timeline.map.PlayerRenderer
All Implemented Interfaces:
ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>

public class PlayerRenderer
extends Object
implements ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>

Sub-renderer for object IRenderableUTAgent Implementation note: be careful when asking twice for same field of agent (like agent.getRotation()), because it is dependent on time when you ask and returned value is not guaranteed to be same (like first can be valid and second null).

Author:
Honza

Constructor Summary
PlayerRenderer(cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer utAgent, int glName)
          Create a new subrenderer with passed agent as source of data.
 
Method Summary
 void destroy()
          Call renderer to clean up any resources it used.
static Color getBlueTeamColor()
           
 Color getColor()
           
 int getGLName()
           
 cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer getObject()
          Return object this renderer draws.
static Color getRedTeamColor()
           
 void prepare(javax.media.opengl.GL gl)
          Here should be done preparation for rendering (e.g.
 void render(javax.media.opengl.GL gla)
          Display stuff you want to.
static void setBlueTeamColor(Color c)
           
static void setRedTeamColor(Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerRenderer

public PlayerRenderer(cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer utAgent,
                      int glName)
Create a new subrenderer with passed agent as source of data.

Parameters:
renderableUTAgent - agent used as source of data.
Method Detail

prepare

public void prepare(javax.media.opengl.GL gl)
Description copied from interface: ISubGLRenderer
Here should be done preparation for rendering (e.g. generation of display lists from massive data)

Specified by:
prepare in interface ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>

getObject

public cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer getObject()
Description copied from interface: ISubGLRenderer
Return object this renderer draws. Because objects we want to draw can change rapidly, we have to remove and add subrenderers based on passed objects (renderer R draws object A, now we don't want to draw A anymore, we have to go through subrenderers to find which ones draws it).

Specified by:
getObject in interface ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>
Returns:
Object this renderer draws.

render

public void render(javax.media.opengl.GL gla)
Description copied from interface: ISubGLRenderer
Display stuff you want to. Assume that settings have already been set in CollectionRenderer

Specified by:
render in interface ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>

getColor

public Color getColor()

getRedTeamColor

public static Color getRedTeamColor()

setRedTeamColor

public static void setRedTeamColor(Color c)

getBlueTeamColor

public static Color getBlueTeamColor()

setBlueTeamColor

public static void setBlueTeamColor(Color c)

getGLName

public int getGLName()
Specified by:
getGLName in interface ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>

destroy

public void destroy()
Description copied from interface: ISubGLRenderer
Call renderer to clean up any resources it used.

Specified by:
destroy in interface ISubGLRenderer<cz.cuni.amis.pogamut.unreal.communication.messages.gbinfomessages.IPlayer>


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.