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.

Author:
Michael Bayne, StandTrooper

Field Summary
protected  com.jme.renderer.Camera _camera
           
protected  float _cheight
           
protected  float _cwidth
           
protected  float _cx
           
protected  float _cy
           
protected  com.jme.scene.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(com.jme.scene.Spatial geom)
          Creates a view with the specified Spatial to be rendered.
 
Method Summary
protected  com.jme.renderer.Camera createCamera(com.jme.system.DisplaySystem ds)
          Called to create and configure the camera that we'll use when rendering our geometry.
 com.jme.renderer.Camera getCamera()
          Returns the camera used when rendering our geometry.
 com.jme.scene.Spatial getGeometry()
          Returns the geometry rendered by this view.
protected  void renderComponent(com.jme.renderer.Renderer renderer)
          Documentation Inherited
 void setGeometry(com.jme.scene.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()
          Documentation Inherited
protected  void wasRemoved()
          Documentation Inherited
 
Methods inherited from class com.jmex.bui.BComponent
acceptsFocus, addListener, addListeners, applyDefaultStates, boundsToString, changeCursor, computePreferredSize, configureStyle, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getCursor, getDefaultStyleClass, getFocusTarget, getHeight, getHitComponent, getInsets, getLocation, getName, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleClass, getTooltipText, getWidth, getWindow, getX, getY, hasFocus, intersectScissorBox, invalidate, isAdded, isConsumeMouseEvents, isEnabled, isHoverEnabled, isShowing, isTooltipRelativeToMouse, isValid, isVisible, layout, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, restoreScissorState, setAlpha, setBackground, setBounds, setConsumeMouseEvents, setCursor, setEnabled, setHoverEnabled, setLocation, setName, 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 com.jme.renderer.Camera _camera

_geom

protected com.jme.scene.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(com.jme.scene.Spatial geom)
Creates a view with the specified Spatial to be rendered.

Parameters:
geom - Spatial
Method Detail

getCamera

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

Returns:
_camera Camera

setGeometry

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

Parameters:
geom - Spatial

getGeometry

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

Returns:
_geom Spatial

update

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

Parameters:
frameTime - float

wasAdded

protected void wasAdded()
Documentation Inherited

Overrides:
wasAdded in class BComponent
See Also:
BComponent.wasAdded()

wasRemoved

protected void wasRemoved()
Documentation Inherited

Overrides:
wasRemoved in class BComponent
See Also:
BComponent.wasRemoved()

renderComponent

protected void renderComponent(com.jme.renderer.Renderer renderer)
Documentation Inherited

Overrides:
renderComponent in class BComponent
Parameters:
renderer - Renderer
See Also:
BComponent.renderComponent(com.jme.renderer.Renderer)

createCamera

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

Parameters:
ds - DisplaySystem
Returns:
camera Camera


Copyright © 2011 Michael Bayne. All Rights Reserved.