com.jme3.scene.plugins.blender.textures
Class CombinedTexture
java.lang.Object
com.jme3.scene.plugins.blender.textures.CombinedTexture
public class CombinedTexture
- extends java.lang.Object
This class represents a texture that is defined for the material. It can be
made of several textures (both 2D and 3D) that are merged together and
returned as a single texture.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CombinedTexture
public CombinedTexture()
add
public void add(Texture texture,
TextureBlender textureBlender,
int uvCoordinatesType,
int projectionType,
Structure textureStructure,
BlenderContext blenderContext)
- This method adds a texture data to the resulting texture.
- Parameters:
texture
- the source texturetextureBlender
- the texture blender (to mix the texture with its material
color)uvCoordinatesType
- the type of UV coordinatesprojectionType
- the type of UV coordinates projection (for flat textures)textureStructure
- the texture sructureblenderContext
- the blender context
flatten
public void flatten(Geometry geometry,
java.lang.Long geometriesOMA,
java.util.List<Vector2f> userDefinedUVCoordinates,
BlenderContext blenderContext)
- This method flattens the texture and creates a single result of Texture2D
type.
- Parameters:
geometry
- the geometry the texture is created forgeometriesOMA
- the old memory address of the geometries list that the given
geometry belongs to (needed for bounding box creation)userDefinedUVCoordinates
- the UV's defined by user (null or zero length table if none
were defined)blenderContext
- the blender context
getResultTexture
public Texture getResultTexture()
- Returns:
- the result texture
getResultUVS
public java.util.List<Vector2f> getResultUVS()
- Returns:
- the result UV coordinates
getTexturesCount
public int getTexturesCount()
- Returns:
- the amount of added textures
hasGeneratedTextures
public boolean hasGeneratedTextures()
- Returns:
- true if the texture has at least one generated texture component and false otherwise