|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.plugins.blender.textures.blending.TextureBlenderAWT
public class TextureBlenderAWT
The class that is responsible for blending the following texture types:
Field Summary | |
---|---|
protected float |
blendFactor
|
protected int |
blendType
|
protected float[] |
color
|
protected int |
flag
|
protected float[] |
materialColor
|
protected boolean |
negateTexture
|
Fields inherited from interface com.jme3.scene.plugins.blender.textures.blending.TextureBlender |
---|
MTEX_ADD, MTEX_BLEND, MTEX_BLEND_COLOR, MTEX_BLEND_HUE, MTEX_BLEND_SAT, MTEX_BLEND_VAL, MTEX_DARK, MTEX_DIFF, MTEX_DIV, MTEX_LIGHT, MTEX_MUL, MTEX_NUM_BLENDTYPES, MTEX_OVERLAY, MTEX_SCREEN, MTEX_SUB |
Constructor Summary | |
---|---|
TextureBlenderAWT(int flag,
boolean negateTexture,
int blendType,
float[] materialColor,
float[] color,
float blendFactor)
|
Method Summary | |
---|---|
Image |
blend(Image image,
Image baseImage,
BlenderContext blenderContext)
This method blends the given texture with material color and the defined color in 'map to' panel. |
protected void |
blendHSV(int type,
float[] materialRGB,
float fac,
float[] pixelColor,
BlenderContext blenderContext)
The method that performs the ramp blending. |
protected void |
blendPixel(float[] result,
float[] materialColor,
float[] pixelColor,
BlenderContext blenderContext)
This method blends the single pixel depending on the blending type. |
void |
copyBlendingData(TextureBlender textureBlender)
Copies blending data. |
protected void |
prepareImagesForBlending(Image target,
Image source)
The method prepares images for blending. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int flag
protected boolean negateTexture
protected int blendType
protected float[] materialColor
protected float[] color
protected float blendFactor
Constructor Detail |
---|
public TextureBlenderAWT(int flag, boolean negateTexture, int blendType, float[] materialColor, float[] color, float blendFactor)
Method Detail |
---|
public Image blend(Image image, Image baseImage, BlenderContext blenderContext)
TextureBlender
image
- the image we use in blendingbaseImage
- the texture that is underneath the current texture (its pixels
will be used instead of material color)blenderContext
- the blender context
protected void blendPixel(float[] result, float[] materialColor, float[] pixelColor, BlenderContext blenderContext)
result
- the result pixelmaterialColor
- the material colorpixelColor
- the pixel colorblendFactor
- the blending factorblendtype
- the blending typeblenderContext
- the blender contextprotected void blendHSV(int type, float[] materialRGB, float fac, float[] pixelColor, BlenderContext blenderContext)
type
- the blend typematerialRGB
- the rgb value of the material, here the result is stored toofac
- color affection factorpixelColor
- the texture colorblenderContext
- the blender contextpublic void copyBlendingData(TextureBlender textureBlender)
TextureBlender
copyBlendingData
in interface TextureBlender
textureBlender
- the blend data that should be copiedprotected void prepareImagesForBlending(Image target, Image source)
target
- the image where the blending result is storedsource
- the image that is being read only
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |