|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.scene.plugins.blender.AbstractBlenderHelper
com.jme3.scene.plugins.blender.textures.TextureHelper
public class TextureHelper
A class that is used in texture calculations.
Field Summary | |
---|---|
static int |
TEX_BLEND
|
static int |
TEX_CLOUDS
|
static int |
TEX_DISTNOISE
|
static int |
TEX_ENVMAP
|
static int |
TEX_IMAGE
|
static int |
TEX_MAGIC
|
static int |
TEX_MARBLE
|
static int |
TEX_MUSGRAVE
|
static int |
TEX_NOISE
|
static int |
TEX_NONE
|
static int |
TEX_PLUGIN
|
static int |
TEX_POINTDENSITY
|
static int |
TEX_STUCCI
|
static int |
TEX_VORONOI
|
static int |
TEX_VOXELDATA
|
static int |
TEX_WOOD
|
Fields inherited from class com.jme3.scene.plugins.blender.AbstractBlenderHelper |
---|
blenderVersion, fixUpAxis, upAxisRotationQuaternion |
Constructor Summary | |
---|---|
TextureHelper(java.lang.String blenderVersion,
boolean fixUpAxis)
This constructor parses the given blender version and stores the result. |
Method Summary | |
---|---|
Image |
convertToNormalMapTexture(Image source,
float strengthFactor)
This method converts the given texture into normal-map texture. |
Image |
decompress(Image image)
This method decompresses the given image. |
protected int |
getHeight(java.awt.image.BufferedImage image,
int x,
int y)
This method returns the height represented by the specified pixel in the given texture. |
Texture |
getTexture(Structure tex,
Structure mTex,
BlenderContext blenderContext)
This class returns a texture read from the file or from packed blender data. |
Texture |
getTextureFromImage(Structure image,
BlenderContext blenderContext)
This class returns a texture read from the file or from packed blender data. |
protected Texture |
loadTextureFromFile(java.lang.String name,
BlenderContext blenderContext)
This method loads the textre from outside the blend file. |
boolean |
shouldBeLoaded(Structure structure,
BlenderContext blenderContext)
This method analyzes the given structure and the data contained within blender context and decides if the feature should be loaded. |
protected int |
vectorToColor(float x,
float y,
float z)
This method transforms given vector's coordinates into ARGB color (A is always = 255). |
Methods inherited from class com.jme3.scene.plugins.blender.AbstractBlenderHelper |
---|
applyProperties, clearState, isBlank, loadProperties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TEX_NONE
public static final int TEX_CLOUDS
public static final int TEX_WOOD
public static final int TEX_MARBLE
public static final int TEX_MAGIC
public static final int TEX_BLEND
public static final int TEX_STUCCI
public static final int TEX_NOISE
public static final int TEX_IMAGE
public static final int TEX_PLUGIN
public static final int TEX_ENVMAP
public static final int TEX_MUSGRAVE
public static final int TEX_VORONOI
public static final int TEX_DISTNOISE
public static final int TEX_POINTDENSITY
public static final int TEX_VOXELDATA
Constructor Detail |
---|
public TextureHelper(java.lang.String blenderVersion, boolean fixUpAxis)
blenderVersion
- the version read from the blend filefixUpAxis
- a variable that indicates if the Y asxis is the UP axis or notMethod Detail |
---|
public Texture getTexture(Structure tex, Structure mTex, BlenderContext blenderContext) throws BlenderFileException
tex
- texture structure filled with datablenderContext
- the blender context
BlenderFileException
- this exception is thrown when the blend file structure is
somehow invalid or corruptedpublic Image convertToNormalMapTexture(Image source, float strengthFactor)
source
- the source texturestrengthFactor
- the normal strength factor
public Image decompress(Image image)
image
- the image to decompress
protected int getHeight(java.awt.image.BufferedImage image, int x, int y)
image
- the height-map texturex
- pixel's X coordinatey
- pixel's Y coordinate
protected int vectorToColor(float x, float y, float z)
x
- X factor of the vectory
- Y factor of the vectorz
- Z factor of the vector
public Texture getTextureFromImage(Structure image, BlenderContext blenderContext) throws BlenderFileException
image
- image structure filled with datablenderContext
- the blender context
BlenderFileException
- this exception is thrown when the blend file structure is
somehow invalid or corruptedprotected Texture loadTextureFromFile(java.lang.String name, BlenderContext blenderContext)
name
- the path to the imageblenderContext
- the blender context
public boolean shouldBeLoaded(Structure structure, BlenderContext blenderContext)
AbstractBlenderHelper
shouldBeLoaded
in class AbstractBlenderHelper
structure
- structure to be analyzedblenderContext
- the blender context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |