public class Raster extends Geometry
The geometric extent of a Raster object is a single 3D point, specified by the raster position. This means that geometry-based picking or collision with a Raster object will only intersect the object at this single point; the 2D raster image is neither pickable nor collidable.
Modifier and Type | Field and Description |
---|---|
static int |
ALLOW_CLIP_MODE_READ
Specifies that this Raster allows reading the clip mode.
|
static int |
ALLOW_CLIP_MODE_WRITE
Specifies that this Raster allows writing the clip mode.
|
static int |
ALLOW_DEPTH_COMPONENT_READ
Specifies that this Raster allows reading the depth component.
|
static int |
ALLOW_DEPTH_COMPONENT_WRITE
Specifies that this Raster allows writing the depth component.
|
static int |
ALLOW_IMAGE_READ
Specifies that this Raster allows reading the image.
|
static int |
ALLOW_IMAGE_WRITE
Specifies that this Raster allows writing the image.
|
static int |
ALLOW_OFFSET_READ
Specifies that this Raster allows reading the source or
destination offset.
|
static int |
ALLOW_OFFSET_WRITE
Specifies that this Raster allows writing the source or
destination offset.
|
static int |
ALLOW_POSITION_READ
Specifies that this Raster allows reading the position.
|
static int |
ALLOW_POSITION_WRITE
Specifies that this Raster allows writing the position.
|
static int |
ALLOW_SIZE_READ
Specifies that this Raster allows reading the size.
|
static int |
ALLOW_SIZE_WRITE
Specifies that this Raster allows writing the size.
|
static int |
ALLOW_TYPE_READ
Specifies that this Raster allows reading the type.
|
static int |
CLIP_IMAGE
Specifies that the raster object is clipped as an image after
the raster position has been transformed.
|
static int |
CLIP_POSITION
Specifies that this raster object is not drawn
if the raster position is outside the viewing volume.
|
static int |
RASTER_COLOR
Specifies a Raster object with color data.
|
static int |
RASTER_COLOR_DEPTH
Specifies a Raster object with both color and depth (z-buffer) data.
|
static int |
RASTER_DEPTH
Specifies a Raster object with depth (z-buffer) data.
|
ALLOW_INTERSECT
Constructor and Description |
---|
Raster()
Constructs a Raster object with default parameters.
|
Raster(Point3f pos,
int type,
int xSrcOffset,
int ySrcOffset,
int width,
int height,
ImageComponent2D image,
DepthComponent depthComponent)
Constructs a new Raster object with the specified values.
|
Raster(Point3f pos,
int type,
int clipMode,
Point srcOffset,
Dimension size,
Point dstOffset,
ImageComponent2D image,
DepthComponent depthComponent)
Constructs a new Raster object with the specified values.
|
Raster(Point3f pos,
int type,
Point srcOffset,
Dimension size,
ImageComponent2D image,
DepthComponent depthComponent)
Constructs a new Raster object with the specified values.
|
Modifier and Type | Method and Description |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated.
replaced with cloneNodeComponent(boolean forceDuplicate)
|
void |
duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated.
replaced with duplicateNodeComponent(
NodeComponent originalNodeComponent, boolean forceDuplicate)
|
int |
getClipMode()
Retrieves the current clipping mode of this raster object.
|
DepthComponent |
getDepthComponent()
Retrieves the current depth image object.
|
void |
getDstOffset(Point dstOffset)
Retrieves the current destination pixel offset.
|
ImageComponent2D |
getImage()
Retrieves the current pixel array object.
|
void |
getOffset(Point srcOffset)
Deprecated.
As of Java 3D version 1.3, replaced by
getSrcOffset(java.awt.Point) |
void |
getPosition(Point3f pos)
Retrieves the current position in object coordinates of this raster.
|
void |
getSize(Dimension size)
Retrieves the current raster size.
|
void |
getSrcOffset(Point srcOffset)
Retrieves the current source pixel offset.
|
int |
getType()
Retrieves the current type of this raster object, one of: RASTER_COLOR,
RASTER_DEPTH, or RASTER_COLOR_DEPTH.
|
void |
setClipMode(int clipMode)
Sets the clipping mode of this raster object.
|
void |
setDepthComponent(DepthComponent depthComponent)
Sets the depth image used to copy pixels to/from a Canvas3D.
|
void |
setDstOffset(int xDstOffset,
int yDstOffset)
Sets the destination pixel offset of the upper-left corner of
the rendered image relative to the transformed position.
|
void |
setDstOffset(Point dstOffset)
Sets the destination pixel offset of the upper-left corner of
the rendered image relative to the transformed position.
|
void |
setImage(ImageComponent2D image)
Sets the pixel array used to copy pixels to/from a Canvas3D.
|
void |
setOffset(int xSrcOffset,
int ySrcOffset)
Deprecated.
As of Java 3D version 1.3, replaced by
setSrcOffset(int,int) |
void |
setOffset(Point srcOffset)
Deprecated.
As of Java 3D version 1.3, replaced by
setSrcOffset(java.awt.Point) |
void |
setPosition(Point3f pos)
Sets the position in object coordinates of this raster.
|
void |
setSize(Dimension size)
Sets the size of the array of pixels to be copied.
|
void |
setSize(int width,
int height)
Sets the number of pixels to be copied from the pixel array.
|
void |
setSrcOffset(int xSrcOffset,
int ySrcOffset)
Sets the offset within the source array of pixels
at which to start copying.
|
void |
setSrcOffset(Point srcOffset)
Sets the offset within the source array of pixels
at which to start copying.
|
void |
setType(int type)
Sets the type of this raster object to one of: RASTER_COLOR,
RASTER_DEPTH, or RASTER_COLOR_DEPTH.
|
cloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
public static final int RASTER_COLOR
setType(int)
,
Constant Field Valuespublic static final int RASTER_DEPTH
setType(int)
,
Constant Field Valuespublic static final int RASTER_COLOR_DEPTH
setType(int)
,
Constant Field Valuespublic static final int CLIP_POSITION
setClipMode(int)
,
Constant Field Valuespublic static final int CLIP_IMAGE
setClipMode(int)
,
Constant Field Valuespublic static final int ALLOW_POSITION_READ
public static final int ALLOW_POSITION_WRITE
public static final int ALLOW_OFFSET_READ
public static final int ALLOW_OFFSET_WRITE
public static final int ALLOW_IMAGE_READ
public static final int ALLOW_IMAGE_WRITE
public static final int ALLOW_DEPTH_COMPONENT_READ
public static final int ALLOW_DEPTH_COMPONENT_WRITE
public static final int ALLOW_SIZE_READ
public static final int ALLOW_SIZE_WRITE
public static final int ALLOW_TYPE_READ
public static final int ALLOW_CLIP_MODE_READ
public static final int ALLOW_CLIP_MODE_WRITE
public Raster()
public Raster(Point3f pos, int type, int xSrcOffset, int ySrcOffset, int width, int height, ImageComponent2D image, DepthComponent depthComponent)
pos
- the position in object coordinates of the upper-left
corner of the rastertype
- the type of raster object, one of: RASTER_COLOR,
RASTER_DEPTH, or RASTER_COLOR_DEPTHxSrcOffset
- the x offset within the source array of pixels
at which to start copyingySrcOffset
- the y offset within the source array of pixels
at which to start copyingwidth
- the number of columns of pixels to copyheight
- the number of rows of pixels to copyimage
- the ImageComponent2D object containing the
color datadepthComponent
- the DepthComponent object containing the depth
(z-buffer) dataIllegalArgumentException
- if the image class of the specified
ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.public Raster(Point3f pos, int type, Point srcOffset, Dimension size, ImageComponent2D image, DepthComponent depthComponent)
pos
- the position in object coordinates of the upper-left
corner of the rastertype
- the type of raster object, one of: RASTER_COLOR,
RASTER_DEPTH, or RASTER_COLOR_DEPTHsrcOffset
- the offset within the source array of pixels
at which to start copyingsize
- the width and height of the image to be copiedimage
- the ImageComponent2D object containing the
color datadepthComponent
- the DepthComponent object containing the depth
(z-buffer) dataIllegalArgumentException
- if the image class of the specified
ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.public Raster(Point3f pos, int type, int clipMode, Point srcOffset, Dimension size, Point dstOffset, ImageComponent2D image, DepthComponent depthComponent)
pos
- the position in object coordinates of the upper-left
corner of the rastertype
- the type of raster object, one of: RASTER_COLOR,
RASTER_DEPTH, or RASTER_COLOR_DEPTHclipMode
- the clipping mode of the raster object, one of:
CLIP_POSITION or CLIP_IMAGEsrcOffset
- the offset within the source array of pixels
at which to start copyingsize
- the width and height of the image to be copieddstOffset
- the destination pixel offset of the upper-left
corner of the rendered image relative to the transformed positionimage
- the ImageComponent2D object containing the
color datadepthComponent
- the DepthComponent object containing the depth
(z-buffer) dataIllegalArgumentException
- if the image class of the specified
ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.public void setPosition(Point3f pos)
pos
- the new position of this rasterCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getPosition(Point3f pos)
pos
- the vector that will receive the current positionCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setType(int type)
type
- the new type of this rasterRestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph.public int getType()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setClipMode(int clipMode)
clipMode
- the new clipping mode of this raster,
one of: CLIP_POSITION or CLIP_IMAGE. The default mode
is CLIP_POSITION.CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic int getClipMode()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setOffset(int xSrcOffset, int ySrcOffset)
setSrcOffset(int,int)
public void setOffset(Point srcOffset)
setSrcOffset(java.awt.Point)
public void getOffset(Point srcOffset)
getSrcOffset(java.awt.Point)
public void setSrcOffset(int xSrcOffset, int ySrcOffset)
xSrcOffset
- the x offset within the source array of pixels
at which to start copyingySrcOffset
- the y offset within the source array of pixels
at which to start copyingCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setSrcOffset(Point srcOffset)
srcOffset
- the new source pixel offsetCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getSrcOffset(Point srcOffset)
srcOffset
- the object that will receive the source offsetCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setSize(int width, int height)
width
- the number of columns in the array of pixels to copyheight
- the number of rows in the array of pixels to copyCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setSize(Dimension size)
size
- the new sizeCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getSize(Dimension size)
size
- the object that will receive the sizeCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setDstOffset(int xDstOffset, int yDstOffset)
xDstOffset
- the x coordinate of the new offsetyDstOffset
- the y coordinate of the new offsetCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setDstOffset(Point dstOffset)
dstOffset
- the new destination pixel offsetCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void getDstOffset(Point dstOffset)
dstOffset
- the object that will receive the destination offsetCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setImage(ImageComponent2D image)
image
- the ImageComponent2D object containing the
color dataCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphIllegalSharingException
- if this Raster is live and
the specified image is being used by a Canvas3D as an off-screen buffer.IllegalArgumentException
- if the image class of the specified
ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.public ImageComponent2D getImage()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setDepthComponent(DepthComponent depthComponent)
depthComponent
- the DepthComponent object containing the
depth (z-buffer) dataCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic DepthComponent getDepthComponent()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic NodeComponent cloneNodeComponent()
cloneNodeComponent
in class NodeComponent
public void duplicateNodeComponent(NodeComponent originalNodeComponent)
duplicateNodeComponent
in class NodeComponent
Copyright © 2016–2022 SciJava. All rights reserved.