Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.rico.editor
Class WorldEditor

    java.lang.Object
      de.rico.engine.game.AbstractBaseGame
          de.rico.editor.WorldEditor

All Implemented Interfaces:
  GameIface, java.util.EventListener, javax.media.opengl.GLEventListener

    public class WorldEditor

extends AbstractBaseGame

Main class for the world editor.

Author:
  Frank Bruns

Field Summary
`static CamPlayer` | `camFlightPlayer`
`static Recorder` | `camFlightRecorder`
`static Path` | `path`
`static Room` | `room`

Constructor Summary
`WorldEditor(java.lang.String title)` Creates a new world editor with the specified window title.

Method Summary
`void` | `draw(javax.media.opengl.GL gl)` This method is used to draw the scene and its content.
`static java.lang.String` | `getBaseFolder()` Returns the base folder of the room's data.
`void` | `initResources(javax.media.opengl.GLDrawable gld, javax.media.opengl.GL gl, int width, int height)` This method is used to initialize all the objects and resources that are neccessary at startup of the game.
`static void` | `main(java.lang.String[] args)`
`static void` | `markDirectLightForAdding(DirectLightData dl)` Marks a directinal light for being added to the scene during the next update() call.
`static void` | `markEntityForAdding(AbstractEntityData entity)` Marks an entity for being added to the scene during the next update() call.
`static void` | `markLoadScene(java.lang.String path)` Marks a scene file (specified by its path) to be loaded during the next update() call.
`static void` | `markPosLightForAdding(PosLightData pl)` Marks a positinal light for being added to the scene during the next update() call.
`static void` | `markSkyBoxForAdding(SkyBoxData sb)` Marks a sky box (SkyBoxData object) for being added.
`static void` | `markSpotLightForAdding(SpotLightData sl)` Marks a spot light for being added to the scene during the next update() call.
`static void` | `setBaseFolder(java.lang.String path)` Sets the base folder of the room's data.
`static void` | `setMode(Mode mode)` Sets the mode of the editor.
`void` | `update(long elapsedTime)` This method is used to update the scene and its content.

Methods inherited from class de.rico.engine.game.AbstractBaseGame
`display, displayChanged, enableBackFaceCulling, getMainFrame, getOGLCanvas, init, initCamera, isSetDisplayFPS, resetElapsedTime, reshape, setDisplayFPS, setDisplayMode, start, stop`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### room

    public static Room room

### path

    public static Path path

### camFlightRecorder

    public static Recorder camFlightRecorder

### camFlightPlayer

    public static CamPlayer camFlightPlayer

Constructor Detail

### WorldEditor

    public WorldEditor(java.lang.String title)

  Creates a new world editor with the specified window title.

  Parameters:
    `title` - window title

Method Detail

### setBaseFolder

    public static void setBaseFolder(java.lang.String path)

  Sets the base folder of the room's data.

  Parameters:
    `path` - path to base folder for the room data

### getBaseFolder

    public static java.lang.String getBaseFolder()

  Returns the base folder of the room's data.

  Returns:
    path to base folder for the room data

### draw

    public void draw(javax.media.opengl.GL gl)

  Description copied from interface: `GameIface`
  This method is used to draw the scene and its content. In your abstract game class you will have to make this method abstract and call it in the display() method (after the update() method).

  Specified by:
    `draw` in interface `GameIface`
  Specified by:
    `draw` in class `AbstractBaseGame`

### initResources

    public void initResources(javax.media.opengl.GLDrawable gld,
                              javax.media.opengl.GL gl,
                              int width,
                              int height)

  Description copied from interface: `GameIface`
  This method is used to initialize all the objects and resources that are neccessary at startup of the game. In your abstract game class you have to make this method abstract and call it in the init() method.

  Specified by:
    `initResources` in interface `GameIface`
  Specified by:
    `initResources` in class `AbstractBaseGame`
  Parameters:
    `gld` - GLDrawable object
    `gl` - GL object
    `width` - window width (important viewport initialisation)
    `height` - window height (important viewport initialisation)

### update

    public void update(long elapsedTime)

  Description copied from interface: `GameIface`
  This method is used to update the scene and its content. In your abstract game class you have to make this method abstract and call it within JOGL's display() method. It significant to call this method before the draw() method that is specified in this interface, too to assure correct behaviour of the Monitor and Mirror classes.

  Specified by:
    `update` in interface `GameIface`
  Specified by:
    `update` in class `AbstractBaseGame`
  Parameters:
    `elapsedTime` - time between two frames

### main

    public static void main(java.lang.String[] args)

### markEntityForAdding

    public static void markEntityForAdding(AbstractEntityData entity)

  Marks an entity for being added to the scene during the next update() call.

  Parameters:
    `entity` - entity to be added

### markSkyBoxForAdding

    public static void markSkyBoxForAdding(SkyBoxData sb)

  Marks a sky box (SkyBoxData object) for being added.

  Parameters:
    `sb` - SkyBoxData object

### markDirectLightForAdding

    public static void markDirectLightForAdding(DirectLightData dl)

  Marks a directinal light for being added to the scene during the next update() call.

  Parameters:
    `dl` - directional light editor data model

### markPosLightForAdding

    public static void markPosLightForAdding(PosLightData pl)

  Marks a positinal light for being added to the scene during the next update() call.

  Parameters:
    `pl` - positional light editor data model

### markSpotLightForAdding

    public static void markSpotLightForAdding(SpotLightData sl)

  Marks a spot light for being added to the scene during the next update() call.

  Parameters:
    `sl` - spot light editor data model

### markLoadScene

    public static void markLoadScene(java.lang.String path)

  Marks a scene file (specified by its path) to be loaded during the next update() call.

  Parameters:
    `path` - path+ filename of an editor's scene file

### setMode

    public static void setMode(Mode mode)

  Sets the mode of the editor.

  Parameters:
    `mode` - value from the Mode enumeration

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD