|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.expr.DynamicScope
com.threerings.opengl.GlApp
com.threerings.opengl.GlCanvasApp
com.threerings.opengl.GlCanvasTool
com.threerings.opengl.model.tools.ModelTool
com.threerings.opengl.model.tools.ModelViewer
public class ModelViewer
A simple model viewer application.
| Nested Class Summary | |
|---|---|
protected class |
ModelViewer.TrackPanel
A single panel for running animations. |
| Nested classes/interfaces inherited from class com.threerings.opengl.model.tools.ModelTool |
|---|
ModelTool.EnvironmentModel, ModelTool.ModelToolPrefs |
| Nested classes/interfaces inherited from class com.threerings.opengl.GlCanvasTool |
|---|
GlCanvasTool.CanvasToolPrefs |
| Field Summary | |
|---|---|
protected JPanel |
_apanel
The animation control container. |
protected JCheckBoxMenuItem |
_autoReset
The toggle for automatic reset. |
protected ChangeBlock |
_block
Indicates that we should ignore any changes, because we're the one effecting them. |
protected JPanel |
_cpanel
The panel that holds the control bits. |
protected float |
_elapsed
Accumulated elapsed time. |
protected EditorPanel |
_epanel
The editor panel we use to edit the model configuration. |
protected long |
_lastUpdate
The time of the last update. |
protected static Preferences |
_prefs
The application preferences. |
protected JButton |
_removeTrack
The remove track button. |
protected DraggableSpinner |
_speedSpinner
The speed control spinner. |
protected JPanel |
_tpanels
The container for the animation track panels. |
protected static DecimalFormat |
SPEED_FORMAT
The format for the speed display. |
| Fields inherited from class com.threerings.opengl.model.tools.ModelTool |
|---|
_environment, _model, _scene, _showEnvironment |
| 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 | |
|---|---|
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. |
protected JComponent |
createCanvasContainer()
Creates and returns the component that contains the canvas (after the canvas has been created). |
protected GlCanvasTool.CanvasToolPrefs |
createEditablePrefs()
Creates and returns the editable preferences. |
protected void |
didInit()
Override to perform custom initialization after the render context is valid. |
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)
|
protected void |
updateTrackControls()
Updates all of the track controls. |
protected void |
updateView()
Performs any updates that are necessary even when not rendering. |
protected void |
updateView(float elapsed)
Performs any updates that are necessary even when not rendering. |
| Methods inherited from class com.threerings.opengl.model.tools.ModelTool |
|---|
compositeView, createBounds |
| Methods inherited from class com.threerings.opengl.GlCanvasTool |
|---|
createAction, createAction, createButton, createButton, createCameraHandler, createCheckBoxMenuItem, createCheckBoxMenuItem, createGrid, createMenu, createMenuItem, createMenuItem, shouldCheckTimestamps |
| Methods inherited from class com.threerings.opengl.GlCanvasApp |
|---|
createCanvas, 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, 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 |
|---|
protected JCheckBoxMenuItem _autoReset
protected JPanel _cpanel
protected EditorPanel _epanel
protected JPanel _apanel
protected JPanel _tpanels
protected JButton _removeTrack
protected DraggableSpinner _speedSpinner
protected long _lastUpdate
protected float _elapsed
protected ChangeBlock _block
protected static Preferences _prefs
protected static final DecimalFormat SPEED_FORMAT
| Constructor Detail |
|---|
public ModelViewer(String model)
| Method Detail |
|---|
public static void main(String[] args)
public void stateChanged(ChangeEvent event)
stateChanged in interface ChangeListenerpublic void configUpdated(ConfigEvent<ModelConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<ModelConfig>public boolean animationStarted(Animation animation)
AnimationObserver
animationStarted in interface AnimationObserver
public boolean animationStopped(Animation animation,
boolean completed)
AnimationObserver
animationStopped in interface AnimationObservercompleted - whether or not the animation ran to completion (as opposed to being
cancelled).
public boolean modelCompleted(Model model)
ModelObserver
modelCompleted in interface ModelObserverpublic void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListeneractionPerformed in class ModelToolprotected JComponent createCanvasContainer()
GlCanvasApp
createCanvasContainer in class GlCanvasAppprotected GlCanvasTool.CanvasToolPrefs createEditablePrefs()
GlCanvasTool
createEditablePrefs in class GlCanvasToolprotected void didInit()
GlApp
didInit in class ModelToolprotected void updateView()
GlApp
updateView in class GlAppprotected void updateView(float elapsed)
GlApp
updateView in class ModelToolelapsed - the elapsed time since the last update, in seconds.protected void updateTrackControls()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||