HOME | PROJECTS | REALITY | EMAIL

Class Gfx

java.lang.Object
  |
  +--Gfx

public class Gfx
extends java.lang.Object

Name: class Gfx (Graphics Engine Interface)
Desc: interface to ReOS and reality.java

Version:
1.009 10/22/97 Gary - created and implemented 11/20/2000 Gary - added this interface to the engine
Author:
Ge Wang (www.gewang.com), George Stetten (www.stetten.com), Visnu Pitiyanuvath (vtp1@duke.edu)

Constructor Summary
Gfx()
          constructor.
Gfx(ReOS os)
          constructor.
 
Method Summary
 boolean addEntity(ReOSRenderable entity, java.lang.String rendererName)
          adds new entity to ReOS, and bind with named renderer
 boolean addRenderer(ReOSRenderer ren, java.lang.String name)
          add named renderer
 long getTimeSinceInitMillis()
          get time since init
 java.lang.String getVersion()
          get version
 ReOSDC hdc()
          get the reference to the device context
 boolean initialize()
          initialize ReOS
 ReOSLoader loader()
          get the reference to the object loader
 boolean nextCycle()
          next cycle timing mechanism
 void removeAllEntities()
          removes all entities
 boolean removeEntity(ReOSRenderable entity)
          removes entity from drawing list
 boolean removeRenderer(ReOSRenderer ren)
          remove renderer from reos
 void render()
          the rendering process (no swap) using internal graphics context
 void render(ReOSDC hdc)
          the rendering process ( no swap )
 boolean renderAll()
          the complete rendering process using internal hdc
 boolean renderAll(ReOSDC hdc)
          the complete rendering process
 void renderAutomators(ReOSDC hdc)
          render the automator (update)
 void renderBegin(ReOSDC hdc)
          begin the rendering process
 void renderEnd(ReOSDC hdc)
          stop rendering (last step)
 void renderEntities(ReOSDC hdc)
          render the internal list of entities
 void renderUpdate(ReOSDC hdc)
          render/update internal state
 void setDC(ReOSDC hdc)
          set the internal hdc to another instance
 void setIntervalMillis(long n)
          interval
 boolean swap()
          swap buffer to primary display using internal graphics context
 boolean swap(ReOSDC hdc)
          swap buffer to primary display
 ReOSWorld world()
          get the reference to the world
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gfx

public Gfx()
constructor.

Gfx

public Gfx(ReOS os)
constructor.
Method Detail

getVersion

public java.lang.String getVersion()
get version

addEntity

public boolean addEntity(ReOSRenderable entity,
                         java.lang.String rendererName)
adds new entity to ReOS, and bind with named renderer
Parameters:
entity - entity to be added
rendererName - name of renderer to associate with entity
Returns:
true on success
false if (1) entity == null or (2) entity already has valid reos id (3) renderer not found

removeEntity

public boolean removeEntity(ReOSRenderable entity)
removes entity from drawing list
Parameters:
entity - entity to be removed
Returns:
true on success, false if entity not in reos

removeAllEntities

public void removeAllEntities()
removes all entities

addRenderer

public boolean addRenderer(ReOSRenderer ren,
                           java.lang.String name)
add named renderer
Parameters:
ren - renderer to be added
name -  
Returns:
true on success
false if (1) ren == null or (2) ren already has valid reos id (3) name already mapped to renderer

removeRenderer

public boolean removeRenderer(ReOSRenderer ren)
remove renderer from reos
Parameters:
ren - renderer to be removed
Returns:
true on success
false (1) ren == null (2) ren doesn't have valid id (3) ren not in reos

hdc

public ReOSDC hdc()
get the reference to the device context

loader

public ReOSLoader loader()
get the reference to the object loader

world

public ReOSWorld world()
get the reference to the world

setDC

public void setDC(ReOSDC hdc)
set the internal hdc to another instance

renderBegin

public void renderBegin(ReOSDC hdc)
begin the rendering process

renderEntities

public void renderEntities(ReOSDC hdc)
render the internal list of entities

renderAutomators

public void renderAutomators(ReOSDC hdc)
render the automator (update)

renderUpdate

public void renderUpdate(ReOSDC hdc)
render/update internal state

renderEnd

public void renderEnd(ReOSDC hdc)
stop rendering (last step)

swap

public boolean swap(ReOSDC hdc)
swap buffer to primary display

swap

public boolean swap()
swap buffer to primary display using internal graphics context

render

public void render(ReOSDC hdc)
the rendering process ( no swap )

render

public void render()
the rendering process (no swap) using internal graphics context

renderAll

public boolean renderAll(ReOSDC hdc)
the complete rendering process

renderAll

public boolean renderAll()
the complete rendering process using internal hdc

nextCycle

public boolean nextCycle()
next cycle timing mechanism

setIntervalMillis

public void setIntervalMillis(long n)
interval

initialize

public boolean initialize()
initialize ReOS

getTimeSinceInitMillis

public long getTimeSinceInitMillis()
get time since init


HOME | PROJECTS | REALITY | EMAIL