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

Package class diagram package FlagRenderer
java.lang.Object
  extended by nl.tudelft.goal.ut2004.visualizer.timeline.map.FlagRenderer
All Implemented Interfaces:
ISubGLRenderer<FlagInfo>

public class FlagRenderer
extends Object
implements ISubGLRenderer<FlagInfo>

Sub renderer for Flag objects.

Author:
M.P. Korstanje

Constructor Summary
FlagRenderer(FlagInfo flag, 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 getBlueFlagColor()
           
 Color getColor()
           
 int getGLName()
           
 FlagInfo getObject()
          Return object this renderer draws.
static Color getOtherFlagColor()
           
static Color getRedFlagColor()
           
 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 setBlueFlagColor(Color c)
           
static void setOtherFlagColor(Color c)
           
static void setRedFlagColor(Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlagRenderer

public FlagRenderer(FlagInfo flag,
                    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<FlagInfo>

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<FlagInfo>

getObject

public FlagInfo 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<FlagInfo>
Returns:
Object this renderer draws.

getRedFlagColor

public static Color getRedFlagColor()

setRedFlagColor

public static void setRedFlagColor(Color c)

getBlueFlagColor

public static Color getBlueFlagColor()

setBlueFlagColor

public static void setBlueFlagColor(Color c)

getOtherFlagColor

public static Color getOtherFlagColor()

setOtherFlagColor

public static void setOtherFlagColor(Color c)

getColor

public Color getColor()

getGLName

public int getGLName()
Specified by:
getGLName in interface ISubGLRenderer<FlagInfo>

destroy

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

Specified by:
destroy in interface ISubGLRenderer<FlagInfo>


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