edu.umd.cs.jazz.scenegraph
Class ZRenderContext
java.lang.Object
|
+--edu.umd.cs.jazz.scenegraph.ZRenderContext
- public class ZRenderContext
- extends java.lang.Object
ZRenderContext stores information relevant to the current render
as it occurs. The ZRenderContext lives with the scenegraph because
this way the scenegraph can be queried about how it is currently being
rendered (if at all).
The ZRenderContext stores information about what cameras are being rendered
(there could be more than one if a portal is being recursively rendered).
- See Also:
ZCamera
|
Field Summary |
protected float |
cameraMagnification
|
protected java.util.Stack |
cameraMagStack
|
protected java.util.Stack |
cameras
List of (recursive) cameras currently rendering the scenegraph |
protected java.awt.Graphics2D |
g2
|
protected ZSurface |
surface
|
protected java.util.Stack |
transforms
List of (recursive) transforms that are the transform that the
camera started with before it started painting. |
protected ZArea |
visibleArea
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
cameras
protected java.util.Stack cameras
- List of (recursive) cameras currently rendering the scenegraph
transforms
protected java.util.Stack transforms
- List of (recursive) transforms that are the transform that the
camera started with before it started painting. Visual components
could need to know this for advanced techniques.
surface
protected ZSurface surface
g2
protected java.awt.Graphics2D g2
visibleArea
protected ZArea visibleArea
cameraMagStack
protected java.util.Stack cameraMagStack
cameraMagnification
protected float cameraMagnification
ZRenderContext
public ZRenderContext(java.awt.Graphics2D aG2,
ZArea aVisibleArea,
ZSurface aSurface)
- Constructs a new ZRenderContext.
getGraphics2D
public java.awt.Graphics2D getGraphics2D()
setVisibleArea
public void setVisibleArea(ZArea area)
getVisibleArea
public ZArea getVisibleArea()
getSurface
public ZSurface getSurface()
getRenderingCamera
public ZCamera getRenderingCamera()
getRenderingTransform
public java.awt.geom.AffineTransform getRenderingTransform()
pushCamera
public void pushCamera(ZCamera camera)
popCamera
public void popCamera()
getCameraMagnification
public float getCameraMagnification()
- Returns the magnification of the current camera being rendered within.
If currently being rendered within nested cameras, then this returns only
the magnification of the current camera. Note that this does not
include the transformations of the current or any other object being rendered.
- See Also:
getCompositeMagnification()
getCompositeMagnification
public float getCompositeMagnification()
- Returns the total current magnification that is currently being used for rendering.
This includes the magnifcation of the current cameras as well as the scale
of the current any parent objects.
- See Also:
getCameraMagnification()