|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.post.Filter
com.jme3.post.filters.CartoonEdgeFilter
public class CartoonEdgeFilter
Applies a cartoon-style edge detection filter to all objects in the scene.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme3.post.Filter |
---|
Filter.Pass |
Field Summary |
---|
Fields inherited from class com.jme3.post.Filter |
---|
defaultPass, enabled, material, postRenderPasses, processor |
Constructor Summary | |
---|---|
CartoonEdgeFilter()
Creates a CartoonEdgeFilter |
Method Summary | |
---|---|
float |
getDepthSensitivity()
Return the depth sensitivity for more details see setDepthSensitivity(float depthSensitivity) |
float |
getDepthThreshold()
returns the depth threshold for more details see setDepthThreshold(float depthThreshold) |
ColorRGBA |
getEdgeColor()
returns the edge color |
float |
getEdgeIntensity()
returns the edge intensity for more details see setEdgeIntensity(float edgeIntensity) |
float |
getEdgeWidth()
returns the width of the edges |
protected Material |
getMaterial()
Must return the material used for this filter. |
float |
getNormalSensitivity()
returns the normals sensitivity form more details see setNormalSensitivity(float normalSensitivity) |
float |
getNormalThreshold()
returns the normal threshold for more details see setNormalThreshold(float normalThreshold) |
protected void |
initFilter(AssetManager manager,
RenderManager renderManager,
ViewPort vp,
int w,
int h)
Initialization of sub classes filters This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization |
protected boolean |
isRequiresDepthTexture()
Override this method and return true if your Filter needs the depth texture |
protected void |
postQueue(RenderManager renderManager,
ViewPort viewPort)
Override this method if you want to make a pre pass, before the actual rendering of the frame |
void |
setDepthSensitivity(float depthSensitivity)
sets the depth sensitivity defines how much depth will influence edges, default is 10 |
void |
setDepthThreshold(float depthThreshold)
sets the depth threshold Defines at what threshold of difference of depth an edge is outlined default is 0.1f |
void |
setEdgeColor(ColorRGBA edgeColor)
Sets the edge color, default is black |
void |
setEdgeIntensity(float edgeIntensity)
sets the edge intensity Defineshow visilble will be the outlined edges |
void |
setEdgeWidth(float edgeWidth)
sets the witdh of the edge in pixels default is 1 |
void |
setNormalSensitivity(float normalSensitivity)
sets the normals sensitivity default is 1 |
void |
setNormalThreshold(float normalThreshold)
sets the normal threshold default is 0.5 |
Methods inherited from class com.jme3.post.Filter |
---|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresSceneTexture, postFrame, preFrame, read, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CartoonEdgeFilter()
Method Detail |
---|
protected boolean isRequiresDepthTexture()
Filter
isRequiresDepthTexture
in class Filter
protected void postQueue(RenderManager renderManager, ViewPort viewPort)
Filter
postQueue
in class Filter
protected Material getMaterial()
Filter
getMaterial
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 filterpublic float getDepthSensitivity()
setDepthSensitivity(float depthSensitivity)
public void setDepthSensitivity(float depthSensitivity)
depthSensitivity
- public float getDepthThreshold()
setDepthThreshold(float depthThreshold)
public void setDepthThreshold(float depthThreshold)
depthThreshold
- public float getEdgeIntensity()
setEdgeIntensity(float edgeIntensity)
public void setEdgeIntensity(float edgeIntensity)
edgeIntensity
- public float getEdgeWidth()
public void setEdgeWidth(float edgeWidth)
edgeWidth
- public float getNormalSensitivity()
setNormalSensitivity(float normalSensitivity)
public void setNormalSensitivity(float normalSensitivity)
normalSensitivity
- public float getNormalThreshold()
setNormalThreshold(float normalThreshold)
public void setNormalThreshold(float normalThreshold)
normalThreshold
- public ColorRGBA getEdgeColor()
public void setEdgeColor(ColorRGBA edgeColor)
edgeColor
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |