com.jme3.scene.plugins.blender.textures
Class CombinedTexture

java.lang.Object
  extended by 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.


Constructor Summary
CombinedTexture()
           
 
Method Summary
 void add(Texture texture, TextureBlender textureBlender, int uvCoordinatesType, int projectionType, Structure textureStructure, BlenderContext blenderContext)
          This method adds a texture data to the resulting texture.
 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.
 Texture getResultTexture()
           
 java.util.List<Vector2f> getResultUVS()
           
 int getTexturesCount()
           
 boolean hasGeneratedTextures()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedTexture

public CombinedTexture()
Method Detail

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 texture
textureBlender - the texture blender (to mix the texture with its material color)
uvCoordinatesType - the type of UV coordinates
projectionType - the type of UV coordinates projection (for flat textures)
textureStructure - the texture sructure
blenderContext - 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 for
geometriesOMA - 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