com.threerings.opengl.model.tools
Class ModelViewer

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
                      extended by com.threerings.opengl.model.tools.ModelViewer
All Implemented Interfaces:
ConfigUpdateListener<ModelConfig>, EditorContext, Scope, ScopeUpdateListener, AlContext, Enqueueable, AnimationObserver, ModelObserver, GlContext, ActionListener, EventListener, ChangeListener

public class ModelViewer
extends ModelTool
implements ChangeListener, ConfigUpdateListener<ModelConfig>, ModelObserver

A simple model viewer application.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.opengl.model.tools.ModelTool
ModelTool.EnvironmentModel
 
Field Summary
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
ModelViewer(String model)
          Creates the model viewer with (optionally) the path to a model to load.
 
Method Summary
 void actionPerformed(ActionEvent event)
           
 boolean animationStarted(Animation animation)
          Notes that an animation has started.
 boolean animationStopped(Animation animation, boolean completed)
          Notifies the observer that the animation has stopped.
 void configUpdated(ConfigEvent<ModelConfig> event)
          Called when a configuration has been updated.
static void main(String[] args)
          The program entry point.
 boolean modelCompleted(Model model)
          Notes that a model (such as a transient effect) has completed.
 void stateChanged(ChangeEvent event)
           
 
Methods inherited from class com.threerings.opengl.GlCanvasTool
shouldCheckTimestamps
 
Methods inherited from class com.threerings.opengl.GlCanvasApp
createRoot, getCanvas, getFrame, getMouseRay, getPickRay, getRunQueue, makeCurrent, shutdown, startup
 
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, setCameraHandler, setCompatibilityMode, setRenderEffects, setRenderer, setRenderScheme, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.editor.util.EditorContext
getColorPository, getConfigManager, getMessageManager, getResourceManager
 

Constructor Detail

ModelViewer

public ModelViewer(String model)
Creates the model viewer with (optionally) the path to a model to load.

Method Detail

main

public static void main(String[] args)
The program entry point.


stateChanged

public void stateChanged(ChangeEvent event)
Specified by:
stateChanged in interface ChangeListener

configUpdated

public void configUpdated(ConfigEvent<ModelConfig> event)
Description copied from interface: ConfigUpdateListener
Called when a configuration has been updated.

Specified by:
configUpdated in interface ConfigUpdateListener<ModelConfig>

animationStarted

public boolean animationStarted(Animation animation)
Description copied from interface: AnimationObserver
Notes that an animation has started.

Specified by:
animationStarted in interface AnimationObserver
Returns:
true to keep the observer in the list, false to remove it.

animationStopped

public boolean animationStopped(Animation animation,
                                boolean completed)
Description copied from interface: AnimationObserver
Notifies the observer that the animation has stopped.

Specified by:
animationStopped in interface AnimationObserver
completed - whether or not the animation ran to completion (as opposed to being cancelled).
Returns:
true to keep the observer in the list, false to remove it.

modelCompleted

public boolean modelCompleted(Model model)
Description copied from interface: ModelObserver
Notes that a model (such as a transient effect) has completed.

Specified by:
modelCompleted in interface ModelObserver
Returns:
true to keep the observer in the list, false to remove it.

actionPerformed

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


Copyright © 2011. All Rights Reserved.