public class MaterialBuilder
extends java.lang.Object
MaterialModelV2 instances| Modifier and Type | Method and Description |
|---|---|
MaterialModelV2 |
build()
Create the
MaterialModelV2 instance with the current state |
static MaterialBuilder |
create()
Creates a new instance
|
MaterialBuilder |
setAlphaCutoff(float alphaCutoff)
Set the alpha cutoff
|
MaterialBuilder |
setAlphaMode(MaterialModelV2.AlphaMode alphaMode)
Set the alpha mode
|
MaterialBuilder |
setBaseColorFactor(float r,
float g,
float b,
float a)
Set the base color factors
|
MaterialBuilder |
setBaseColorTexture(java.lang.String fileName,
java.lang.String uri,
java.lang.Integer texCoord)
Convenience method to set the base color texture to the image that
is read from the specified file.
|
MaterialBuilder |
setBaseColorTexture(TextureModel baseColorTexture,
java.lang.Integer texCoord)
Set the base color texture
|
MaterialBuilder |
setDoubleSided(boolean doubleSided)
Set whether the material is double sided
|
MaterialBuilder |
setEmissiveTexture(java.lang.String fileName,
java.lang.String uri,
float r,
float g,
float b,
java.lang.Integer texCoord)
Convenience method to set the occlusion texture to the image
that is read from the specified file.
|
MaterialBuilder |
setEmissiveTexture(TextureModel emissiveTexture,
float r,
float g,
float b,
java.lang.Integer texCoord)
Set the emissive texture
|
MaterialBuilder |
setMetallicRoughnessFactors(float metallicFactor,
float roughnessFactor)
Set the metallic and roughness factors
|
MaterialBuilder |
setMetallicRoughnessTexture(java.lang.String fileName,
java.lang.String uri,
java.lang.Integer texCoord)
Convenience method to set the metallic-roughness texture to the image
that is read from the specified file.
|
MaterialBuilder |
setMetallicRoughnessTexture(TextureModel metallicRoughnessTexture,
java.lang.Integer texCoord)
Set the metallic-roughness texture
|
MaterialBuilder |
setNormalTexture(java.lang.String fileName,
java.lang.String uri,
float scale,
java.lang.Integer texCoord)
Convenience method to set the normal texture to the image
that is read from the specified file.
|
MaterialBuilder |
setNormalTexture(TextureModel normalTexture,
float scale,
java.lang.Integer texCoord)
Set the normal texture
|
MaterialBuilder |
setOcclusionTexture(java.lang.String fileName,
java.lang.String uri,
float strength,
java.lang.Integer texCoord)
Convenience method to set the occlusion texture to the image
that is read from the specified file.
|
MaterialBuilder |
setOcclusionTexture(TextureModel occlusionTexture,
float strength,
java.lang.Integer texCoord)
Set the occlusion texture
|
public static MaterialBuilder create()
MaterialBuilderpublic MaterialBuilder setBaseColorFactor(float r, float g, float b, float a)
r - The red factorg - The green factorb - The blue factora - The alpha factorpublic MaterialBuilder setBaseColorTexture(java.lang.String fileName, java.lang.String uri, java.lang.Integer texCoord)
fileName - The file nameuri - The URI that will be assigned to the ImageModeltexCoord - The optional texture coordinate setpublic MaterialBuilder setBaseColorTexture(TextureModel baseColorTexture, java.lang.Integer texCoord)
baseColorTexture - The base color texturetexCoord - The optional texture coordinate setpublic MaterialBuilder setMetallicRoughnessFactors(float metallicFactor, float roughnessFactor)
metallicFactor - The metallic factorroughnessFactor - The roughness factorpublic MaterialBuilder setMetallicRoughnessTexture(java.lang.String fileName, java.lang.String uri, java.lang.Integer texCoord)
fileName - The file nameuri - The URI that will be assigned to the ImageModeltexCoord - The optional texture coordinate setpublic MaterialBuilder setMetallicRoughnessTexture(TextureModel metallicRoughnessTexture, java.lang.Integer texCoord)
metallicRoughnessTexture - The metallic-roughness texturetexCoord - The optional texture coordinate setpublic MaterialBuilder setNormalTexture(java.lang.String fileName, java.lang.String uri, float scale, java.lang.Integer texCoord)
fileName - The file nameuri - The URI that will be assigned to the ImageModelscale - The normal scaletexCoord - The optional texture coordinate setpublic MaterialBuilder setNormalTexture(TextureModel normalTexture, float scale, java.lang.Integer texCoord)
normalTexture - The normal texturescale - The scalingtexCoord - The optional texture coordinate setpublic MaterialBuilder setOcclusionTexture(java.lang.String fileName, java.lang.String uri, float strength, java.lang.Integer texCoord)
fileName - The file nameuri - The URI that will be assigned to the ImageModelstrength - The occlusion strengthtexCoord - The optional texture coordinate setpublic MaterialBuilder setOcclusionTexture(TextureModel occlusionTexture, float strength, java.lang.Integer texCoord)
occlusionTexture - The occlusion texturestrength - The occlusion strengthtexCoord - The optional texture coordinate setpublic MaterialBuilder setEmissiveTexture(java.lang.String fileName, java.lang.String uri, float r, float g, float b, java.lang.Integer texCoord)
fileName - The file nameuri - The URI that will be assigned to the ImageModelr - The red factorg - The green factorb - The blue factortexCoord - The optional texture coordinate setpublic MaterialBuilder setEmissiveTexture(TextureModel emissiveTexture, float r, float g, float b, java.lang.Integer texCoord)
emissiveTexture - The emissive texturer - The red factorg - The green factorb - The blue factortexCoord - The optional texture coordinate setpublic MaterialBuilder setAlphaMode(MaterialModelV2.AlphaMode alphaMode)
alphaMode - The alpha modepublic MaterialBuilder setAlphaCutoff(float alphaCutoff)
alphaCutoff - The alpha cutoffpublic MaterialBuilder setDoubleSided(boolean doubleSided)
doubleSided - Whether the material is double sidedpublic MaterialModelV2 build()
MaterialModelV2 instance with the current stateMaterialModelV2Copyright © 2022. All Rights Reserved.