com.threerings.opengl.model.tools
Class ModelTool

java.lang.Object
  extended by com.threerings.expr.DynamicScope
      extended by com.threerings.opengl.GlApp
          extended by com.threerings.opengl.GlCanvasApp
              extended by com.threerings.opengl.GlCanvasTool
                  extended by com.threerings.opengl.model.tools.ModelTool
All Implemented Interfaces:
EditorContext, Scope, ScopeUpdateListener, AlContext, Enqueueable, GlContext, ActionListener, EventListener
Direct Known Subclasses:
ModelViewer, ParticleEditor

public abstract class ModelTool
extends GlCanvasTool

Base class for tools that view or manipulate a single model (like the model viewer and particle editor).


Nested Class Summary
static class ModelTool.EnvironmentModel
          Represents a model in the environment.
protected  class ModelTool.ModelToolPrefs
          The preferences for model tools.
 
Nested classes/interfaces inherited from class com.threerings.opengl.GlCanvasTool
GlCanvasTool.CanvasToolPrefs
 
Field Summary
protected  Model[] _environment
          The environment models.
protected  Model _model
          The model being viewed.
protected  SimpleScene _scene
          The model scene.
protected  JCheckBoxMenuItem _showEnvironment
          Environment toggle.
 
Fields inherited from class com.threerings.opengl.GlCanvasTool
_bounds, _compass, _eprefs, _grid, _msgs, _pdialog, _showBounds, _showCompass, _showGrid, _showStats, _stats
 
Fields inherited from class com.threerings.opengl.GlCanvasApp
_canvas, _canvasRoot, _frame, _keymgr
 
Fields inherited from class com.threerings.opengl.GlApp
_at, _billboardRotation, _camhand, _cfgmgr, _clipprov, _colorpos, _compatibilityMode, _compositor, _epoch, _imgcache, _msgmgr, _now, _renderEffects, _renderer, _renderScheme, _rsrcmgr, _shadcache, _soundmgr, _streamGain, _up, _viewTransform, _viewTransformState, _worldTransform, PIXEL_FORMATS
 
Fields inherited from class com.threerings.expr.DynamicScope
_compoundDepth, _listeners, _owner, _parentScope, _scopeName, _symbols, INVALID_SCOPE
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
ModelTool(String msgs)
          Creates a new tool application.
 
Method Summary
 void actionPerformed(ActionEvent event)
           
protected  void compositeView()
          Gives the application a chance to composite anything it might want rendered.
protected  DebugBounds createBounds()
          Creates the debug bounds object.
protected  void didInit()
          Override to perform custom initialization after the render context is valid.
protected  void updateView(float elapsed)
          Performs any updates that are necessary even when not rendering.
 
Methods inherited from class com.threerings.opengl.GlCanvasTool
createAction, createAction, createButton, createButton, createCameraHandler, createCheckBoxMenuItem, createCheckBoxMenuItem, createEditablePrefs, createGrid, createMenu, createMenuItem, createMenuItem, shouldCheckTimestamps
 
Methods inherited from class com.threerings.opengl.GlCanvasApp
createCanvas, createCanvasContainer, createRoot, getCanvas, getFrame, getMouseRay, getPickRay, getRunQueue, initRenderer, makeCurrent, shutdown, startup, willShutdown
 
Methods inherited from class com.threerings.opengl.GlApp
createSnapshot, enqueue, getApp, getCameraHandler, getClipProvider, getColorPository, getCompatibilityMode, getCompositor, getConfigManager, getImageCache, getMessageManager, getRenderEffects, getRenderer, getRenderScheme, getResourceManager, getScope, getShaderCache, getSoundManager, getStreamGain, init, initSharedManagers, renderView, setCameraHandler, setCompatibilityMode, setRenderEffects, setRenderer, setRenderScheme, updateView, xlate
 
Methods inherited from class com.threerings.expr.DynamicScope
addListener, dispose, endCompoundUpdate, get, getParentScope, getScopeName, put, remove, removeListener, scopeUpdated, setParentScope, startCompoundUpdate, wasUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.editor.util.EditorContext
getColorPository, getConfigManager, getMessageManager, getResourceManager
 

Field Detail

_showEnvironment

protected JCheckBoxMenuItem _showEnvironment
Environment toggle.


_scene

protected SimpleScene _scene
The model scene.


_environment

protected Model[] _environment
The environment models.


_model

protected Model _model
The model being viewed.

Constructor Detail

ModelTool

public ModelTool(String msgs)
Creates a new tool application.

Parameters:
msgs - the name of the application message bundle.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class GlCanvasTool

didInit

protected void didInit()
Description copied from class: GlApp
Override to perform custom initialization after the render context is valid.

Overrides:
didInit in class GlCanvasTool

createBounds

protected DebugBounds createBounds()
Description copied from class: GlCanvasTool
Creates the debug bounds object.

Overrides:
createBounds in class GlCanvasTool

updateView

protected void updateView(float elapsed)
Description copied from class: GlApp
Performs any updates that are necessary even when not rendering.

Overrides:
updateView in class GlApp
Parameters:
elapsed - the elapsed time since the last update, in seconds.

compositeView

protected void compositeView()
Description copied from class: GlApp
Gives the application a chance to composite anything it might want rendered.

Overrides:
compositeView in class GlCanvasTool