public class SSEPerspectiveTransformPeer extends SSEEffectPeer
| Constructor and Description |
|---|
SSEPerspectiveTransformPeer(FilterContext fctx,
Renderer r,
java.lang.String uniqueName) |
| Modifier and Type | Method and Description |
|---|---|
ImageData |
filter(Effect effect,
RenderState rstate,
BaseTransform transform,
Rectangle outputClip,
ImageData... inputs) |
private static void |
filter(int[] dstPixels,
int dstx,
int dsty,
int dstw,
int dsth,
int dstscan,
int[] baseImg_arr,
float src0Rect_x1,
float src0Rect_y1,
float src0Rect_x2,
float src0Rect_y2,
int src0w,
int src0h,
int src0scan,
float tx0_x,
float tx0_y,
float tx0_z,
float tx1_x,
float tx1_y,
float tx1_z,
float tx2_x,
float tx2_y,
float tx2_z) |
protected PerspectiveTransform |
getEffect() |
private float[][] |
getITX() |
int |
getTextureCoordinates(int inputIndex,
float[] coords,
float srcX,
float srcY,
float srcNativeWidth,
float srcNativeHeight,
Rectangle dstBounds,
BaseTransform transform)
Returns either 4 or 8 source texture coordinates depending on the
transform being applied to the source.
|
private float[] |
getTx0() |
private float[] |
getTx1() |
private float[] |
getTx2() |
dispose, getAccelType, getDestBounds, getDestNativeBounds, getFilterContext, getInputBounds, getInputNativeBounds, getInputTransform, getPass, getRenderer, getRenderState, getResultBounds, getSamplerData, getSourceRegion, getTextureCoordinates, getUniqueName, isImageDataCompatible, isOriginUpperLeft, setDestBounds, setDestNativeBounds, setEffect, setInputBounds, setInputNativeBounds, setInputTransform, setPass, setRenderStatepublic SSEPerspectiveTransformPeer(FilterContext fctx, Renderer r, java.lang.String uniqueName)
protected final PerspectiveTransform getEffect()
getEffect in class EffectPeerprivate float[][] getITX()
private float[] getTx0()
private float[] getTx1()
private float[] getTx2()
public int getTextureCoordinates(int inputIndex,
float[] coords,
float srcX,
float srcY,
float srcNativeWidth,
float srcNativeHeight,
Rectangle dstBounds,
BaseTransform transform)
EffectPeerIf the mapping is rectilinear then 4 floats are returned. The texture coordinates are thus mapped using the following table:
dx1,dy1 => ret[0], ret[1]
dx2,dy1 => ret[2], ret[1]
dx1,dy2 => ret[0], ret[3]
dx2,dy2 => ret[2], ret[3]
If the mapping is non-rectilinear then 8 floats are returned and
the texture coordinates are mapped using the following table (note
that the dx1,dy1 and dx2,dy2 mappings are still from the same
indices as in the 4 float return value):
dx1,dy1 => ret[0], ret[1]
dx2,dy1 => ret[4], ret[5]
dx1,dy2 => ret[6], ret[7]
dx2,dy2 => ret[2], ret[3]
The default implementation of this method simply calls the static
method EffectPeer.getTextureCoordinates(float[],float,float,float,float,Rectangle,BaseTransform).getTextureCoordinates in class EffectPeerinputIndex - the index of the input whose texture coordinates
are being queriedcoords - An array that can hold up to 8 floats for returning
the texture coordinates.srcX - The X coordinate of the origin of the source texture
in the untransformed coordinate space.srcY - The Y coordinate of the origin of the source texture
in the untransformed coordinate space.srcNativeWidth - the native width of the source texturesrcNativeHeight - the native height of the source texturedstBounds - the output bounds that the texture is
being stretched overtransform - the transform to be implicitly applied to the
source texture as it is mapped onto the destinationcoords
array (either 4 or 8)public ImageData filter(Effect effect, RenderState rstate, BaseTransform transform, Rectangle outputClip, ImageData... inputs)
filter in class EffectPeerprivate static void filter(int[] dstPixels,
int dstx,
int dsty,
int dstw,
int dsth,
int dstscan,
int[] baseImg_arr,
float src0Rect_x1,
float src0Rect_y1,
float src0Rect_x2,
float src0Rect_y2,
int src0w,
int src0h,
int src0scan,
float tx0_x,
float tx0_y,
float tx0_z,
float tx1_x,
float tx1_y,
float tx1_z,
float tx2_x,
float tx2_y,
float tx2_z)