public class CrossHatchFilter extends Filter
Filter.Pass
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
CrossHatchFilter()
Creates a crossHatch filter
|
CrossHatchFilter(ColorRGBA lineColor,
ColorRGBA paperColor)
Creates a crossHatch filter
|
Modifier and Type | Method and Description |
---|---|
float |
getColorInfluenceLine()
Returns current influence of image colors on lines
|
float |
getColorInfluencePaper()
Returns current influence of image colors on paper background
|
float |
getFillValue()
Returns line/paper color ratio for blobs
|
ColorRGBA |
getLineColor()
Returns line color
|
float |
getLineDistance()
Returns minimum distance between lines
|
float |
getLineThickness()
Returns the thickness of the lines drawn
|
float |
getLuminance1()
Returns threshold for lines 1
|
float |
getLuminance2()
Returns threshold for lines 2
|
float |
getLuminance3()
Returns threshold for lines 3
|
float |
getLuminance4()
Returns threshold for lines 4
|
float |
getLuminance5()
Returns threshold for blobs
|
protected Material |
getMaterial()
Must return the material used for this filter.
|
ColorRGBA |
getPaperColor()
Returns paper background color
|
protected void |
initFilter(AssetManager manager,
RenderManager renderManager,
ViewPort vp,
int w,
int h)
Initialization of filter subclasses.
|
protected boolean |
isRequiresDepthTexture()
Override this method and return true if your Filter needs the depth texture
|
void |
setColorInfluenceLine(float colorInfluenceLine)
Sets color influence of original image on lines drawn
|
void |
setColorInfluencePaper(float colorInfluencePaper)
Sets color influence of original image on non-line areas
|
void |
setFillValue(float fillValue)
Sets line/paper color ratio for areas with values less than luminance5,
really dark areas get no lines but a filled blob instead
|
void |
setLineColor(ColorRGBA lineColor)
Sets color used to draw lines
|
void |
setLineDistance(float lineDistance)
Sets minimum distance between lines drawn
Primary lines are drawn at 2*lineDistance
Secondary lines are drawn at lineDistance
|
void |
setLineThickness(float lineThickness)
Sets the thickness of lines drawn
|
void |
setLuminanceLevels(float luminance1,
float luminance2,
float luminance3,
float luminance4,
float luminance5)
Sets minimum luminance levels for lines drawn
|
void |
setPaperColor(ColorRGBA paperColor)
Sets color used as background
|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, read, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write
protected boolean isRequiresDepthTexture()
Filter
isRequiresDepthTexture
in class Filter
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h)
Filter
initFilter
in class Filter
manager
- the assetManagerrenderManager
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filterprotected Material getMaterial()
Filter
getMaterial
in class Filter
public void setLineColor(ColorRGBA lineColor)
lineColor
- the desired color (alias created, default=(0,0,0,1))public void setPaperColor(ColorRGBA paperColor)
paperColor
- the desired color (alias created, default=(1,1,1,1))public void setColorInfluenceLine(float colorInfluenceLine)
colorInfluenceLine
- the desired factor (default=0.8)public void setColorInfluencePaper(float colorInfluencePaper)
colorInfluencePaper
- the desired factor (default=0.1)public void setFillValue(float fillValue)
fillValue
- the desired ratio (default=0.9)public void setLuminanceLevels(float luminance1, float luminance2, float luminance3, float luminance4, float luminance5)
luminance1
- Top-left to bottom right 1luminance2
- Top-right to bottom left 1luminance3
- Top-left to bottom right 2luminance4
- Top-right to bottom left 2luminance5
- Blobspublic void setLineThickness(float lineThickness)
lineThickness
- the desired thickness (in pixels, default=1)public void setLineDistance(float lineDistance)
lineDistance
- the desired distance (in pixels, default=4)public ColorRGBA getLineColor()
public ColorRGBA getPaperColor()
public float getColorInfluenceLine()
public float getColorInfluencePaper()
public float getFillValue()
public float getLineThickness()
public float getLineDistance()
public float getLuminance1()
public float getLuminance2()
public float getLuminance3()
public float getLuminance4()
public float getLuminance5()