protected Node clone(final Node original) { Node copy = null; try { copy = original.getClass().newInstance(); } catch (final InstantiationException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } catch (final IllegalAccessException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } copy.setName(original.getName() + "_copy"); copy.getSceneHints().set(original.getSceneHints()); copy.setTransform(original.getTransform()); for (final StateType type : StateType.values()) { final RenderState state = original.getLocalRenderState(type); if (state != null) { copy.setRenderState(state); } } return copy; } }
protected Node clone(final Node original) { Node copy = null; try { copy = original.getClass().newInstance(); } catch (final InstantiationException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } catch (final IllegalAccessException e) { logger.log(Level.SEVERE, "Could not access final constructor of class " + original.getClass().getCanonicalName(), e); throw new RuntimeException(e); } copy.setName(original.getName() + "_copy"); copy.getSceneHints().set(original.getSceneHints()); copy.setTransform(original.getTransform()); for (final StateType type : StateType.values()) { final RenderState state = original.getLocalRenderState(type); if (state != null) { copy.setRenderState(state); } } return copy; } }
public void init() { if (Constants.stats) { Constants.updateGraphs = true; } rootNode.getSceneHints().setCullHint(CullHint.Dynamic); statNode.getSceneHints().setCullHint(CullHint.Never); grid = createGrid(); rootNode.attachChild(grid); particleNode = new Node("particles"); rootNode.attachChild(particleNode); final ZBufferState zbuf = new ZBufferState(); zbuf.setWritable(false); zbuf.setEnabled(true); zbuf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo); particleNode.setRenderState(zbuf); statNode.updateGeometricState(0, true); };
public TimedAreaGrapher(final int width, final int height, final Renderer renderer, final ContextCapabilities caps) { super(width, height, renderer, caps); // Setup our static horizontal graph lines createHLines(); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
public LineGrapher(final int width, final int height, final Renderer renderer, final ContextCapabilities caps) { super(width, height, renderer, caps); // Setup our static horizontal graph lines createHLines(); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
public TimedAreaGrapher(final int width, final int height, final Renderer renderer) { super(width, height, renderer); // Setup our static horizontal graph lines createHLines(); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
public RotateWidget(final IFilterList filterList) { super(filterList); _handle = new Node("rotationHandle"); final ZBufferState zstate = new ZBufferState(); zstate.setFunction(TestFunction.LessThanOrEqualTo); _handle.setRenderState(zstate); _handle.getSceneHints().setRenderBucketType(RenderBucketType.Transparent); _handle.updateGeometricState(0); if (RotateWidget.DEFAULT_CURSOR != null) { setMouseOverCallback(new SetCursorCallback(RotateWidget.DEFAULT_CURSOR)); } }
public LineGrapher(final int width, final int height, final Renderer renderer) { super(width, height, renderer); // Setup our static horizontal graph lines createHLines(); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
cullMode = skyBox.getSceneHints().getCullHint(); skyBox.getSceneHints().setCullHint(CullHint.Always); skyBox.getSceneHints().setCullHint(cullMode);
cullMode = skyBox.getSceneHints().getCullHint(); skyBox.getSceneHints().setCullHint(CullHint.Always); skyBox.getSceneHints().setCullHint(cullMode);
public TabledLabelGrapher(final int width, final int height, final Renderer renderer, final ContextCapabilities caps) { super(width, height, renderer, caps); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _bgQuad.getSceneHints().setRenderBucketType(RenderBucketType.Ortho); _bgQuad.setDefaultColor(new ColorRGBA(ColorRGBA.BLACK)); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
public TabledLabelGrapher(final int width, final int height, final Renderer renderer) { super(width, height, renderer); _defBlendState = new BlendState(); _defBlendState.setEnabled(true); _defBlendState.setBlendEnabled(true); _defBlendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); _defBlendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); _graphRoot.setRenderState(_defBlendState); _bgQuad.getSceneHints().setRenderBucketType(RenderBucketType.OrthoOrder); _bgQuad.setDefaultColor(new ColorRGBA(ColorRGBA.BLACK)); _graphRoot.getSceneHints().setCullHint(CullHint.Never); }
public MoveWidget(final IFilterList filterList) { super(filterList); _handle = new Node("moveHandle"); final BlendState blend = new BlendState(); blend.setBlendEnabled(true); _handle.setRenderState(blend); final ZBufferState zstate = new ZBufferState(); zstate.setFunction(TestFunction.LessThanOrEqualTo); _handle.setRenderState(zstate); _handle.getSceneHints().setRenderBucketType(RenderBucketType.Transparent); _handle.updateGeometricState(0); if (MoveWidget.DEFAULT_CURSOR != null) { setMouseOverCallback(new SetCursorCallback(MoveWidget.DEFAULT_CURSOR)); } }
public MovePlanarWidget(final IFilterList filterList) { super(filterList); _handle = new Node("moveHandle"); final BlendState blend = new BlendState(); blend.setBlendEnabled(true); _handle.setRenderState(blend); final ZBufferState zstate = new ZBufferState(); zstate.setFunction(TestFunction.LessThanOrEqualTo); _handle.setRenderState(zstate); _handle.getSceneHints().setRenderBucketType(RenderBucketType.Transparent); _handle.updateGeometricState(0); if (MovePlanarWidget.DEFAULT_CURSOR != null) { setMouseOverCallback(new SetCursorCallback(MovePlanarWidget.DEFAULT_CURSOR)); } }
public SimpleScaleWidget withArrow(final ReadOnlyVector3 arrowDirection, final ReadOnlyColorRGBA color, final double lengthGap, final double tipGap) { _arrowDirection = new Vector3(arrowDirection); _handle = new InteractArrow("scaleHandle", 1.0, 0.125, lengthGap, tipGap); if (!_arrowDirection.equals(Vector3.UNIT_Z)) { _handle.setRotation(new Quaternion().fromVectorToVector(Vector3.UNIT_Z, _arrowDirection)); } final BlendState blend = new BlendState(); blend.setBlendEnabled(true); _handle.setRenderState(blend); ((Arrow) _handle).setDefaultColor(color); final ZBufferState zstate = new ZBufferState(); zstate.setWritable(false); zstate.setFunction(TestFunction.Always); _handle.setRenderState(zstate); _handle.getSceneHints().setRenderBucketType(RenderBucketType.PostBucket); _handle.updateGeometricState(0); return this; }
public MoveMultiPlanarWidget(final IFilterList filterList, final double extent) { super(filterList); _handle = new Node("moveHandle"); final BlendState blend = new BlendState(); blend.setBlendEnabled(true); _handle.setRenderState(blend); final ZBufferState zstate = new ZBufferState(); zstate.setFunction(TestFunction.LessThanOrEqualTo); _handle.setRenderState(zstate); _handle.getSceneHints().setRenderBucketType(RenderBucketType.Transparent); _handle.updateGeometricState(0); createDefaultHandle(extent); if (MoveMultiPlanarWidget.DEFAULT_CURSOR != null) { setMouseOverCallback(new SetCursorCallback(MoveMultiPlanarWidget.DEFAULT_CURSOR)); } }
skyBox.setTranslation(tRenderer.getCamera().getLocation()); skyBox.updateGeometricState(0.0f); skyBox.getSceneHints().setCullHint(CullHint.Never); skyBox.getSceneHints().setCullHint(CullHint.Always); skyBox.setTranslation(tmpLocation); skyBox.updateGeometricState(0.0f); skyBox.getSceneHints().setCullHint(CullHint.Never);
skyBox.setTranslation(tRenderer.getCamera().getLocation()); skyBox.updateGeometricState(0.0f); skyBox.getSceneHints().setCullHint(CullHint.Never); skyBox.getSceneHints().setCullHint(CullHint.Always); skyBox.setTranslation(tmpLocation); skyBox.updateGeometricState(0.0f); skyBox.getSceneHints().setCullHint(CullHint.Never);