/** * Retrieve the quad indicated by the given side. * * @param face * One of Skybox.Face.North, Skybox.Face.South, and so on... * @return The Quad that makes up that side of the Skybox. */ public Quad getFace(final Face face) { return _skyboxQuads[face.ordinal()]; }
/** * Creates a new skybox. The size of the skybox and name is specified here. By default, no textures are set. * * @param name * The name of the skybox. * @param xExtent * The x size of the skybox in both directions from the center. * @param yExtent * The y size of the skybox in both directions from the center. * @param zExtent * The z size of the skybox in both directions from the center. */ public Skybox(final String name, final float xExtent, final float yExtent, final float zExtent) { super(name); _xExtent = xExtent; _yExtent = yExtent; _zExtent = zExtent; initialize(); }
public void setAllVisible() { _childMask.set(0, getNumberOfChildren()); }
/** * Set the texture to be displayed on the given face of the skybox. Replaces any existing texture on that face. * * @param face * the face to set * @param texture * The texture for that side to assume. * @throws IllegalArgumentException * if face is null. */ public void setTexture(final Face face, final Texture texture) { if (face == null) { throw new IllegalArgumentException("Face can not be null."); } _skyboxQuads[face.ordinal()].clearRenderState(RenderState.StateType.Texture); setTexture(face, texture, 0); }
/** * <code>draw</code> updates the billboards orientation then renders the billboard's children. * * @param r * the renderer used to draw. * @see com.ardor3d.scenegraph.Spatial#draw(com.ardor3d.renderer.Renderer) */ @Override public void draw(final Renderer r) { rotateBillboard(); super.draw(r); }
@Override protected void updateChildren(final double time) { _imposterQuad.updateGeometricState(time, false); if (_doUpdate && (!_haveDrawn || shouldDoUpdate(_cam))) { _targetScene.updateGeometricState(time, false); } }
private void rotateNone() { if(_localRot != null) { _orient.set(getRotation()); _orient.multiplyLocal(_localRot); _worldTransform.setRotation(_orient); } }
public void setAllVisible() { _childMask.set(0, getNumberOfChildren()); }
/** * Set the texture to be displayed on the given face of the skybox. Replaces any existing texture on that face. * * @param face * the face to set * @param texture * The texture for that side to assume. * @throws IllegalArgumentException * if face is null. */ public void setTexture(final Face face, final Texture texture) { if (face == null) { throw new IllegalArgumentException("Face can not be null."); } _skyboxQuads[face.ordinal()].clearRenderState(RenderState.StateType.Texture); setTexture(face, texture, 0); }
/** * Retrieve the quad indicated by the given side. * * @param face * One of Skybox.Face.North, Skybox.Face.South, and so on... * @return The Quad that makes up that side of the Skybox. */ public Quad getFace(final Face face) { return _skyboxQuads[face.ordinal()]; }
/** * <code>draw</code> updates the billboards orientation then renders the billboard's children. * * @param r * the renderer used to draw. * @see com.ardor3d.scenegraph.Spatial#draw(com.ardor3d.renderer.Renderer) */ @Override public void draw(final Renderer r) { rotateBillboard(); super.draw(r); }
/** * Creates a new skybox. The size of the skybox and name is specified here. By default, no textures are set. * * @param name * The name of the skybox. * @param xExtent * The x size of the skybox in both directions from the center. * @param yExtent * The y size of the skybox in both directions from the center. * @param zExtent * The z size of the skybox in both directions from the center. */ public Skybox(final String name, final float xExtent, final float yExtent, final float zExtent) { super(name); _xExtent = xExtent; _yExtent = yExtent; _zExtent = zExtent; initialize(); }
@Override protected void updateChildren(final double time) { _imposterQuad.updateGeometricState(time, false); if (_doUpdate && (!_haveDrawn || shouldDoUpdate(_cam))) { _targetScene.updateGeometricState(time, false); } }
public void shiftVisibleLeft() { final int nrChildren = getNumberOfChildren(); if (nrChildren == 0) { return; } final boolean firstVal = _childMask.get(0); for (int i = 0; i < nrChildren - 1; i++) { _childMask.set(i, _childMask.get(i + 1)); } _childMask.set(getNumberOfChildren() - 1, firstVal); }
public void preloadTexture(final Face face, final Renderer r) { final TextureState ts = (TextureState) _skyboxQuads[face.ordinal()] .getLocalRenderState(RenderState.StateType.Texture); if (ts != null) { r.applyState(StateType.Texture, ts); } }
public void shiftVisibleLeft() { final int nrChildren = getNumberOfChildren(); if (nrChildren == 0) { return; } final boolean firstVal = _childMask.get(0); for (int i = 0; i < nrChildren - 1; i++) { _childMask.set(i, _childMask.get(i + 1)); } _childMask.set(getNumberOfChildren() - 1, firstVal); }
public void shiftVisibleRight() { final int nrChildren = getNumberOfChildren(); if (nrChildren == 0) { return; } final boolean lastVal = _childMask.get(nrChildren - 1); for (int i = nrChildren - 1; i > 0; i--) { _childMask.set(i, _childMask.get(i - 1)); } _childMask.set(0, lastVal); }
public void shiftVisibleRight() { final int nrChildren = getNumberOfChildren(); if (nrChildren == 0) { return; } final boolean lastVal = _childMask.get(nrChildren - 1); for (int i = nrChildren - 1; i > 0; i--) { _childMask.set(i, _childMask.get(i - 1)); } _childMask.set(0, lastVal); }
public void flipAllVisible() { _childMask.flip(0, getNumberOfChildren()); }
public void flipAllVisible() { _childMask.flip(0, getNumberOfChildren()); }