|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.scenegraph.ZNode
|
+--edu.umd.cs.jazz.scenegraph.ZCamera
ZCamera represents a viewport onto a Scenegraph Node. A camera can look anywhere onto a scenegraph scape as specified by an arbitrary affine transformation. A ZNode can have any number of cameras onto it. Each camera can be associated with a top-level window, a portal, or may not be mapped to any visible device at all.
ZNode| Field Summary | |
protected java.util.HashSet |
dirty
|
protected java.awt.Color |
fillColor
|
static java.awt.Color |
fillColor_DEFAULT
|
protected ZTransform |
inverseViewTransform
|
protected boolean |
inverseViewTransformDirty
|
protected ZArea |
paintArea
|
protected java.util.Vector |
paintStartPoints
|
protected ZArea |
paintVisibleArea
|
protected Dimension2DFloat |
size
|
protected ZSurface |
surface
The optional surface this camera is associated with. |
protected ZTransform |
viewTransform
|
| Fields inherited from class edu.umd.cs.jazz.scenegraph.ZNode |
alpha,
alpha_DEFAULT,
ancestorNotifier,
cacheVolatile,
cameras,
children,
clientProperties,
compBoundsDirty,
compBoundsDirty_DEFAULT,
globalBounds,
globalBoundsDirty,
globalBoundsDirty_DEFAULT,
globalCompBounds,
isVolatile,
layoutManager,
listenerList,
maxMag,
maxMag_DEFAULT,
minMag,
minMag_DEFAULT,
parent,
recursiveLayout,
save,
save_DEFAULT,
transform,
visible,
visible_DEFAULT,
visualComponent |
| Constructor Summary | |
ZCamera()
Constructs a new ZCamera. |
|
ZCamera(ZNode node,
ZSurface aSurface)
Constructs a new ZCamera. |
|
| Method Summary | |
void |
addPaintStartPoint(ZNode node)
Add a portion of the scenegraph that what this camera sees |
void |
cameraToScene(java.awt.geom.Point2D pt)
Transform the point through the camera. |
void |
cameraToScene(java.awt.geom.Rectangle2D rect)
Transform the rectangle through the camera. |
void |
center(java.awt.geom.Rectangle2D bounds,
int millis,
ZSurface aSurface)
Animates the camera view so that the specified bounds is centered with the view of the camera. |
protected void |
computeGlobalBounds()
Computes the bounds of the camera as an object. |
protected void |
computeInverseViewTransform()
Compute the inverse camera transform based on the camera transform. |
void |
damage()
This implements damage in just the same way as is described by ZNode.damage |
void |
damage(boolean boundsChanged)
This implements damage in just the same way as is described by ZNode.damage |
void |
damage(ZBounds bounds)
This is an internal form of damage that is only intended to be used by calls from within ZNode. |
java.util.Vector |
findNodes(ZFindFilter filter)
Return the list of nodes that are accepted by the specified filter in the subtree rooted with this. |
java.awt.Color |
getFillColor()
Get the value of fillColor. |
ZTransform |
getInverseViewTransform()
Returns the inverse ZTransform associated with this camera. |
float |
getMagnification()
Returns the current magnification of this camera. |
java.util.Vector |
getPaintStartPoints()
Returns the Scenegraph that this camera looks onto. |
java.util.Vector |
getSelectedNodes()
Returns the Scenegraph that is selected in this camera's view |
java.awt.geom.Dimension2D |
getSize()
Returns the size of this camera. |
ZSurface |
getSurface()
Get the value of surface. |
ZBounds |
getViewBounds()
Returns the bounds that this Camera sees in global scene coordinates. |
ZTransform |
getViewTransform()
Returns the ZTransform associated with this camera. |
void |
paint(ZRenderContext renderContext)
Paints the view this camera sees. |
ZNode |
pick(ZBounds rect)
Returns the first object under the specified rectangle (if there is one) as searched in reverse (front-to-back) order. |
void |
removePaintStartPoint(ZNode node)
Removes a portion of the scenegrpah from what this camera sees |
void |
sceneToCamera(java.awt.geom.Point2D pt)
Transform the point backwards through the camera (from the camera's viewpoint). |
void |
sceneToCamera(java.awt.geom.Rectangle2D rect)
Transform the rectangle backwards through the camera (from the camera's viewpoint). |
void |
setFillColor(java.awt.Color aColor)
Set the value of fillColor. |
void |
setSize(java.awt.geom.Dimension2D size)
Sets the size of this camera. |
void |
setSize(float width,
float height)
Sets the size of this camera. |
void |
setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
Set some state of this object as it gets read back in. |
void |
setSurface(ZSurface aSurface)
Set the value of surface. |
void |
setViewTransform(ZTransform transform)
Sets the ZTransform associated with this camera. |
void |
swapPaintStartPoint(ZNode original,
ZNode replacement)
Swaps the specified node out of the list of paint start points of this camera, and replaces it with the specified node. |
java.lang.String |
toString()
Generate a string that represents this object for debugging. |
void |
writeObject(ZObjectOutputStream out)
Write out all of this object's state. |
void |
writeObjectRecurse(ZObjectOutputStream out)
Specify which objects this object references in order to write out the scenegraph properly |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.awt.Color fillColor_DEFAULT
protected ZTransform viewTransform
protected ZTransform inverseViewTransform
protected boolean inverseViewTransformDirty
protected java.util.Vector paintStartPoints
protected java.util.HashSet dirty
protected java.awt.Color fillColor
protected ZArea paintArea
protected ZArea paintVisibleArea
protected Dimension2DFloat size
protected ZSurface surface
| Constructor Detail |
public ZCamera()
public ZCamera(ZNode node,
ZSurface aSurface)
node - The part of the scenegraph this camera sees.surf - The surface this top-level camera projects onto| Method Detail |
public void addPaintStartPoint(ZNode node)
node - The part of the scenegraph added to what this camera sees.public void removePaintStartPoint(ZNode node)
node - The part of the scenegraph removed from what this camera sees.
public void swapPaintStartPoint(ZNode original,
ZNode replacement)
original - is the old node that is being swapped out as a paint start pointreplacement - is the new node that is being swapped in as a paint start pointpublic java.util.Vector getPaintStartPoints()
Scenegraph that this camera looks onto.public java.util.Vector getSelectedNodes()
Scenegraph that is selected in this camera's viewpublic ZSurface getSurface()
public void setSurface(ZSurface aSurface)
v - Value to assign to surface.public ZTransform getViewTransform()
ZTransform associated with this camera.protected void computeInverseViewTransform()
public ZTransform getInverseViewTransform()
ZTransform associated with this camera.public void setViewTransform(ZTransform transform)
ZTransform associated with this camera.transform - public void cameraToScene(java.awt.geom.Point2D pt)
pt - The point to be transformedsceneToCamera(Point2D)public void cameraToScene(java.awt.geom.Rectangle2D rect)
rect - The rectangle to be transformedsceneToCamera(Rectangle2D)public void sceneToCamera(java.awt.geom.Point2D pt)
pt - The point to be transformedcameraToScene(Point2D)public void sceneToCamera(java.awt.geom.Rectangle2D rect)
rect - The rectangle to be transformedcameraToScene(Rectangle2D)public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color aColor)
v - Value to assign to fillColor.
public void center(java.awt.geom.Rectangle2D bounds,
int millis,
ZSurface aSurface)
bounds - The bounds to be centered.millis - The time in milliseconds to perform the animationsurface - The surface to be updated during the animationprotected void computeGlobalBounds()
globalBoundspublic ZBounds getViewBounds()
public void setSize(java.awt.geom.Dimension2D size)
size - The new dimension of this camera
public void setSize(float width,
float height)
width - The new width of this camera.height - The new height of this camera.public java.awt.geom.Dimension2D getSize()
public float getMagnification()
public void damage()
ZNode.damage()public void damage(boolean boundsChanged)
ZNode.damage(boolean)public void damage(ZBounds bounds)
bounds - The bounds that need to be damagedpublic void paint(ZRenderContext renderContext)
renderContext - The graphics context to use for rendering.public ZNode pick(ZBounds rect)
rect - Coordinates of pick rectangle in camera coordinates.public java.util.Vector findNodes(ZFindFilter filter)
filter - The filter that decides whether or not to include individual nodes in the find listZVisualComponent.isFindable(),
ZFindFilterpublic java.lang.String toString()
public void setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
fieldType - The fully qualified type of the fieldfieldName - The name of the fieldfieldValue - The value of the field
public void writeObject(ZObjectOutputStream out)
throws java.io.IOException
out - The stream that this object writes into
public void writeObjectRecurse(ZObjectOutputStream out)
throws java.io.IOException
out - The stream that this object writes into
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||