public class CombinedTexture
extends java.lang.Object
Constructor and Description |
---|
CombinedTexture(int mappingType,
boolean discardCoveredTextures)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Texture texture,
TextureBlender textureBlender,
int uvCoordinatesType,
int projectionType,
Structure textureStructure,
java.lang.String uvCoordinatesName,
BlenderContext blenderContext)
This method adds a texture data to the resulting texture.
|
java.lang.String |
flatten(Geometry geometry,
java.lang.Long geometriesOMA,
java.util.Map<java.lang.String,java.util.List<Vector2f>> userDefinedUVCoordinates,
BlenderContext blenderContext)
This method flattens the texture and creates a single result of Texture2D
type.
|
TextureCubeMap |
generateSkyTexture(ColorRGBA horizontalColor,
ColorRGBA zenithColor,
BlenderContext blenderContext)
Generates a texture that will be used by the sky spatial.
|
int |
getMappingType() |
Texture |
getResultTexture() |
java.util.List<Vector2f> |
getResultUVS() |
int |
getTexturesCount() |
boolean |
hasGeneratedTextures() |
public CombinedTexture(int mappingType, boolean discardCoveredTextures)
mappingType
- texture mapping typediscardCoveredTextures
- if set to true then if a texture without alpha is added then all textures below are discarded because
the new one will cover them anyway, if set to false then all textures are storedpublic void add(Texture texture, TextureBlender textureBlender, int uvCoordinatesType, int projectionType, Structure textureStructure, java.lang.String uvCoordinatesName, BlenderContext blenderContext)
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 sructureuvCoordinatesName
- the name of the used user's UV coordinates for this textureblenderContext
- the blender contextpublic java.lang.String flatten(Geometry geometry, java.lang.Long geometriesOMA, java.util.Map<java.lang.String,java.util.List<Vector2f>> userDefinedUVCoordinates, BlenderContext blenderContext)
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 contextpublic TextureCubeMap generateSkyTexture(ColorRGBA horizontalColor, ColorRGBA zenithColor, BlenderContext blenderContext)
horizontalColor
- the horizon colorzenithColor
- the zenith colorblenderContext
- the blender contextpublic Texture getResultTexture()
public java.util.List<Vector2f> getResultUVS()
public int getTexturesCount()
public int getMappingType()
public boolean hasGeneratedTextures()