| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private Light | |
| private float | |
| private float | |
| private float |
| Access | Constructor and Description |
|---|---|
| public | PhongLighting(Light
the light source light)Constructs a new |
| public | PhongLighting(Light
the light source light, Effect the input containing the bump map bumpInput, Effect the input containing the content data contentInput)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public BaseBounds | getBounds(BaseTransform
the transform the effect will be viewed under transform, Effect the default input defaultInput)Effect to be used in
all cases where a filter has a null inputOverrides com. Returns the bounding box that will be affected by this filter
operation when viewed under the specified |
| public final Effect | |
| public final Effect | Returns: the content input for thisEffectReturns the content input for this |
| private Effect | |
| public float | |
| public DirtyRegionContainer | getDirtyRegions(Effect
the default input defaultInput, DirtyRegionPool Effect to be used in
all cases where a filter has a null inputthe pool of dirty regions regionPool)Overrides com. Returns the dirty region container containing dirty regions affected by this filter operation. |
| public Light | |
| public RenderState | getRenderState(FilterContext
the context object that would be used by the Renderer
if this call is preparing for a render operation, or null fctx, BaseTransform the transform for the output of this operation transform, Rectangle the clip rectangle that may restrict this operation, or null outputClip, Object the rendering helper object that can be used to shortcut
this operation under certain conditions, or null renderHelper, Effect the defaultInput)Effect to be used in place of any null inputsImplements abstract com. Returns the object representing the rendering strategy and state for the filter operation characterized by the specified arguments. |
| public Rectangle | getResultBounds(BaseTransform transform, Rectangle outputClip, ImageData... inputDatas)
Overrides com.
|
| public float | |
| public float | |
| public float | |
| public boolean | reducesOpaquePixels()
Implements abstract com. Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input. |
| public void | setBumpInput(Effect
the bump input for this bumpInput)EffectSets the bump input for this |
| public void | setContentInput(Effect
the content input for this contentInput)EffectSets the content input for this |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public Point2D | transform(Point2D
the point in the coordinate space of the primary content
input to be transformed p, Effect the default input defaultInput)Effect to be used in
all cases where a filter has a null inputOverrides com. Transform the specified point |
| public Point2D | untransform(Point2D
the point in the coordinate space of the result output
to be transformed p, Effect the default input defaultInput)Effect to be used in
all cases where a filter has a null inputOverrides com. Transform the specified point |
| diffuseConstant | back to summary |
|---|---|
| private float diffuseConstant | |
| light | back to summary |
|---|---|
| private Light light | |
| specularConstant | back to summary |
|---|---|
| private float specularConstant | |
| specularExponent | back to summary |
|---|---|
| private float specularExponent | |
| surfaceScale | back to summary |
|---|---|
| private float surfaceScale | |
| PhongLighting | back to summary |
|---|---|
| public PhongLighting(Light light) Constructs a new
| |
| PhongLighting | back to summary |
|---|---|
| public PhongLighting(Light light, Effect bumpInput, Effect contentInput) Constructs a new
| |
| getBounds | back to summary |
|---|---|
| public BaseBounds getBounds(BaseTransform transform, Effect defaultInput) Overrides com. Doc from com. Returns the bounding box that will be affected by this filter
operation when viewed under the specified
| |
| getBumpInput | back to summary |
|---|---|
| public final Effect getBumpInput() Returns the bump input for this
| |
| getContentInput | back to summary |
|---|---|
| public final Effect getContentInput() Returns the content input for this
| |
| getContentInput | back to summary |
|---|---|
| private Effect getContentInput(Effect defaultInput) | |
| getDiffuseConstant | back to summary |
|---|---|
| public float getDiffuseConstant() Returns the diffuse constant.
| |
| getDirtyRegions | back to summary |
|---|---|
| public DirtyRegionContainer getDirtyRegions(Effect defaultInput, DirtyRegionPool regionPool) Overrides com. Doc from com. Returns the dirty region container containing dirty regions affected by this filter operation.
| |
| getLight | back to summary |
|---|---|
| public Light getLight() Returns the light source.
| |
| getRenderState | back to summary |
|---|---|
| public RenderState getRenderState(FilterContext fctx, BaseTransform transform, Rectangle outputClip, Object renderHelper, Effect defaultInput) Implements abstract com. Doc from com. Returns the object representing the rendering strategy and state for
the filter operation characterized by the specified arguments.
This call can also be used to get a state object for non-rendering
cases like querying the bounds of an operation in which case the
| |
| getResultBounds | back to summary |
|---|---|
| public Rectangle getResultBounds(BaseTransform transform, Rectangle outputClip, ImageData... inputDatas) Overrides com.
| |
| getSpecularConstant | back to summary |
|---|---|
| public float getSpecularConstant() Returns the specular constant.
| |
| getSpecularExponent | back to summary |
|---|---|
| public float getSpecularExponent() Returns the specular exponent.
| |
| getSurfaceScale | back to summary |
|---|---|
| public float getSurfaceScale() Returns the surface scale.
| |
| reducesOpaquePixels | back to summary |
|---|---|
| public boolean reducesOpaquePixels() Implements abstract com. Doc from com. Whether an opacity for any pixel is different (lower) than the corresponding pixel in the default input. It is always safe to return true from this method, though the consequences may be that the caller chooses to not utilize a planned optimization.
| |
| setBumpInput | back to summary |
|---|---|
| public void setBumpInput(Effect bumpInput) Sets the bump input for this
| |
| setContentInput | back to summary |
|---|---|
| public void setContentInput(Effect contentInput) Sets the content input for this
| |
| setDiffuseConstant | back to summary |
|---|---|
| public void setDiffuseConstant(float diffuseConstant) Sets the diffuse constant.
Min: 0.0
Max: 2.0
Default: 1.0
Identity: n/a
| |
| setLight | back to summary |
|---|---|
| public void setLight(Light light) Sets the light source.
| |
| setSpecularConstant | back to summary |
|---|---|
| public void setSpecularConstant(float specularConstant) Sets the specular constant.
Min: 0.0
Max: 2.0
Default: 1.0
Identity: n/a
| |
| setSpecularExponent | back to summary |
|---|---|
| public void setSpecularExponent(float specularExponent) Sets the specular exponent.
Min: 0.0
Max: 40.0
Default: 1.0
Identity: n/a
| |
| setSurfaceScale | back to summary |
|---|---|
| public void setSurfaceScale(float surfaceScale) Sets the surface scale.
Min: 0.0
Max: 10.0
Default: 1.0
Identity: n/a
| |
| transform | back to summary |
|---|---|
| public Point2D transform(Point2D p, Effect defaultInput) Overrides com. Doc from com. Transform the specified point
The definition of which input represents the primary content input
and how the coordinate space of that input compares to the coordinate
space of the result varies from effect to effect.
Note that some effects may have a reasonable definition of how to
map source coordinates to destination coordinates, but not the
reverse.
In particular, effects which map source coordinates discontiguously
into the result may have several output coordinates that are affected
by a given input coordinate and may choose to return one of many
equally valid answers, or an undefined result such as | |
| untransform | back to summary |
|---|---|
| public Point2D untransform(Point2D p, Effect defaultInput) Overrides com. Doc from com. Transform the specified point
The definition of which input represents the primary content input
and how the coordinate space of that input compares to the coordinate
space of the result varies from effect to effect.
Note that some effects may have a reasonable definition of how to
map destination coordinates back to source coordinates, but not the
reverse.
In particular, effects which produce entirely synthetic results not
based on any content input may not be able to give a meaningful
result to this query and may return undefined coordinates such as
| |