com.jmex.bui
Class BGeomView

java.lang.Object
  extended by com.jmex.bui.BComponent
      extended by com.jmex.bui.BGeomView

public class BGeomView
extends BComponent

Displays 3D geometry (a Spatial) inside a normal user interface.


Field Summary
protected  Camera _camera
           
protected  float _cheight
           
protected  float _cwidth
           
protected  float _cx
           
protected  float _cy
           
protected  Spatial _geom
           
protected  BRootNode _root
           
protected  int _sheight
           
protected  Rectangle _srect
           
protected  int _swidth
           
 
Fields inherited from class com.jmex.bui.BComponent
_alpha, _backgrounds, _bbuf, _borders, _colors, _cursor, _enabled, _height, _hover, _insets, _listeners, _parent, _preferredSize, _properties, _styleClass, _tipmouse, _tipStyle, _tiptext, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES
 
Constructor Summary
BGeomView()
          Creates a view with no configured geometry.
BGeomView(Spatial geom)
          Creates a view with the specified Spatial to be rendered.
 
Method Summary
protected  Camera createCamera(DisplaySystem ds)
          Called to create and configure the camera that we'll use when rendering our geometry.
 Camera getCamera()
          Returns the camera used when rendering our geometry.
 Spatial getGeometry()
          Returns the geometry rendered by this view.
protected  void renderComponent(Renderer renderer)
          Renders any custom bits for this component.
 void setGeometry(Spatial geom)
          Configures the spatial to be rendered by this view.
 void update(float frameTime)
          Called every frame (while we're added to the view hierarchy) by the BRootNode.
protected  void wasAdded()
          This method is called when we are added to a hierarchy that is connected to a top-level window (at which point we can rely on having a look and feel and can set ourselves up).
protected  void wasRemoved()
          This method is called when we are removed from a hierarchy that is connected to a top-level window.
 
Methods inherited from class com.jmex.bui.BComponent
acceptsFocus, addListener, applyDefaultStates, boundsToString, changeCursor, computePreferredSize, configureStyle, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getCursor, getDefaultStyleClass, getFocusTarget, getHeight, getHitComponent, getInsets, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleClass, getTooltipText, getWidth, getWindow, getX, getY, hasFocus, intersectScissorBox, invalidate, isAdded, isEnabled, isShowing, isTooltipRelativeToMouse, isValid, isVisible, layout, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, restoreScissorState, setAlpha, setBackground, setBounds, setCursor, setEnabled, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleClass, setTooltipRelativeToMouse, setTooltipText, setVisible, stateDidChange, updateCursor, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_root

protected BRootNode _root

_camera

protected Camera _camera

_geom

protected Spatial _geom

_swidth

protected int _swidth

_sheight

protected int _sheight

_cx

protected float _cx

_cy

protected float _cy

_cwidth

protected float _cwidth

_cheight

protected float _cheight

_srect

protected Rectangle _srect
Constructor Detail

BGeomView

public BGeomView()
Creates a view with no configured geometry. Geometry can be set later with setGeometry(com.jme.scene.Spatial).


BGeomView

public BGeomView(Spatial geom)
Creates a view with the specified Spatial to be rendered.

Method Detail

getCamera

public Camera getCamera()
Returns the camera used when rendering our geometry.


setGeometry

public void setGeometry(Spatial geom)
Configures the spatial to be rendered by this view.


getGeometry

public Spatial getGeometry()
Returns the geometry rendered by this view.


update

public void update(float frameTime)
Called every frame (while we're added to the view hierarchy) by the BRootNode.


wasAdded

protected void wasAdded()
Description copied from class: BComponent
This method is called when we are added to a hierarchy that is connected to a top-level window (at which point we can rely on having a look and feel and can set ourselves up).

Overrides:
wasAdded in class BComponent

wasRemoved

protected void wasRemoved()
Description copied from class: BComponent
This method is called when we are removed from a hierarchy that is connected to a top-level window. If we wish to clean up after things done in BComponent.wasAdded(), this is a fine place to do so.

Overrides:
wasRemoved in class BComponent

renderComponent

protected void renderComponent(Renderer renderer)
Description copied from class: BComponent
Renders any custom bits for this component. This is called with the graphics context translated to (0, 0) relative to this component.

Overrides:
renderComponent in class BComponent

createCamera

protected Camera createCamera(DisplaySystem ds)
Called to create and configure the camera that we'll use when rendering our geometry.



Copyright © 2008 Michael Bayne. All Rights Reserved.