com.threerings.opengl.gui
Class RenderableView

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.RenderableView
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, Tickable

public class RenderableView
extends Component
implements Tickable

Displays an embedded 3D view.


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.Component
DEFAULT, DISABLED, HOVER
 
Constructor Summary
RenderableView(GlContext ctx)
          Creates a new renderable view.
 
Method Summary
 void add(Compositable compositable)
          Adds a compositable to the view.
 Camera getCamera()
          Returns a reference to the view camera.
 CameraHandler getCameraHandler()
          Returns a reference to the camera handler.
 Model[] getConfigModels()
          Returns a reference to the array of config models.
 DynamicScope getScope()
          Returns a reference to the view's scope.
 String getViewNode()
          Returns the name of the view node.
 boolean isStatic()
          Checks whether this view is configured as static.
 void remove(Compositable compositable)
          Removes a compositable from the view.
 void removeAll()
          Removes all compositables from the view.
 void render()
          Manually rerenders the (static) view.
 void setConfigModels(Model[] models)
          Sets the array of config models.
 void setStatic(boolean stat)
          Sets whether this view is static and must be rendered manually.
 void setViewNode(String node)
          Sets the name of the view node.
 void tick(float elapsed)
          Updates the state of this object based on the elapsed time in seconds.
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, dispatchEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getHitComponent, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setAlpha, setBackground, setBounds, setCursor, setEnabled, setHoverable, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderableView

public RenderableView(GlContext ctx)
Creates a new renderable view.

Method Detail

getScope

public DynamicScope getScope()
Returns a reference to the view's scope.


getCamera

public Camera getCamera()
Returns a reference to the view camera.


getCameraHandler

public CameraHandler getCameraHandler()
Returns a reference to the camera handler.


setStatic

public void setStatic(boolean stat)
Sets whether this view is static and must be rendered manually.


isStatic

public boolean isStatic()
Checks whether this view is configured as static.


setViewNode

public void setViewNode(String node)
Sets the name of the view node. If non-blank, the camera transform will assume the transform of the first node encountered with this name in the model list (overriding the transform applied by the camera handler).


getViewNode

public String getViewNode()
Returns the name of the view node.


setConfigModels

public void setConfigModels(Model[] models)
Sets the array of config models.


getConfigModels

public Model[] getConfigModels()
Returns a reference to the array of config models.


add

public void add(Compositable compositable)
Adds a compositable to the view.


remove

public void remove(Compositable compositable)
Removes a compositable from the view.


removeAll

public void removeAll()
Removes all compositables from the view.


render

public void render()
Manually rerenders the (static) view.


tick

public void tick(float elapsed)
Description copied from interface: Tickable
Updates the state of this object based on the elapsed time in seconds.

Specified by:
tick in interface Tickable


Copyright © 2011. All Rights Reserved.