/** * @param frustumNear * the new value of the near frustum plane. */ public void setFrustumNear(final double frustumNear) { _frustumNear = frustumNear; onFrustumChange(); }
/** * @param frustumFar * the new value of the far frustum plane. */ public void setFrustumFar(final double frustumFar) { _frustumFar = frustumFar; onFrustumChange(); }
/** * @param frustumLeft * the new value of the left frustum plane. */ public void setFrustumLeft(final double frustumLeft) { _frustumLeft = frustumLeft; onFrustumChange(); }
/** * @param frustumNear * the new value of the near frustum plane. */ public void setFrustumNear(final double frustumNear) { _frustumNear = frustumNear; onFrustumChange(); }
/** * @param frustumTop * the new value of the top frustum plane. */ public void setFrustumTop(final double frustumTop) { _frustumTop = frustumTop; onFrustumChange(); }
/** * @param frustumLeft * the new value of the left frustum plane. */ public void setFrustumLeft(final double frustumLeft) { _frustumLeft = frustumLeft; onFrustumChange(); }
/** * @param frustumRight * the new value of the right frustum plane. */ public void setFrustumRight(final double frustumRight) { _frustumRight = frustumRight; onFrustumChange(); }
/** * @param frustumBottom * the new value of the bottom frustum plane. */ public void setFrustumBottom(final double frustumBottom) { _frustumBottom = frustumBottom; onFrustumChange(); }
/** * @param frustumTop * the new value of the top frustum plane. */ public void setFrustumTop(final double frustumTop) { _frustumTop = frustumTop; onFrustumChange(); }
/** * @param frustumBottom * the new value of the bottom frustum plane. */ public void setFrustumBottom(final double frustumBottom) { _frustumBottom = frustumBottom; onFrustumChange(); }
/** * @param frustumRight * the new value of the right frustum plane. */ public void setFrustumRight(final double frustumRight) { _frustumRight = frustumRight; onFrustumChange(); }
/** * @param frustumFar * the new value of the far frustum plane. */ public void setFrustumFar(final double frustumFar) { _frustumFar = frustumFar; onFrustumChange(); }
/** * Sets the frustum plane values of this camera using the given values. * * @param near * @param far * @param left * @param right * @param top * @param bottom */ public void setFrustum(final double near, final double far, final double left, final double right, final double top, final double bottom) { _frustumNear = near; _frustumFar = far; _frustumLeft = left; _frustumRight = right; _frustumTop = top; _frustumBottom = bottom; onFrustumChange(); }
/** * Sets the frustum plane values of this camera using the given values. * * @param near * @param far * @param left * @param right * @param top * @param bottom */ public void setFrustum(final double near, final double far, final double left, final double right, final double top, final double bottom) { _frustumNear = near; _frustumFar = far; _frustumLeft = left; _frustumRight = right; _frustumTop = top; _frustumBottom = bottom; onFrustumChange(); }
/** * Sets the frustum plane values of this camera using the given perspective values. * * @param fovY * the full angle of view on the Y axis, in degrees. * @param aspect * the aspect ratio of our view (generally in [0,1]). Often this is canvas width / canvas height. * @param near * our near plane value * @param far * our far plane value */ public void setFrustumPerspective(final double fovY, final double aspect, final double near, final double far) { if (Double.isNaN(aspect) || Double.isInfinite(aspect)) { // ignore. _logger.warning("Invalid aspect given to setFrustumPerspective: " + aspect); return; } _fovY = fovY; final double h = Math.tan(_fovY * MathUtils.DEG_TO_RAD * .5) * near; final double w = h * aspect; _frustumLeft = -w; _frustumRight = w; _frustumBottom = -h; _frustumTop = h; _frustumNear = near; _frustumFar = far; onFrustumChange(); }
/** * Sets the frustum plane values of this camera using the given perspective values. * * @param fovY * the full angle of view on the Y axis, in degrees. * @param aspect * the aspect ratio of our view (generally in [0,1]). Often this is canvas width / canvas height. * @param near * our near plane value * @param far * our far plane value */ public void setFrustumPerspective(final double fovY, final double aspect, final double near, final double far) { if (Double.isNaN(aspect) || Double.isInfinite(aspect)) { // ignore. _logger.warning("Invalid aspect given to setFrustumPerspective: " + aspect); return; } _fovY = fovY; final double h = Math.tan(_fovY * MathUtils.DEG_TO_RAD * .5) * near; final double w = h * aspect; _frustumLeft = -w; _frustumRight = w; _frustumBottom = -h; _frustumTop = h; _frustumNear = near; _frustumFar = far; onFrustumChange(); }
/** * Forces all aspect of the camera to be updated from internal values, and sets all dirty flags to true so that the * next apply() call will fully set this camera to the render context. */ public void update() { _depthRangeDirty = true; onFrustumChange(); onViewPortChange(); onFrameChange(); }
/** * Forces all aspect of the camera to be updated from internal values, and sets all dirty flags to true so that the * next apply() call will fully set this camera to the render context. */ public void update() { _depthRangeDirty = true; onFrustumChange(); onViewPortChange(); onFrameChange(); }
/** * Sets the frustum plane values of this camera using those of a given source camera * * @param source * a source camera. */ public void setFrustum(final Camera source) { _frustumNear = source.getFrustumNear(); _frustumFar = source.getFrustumFar(); _frustumLeft = source.getFrustumLeft(); _frustumRight = source.getFrustumRight(); _frustumTop = source.getFrustumTop(); _frustumBottom = source.getFrustumBottom(); onFrustumChange(); }
/** * Sets the frustum plane values of this camera using those of a given source camera * * @param source * a source camera. */ public void setFrustum(final Camera source) { _frustumNear = source.getFrustumNear(); _frustumFar = source.getFrustumFar(); _frustumLeft = source.getFrustumLeft(); _frustumRight = source.getFrustumRight(); _frustumTop = source.getFrustumTop(); _frustumBottom = source.getFrustumBottom(); onFrustumChange(); }