ArcGIS Procedural Runtime  3.2.10650
List of all members | Public Member Functions
prtx::MaterialBuilder Class Reference

#include <Material.h>

Inheritance diagram for prtx::MaterialBuilder:
[legend]

Public Member Functions

virtual MaterialPtr createShared (std::wstring *warnings=0) const
 
virtual MaterialPtr createSharedAndReset (std::wstring *warnings=0)
 
 MaterialBuilder ()
 
 MaterialBuilder (const ShaderPtr &shader)
 
 MaterialBuilder (const MaterialPtr &material)
 
virtual void setTexture (const std::wstring &key, const TexturePtr &val, const std::wstring &resolveMapKey)
 
virtual void setTextureArray (const std::wstring &key, const TexturePtrVector &val, const WStringVector &resolveMapKeys)
 
virtual void setTextureArrayItem (const std::wstring &key, size_t index, const TexturePtr &val, const std::wstring &resolveMapKey)
 
virtual void setBool (const std::wstring &key, Bool val)
 
virtual void setInt (const std::wstring &key, int32_t val)
 
virtual void setFloat (const std::wstring &key, double val)
 
virtual void setString (const std::wstring &key, const std::wstring &val)
 
virtual void setBoolArray (const std::wstring &key, const BoolVector &val)
 
virtual void setIntArray (const std::wstring &key, const Int32Vector &val)
 
virtual void setFloatArray (const std::wstring &key, const DoubleVector &val)
 
virtual void setStringArray (const std::wstring &key, const WStringVector &val)
 
virtual void setBlindData (const std::wstring &key, void *val)
 
- Public Member Functions inherited from prtx::SharedPtrBuilder< Material >
SharedPtrBuilderoperator= (const SharedPtrBuilder &)=delete
 
 SharedPtrBuilder (const SharedPtrBuilder &)=delete
 
- Public Member Functions inherited from prtx::BuiltinMaterialAttributesBuilder
virtual void ambient_b (double val)=0
 
virtual void ambient_g (double val)=0
 
virtual void ambient_r (double val)=0
 
virtual void ambientColor (const std::vector< double > &val)=0
 
virtual void bumpMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void bumpmap_rw (double val)=0
 
virtual void bumpmap_su (double val)=0
 
virtual void bumpmap_sv (double val)=0
 
virtual void bumpmap_tu (double val)=0
 
virtual void bumpmap_tv (double val)=0
 
virtual void bumpValue (double val)=0
 
virtual void color_b (double val)=0
 
virtual void color_g (double val)=0
 
virtual void color_r (double val)=0
 
virtual void colormap_rw (double val)=0
 
virtual void colormap_su (double val)=0
 
virtual void colormap_sv (double val)=0
 
virtual void colormap_tu (double val)=0
 
virtual void colormap_tv (double val)=0
 
virtual void diffuseColor (const std::vector< double > &val)=0
 
virtual void diffuseMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void dirtmap_rw (double val)=0
 
virtual void dirtmap_su (double val)=0
 
virtual void dirtmap_sv (double val)=0
 
virtual void dirtmap_tu (double val)=0
 
virtual void dirtmap_tv (double val)=0
 
virtual void doubleSided (bool val)=0
 
virtual void emissive_b (double val)=0
 
virtual void emissive_g (double val)=0
 
virtual void emissive_r (double val)=0
 
virtual void emissiveColor (const std::vector< double > &val)=0
 
virtual void emissiveMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void emissivemap_rw (double val)=0
 
virtual void emissivemap_su (double val)=0
 
virtual void emissivemap_sv (double val)=0
 
virtual void emissivemap_tu (double val)=0
 
virtual void emissivemap_tv (double val)=0
 
virtual void metallic (double val)=0
 
virtual void metallicMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void metallicmap_rw (double val)=0
 
virtual void metallicmap_su (double val)=0
 
virtual void metallicmap_sv (double val)=0
 
virtual void metallicmap_tu (double val)=0
 
virtual void metallicmap_tv (double val)=0
 
virtual void name (const std::wstring &val)=0
 
virtual void normalMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void normalmap_rw (double val)=0
 
virtual void normalmap_su (double val)=0
 
virtual void normalmap_sv (double val)=0
 
virtual void normalmap_tu (double val)=0
 
virtual void normalmap_tv (double val)=0
 
virtual void occlusionMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void occlusionmap_rw (double val)=0
 
virtual void occlusionmap_su (double val)=0
 
virtual void occlusionmap_sv (double val)=0
 
virtual void occlusionmap_tu (double val)=0
 
virtual void occlusionmap_tv (double val)=0
 
virtual void opacity (double val)=0
 
virtual void opacityMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void opacitymap_cutoff (double val)=0
 
virtual void opacitymap_mode (const std::wstring &val)=0
 
virtual void opacitymap_rw (double val)=0
 
virtual void opacitymap_su (double val)=0
 
virtual void opacitymap_sv (double val)=0
 
virtual void opacitymap_tu (double val)=0
 
virtual void opacitymap_tv (double val)=0
 
virtual void reflectivity (double val)=0
 
virtual void roughness (double val)=0
 
virtual void roughnessMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void roughnessmap_rw (double val)=0
 
virtual void roughnessmap_su (double val)=0
 
virtual void roughnessmap_sv (double val)=0
 
virtual void roughnessmap_tu (double val)=0
 
virtual void roughnessmap_tv (double val)=0
 
virtual void shader (const std::wstring &val)=0
 
virtual void shininess (double val)=0
 
virtual void specular_b (double val)=0
 
virtual void specular_g (double val)=0
 
virtual void specular_r (double val)=0
 
virtual void specularColor (const std::vector< double > &val)=0
 
virtual void specularMap (const std::vector< prtx::TexturePtr > &val, const std::vector< std::wstring > &resolveMapKeys)=0
 
virtual void specularmap_rw (double val)=0
 
virtual void specularmap_su (double val)=0
 
virtual void specularmap_sv (double val)=0
 
virtual void specularmap_tu (double val)=0
 
virtual void specularmap_tv (double val)=0
 

Additional Inherited Members

- Protected Member Functions inherited from prtx::BuiltinMaterialAttributesBuilder
virtual bool setBuiltinBool (const std::wstring &k, bool val)
 
virtual bool setBuiltinFloat (const std::wstring &k, double val)
 
virtual bool setBuiltinString (const std::wstring &k, const std::wstring &found)
 

Detailed Description

A class to build Material instances. A MaterialBuilder is initialized with a Shader which defines the allowed key set. Analogous to the Material, there is a set of keys defined by the default Shader which can always be set (see Material for the full list) via the AttributableBuilder interface, and there are direct setters in the BuiltinMaterialAttributesBuilder interface.

The AttributableBuilder interface is extended to the Texture type.

Constructor & Destructor Documentation

◆ MaterialBuilder() [1/3]

prtx::MaterialBuilder::MaterialBuilder ( )

Constructs a MaterialBuilder with the default Shader.

◆ MaterialBuilder() [2/3]

prtx::MaterialBuilder::MaterialBuilder ( const ShaderPtr shader)

Constructs a MaterialBuilder.

Parameters
shaderThe Shader for the Material.

◆ MaterialBuilder() [3/3]

prtx::MaterialBuilder::MaterialBuilder ( const MaterialPtr material)

Constructs a MaterialBuilder from an existing Material.

Parameters
materialThe existing Material.

Member Function Documentation

◆ createShared()

virtual MaterialPtr prtx::MaterialBuilder::createShared ( std::wstring *  warnings = 0) const
virtual

Creates an instance of type C based on the current builder state. Does not modify the builder state.

Parameters
[out]warningsIf warnings != 0, a builder implementation may emit warnings about the creation process.
Returns
Shared pointer to a new instance of type C.

Implements prtx::SharedPtrBuilder< Material >.

◆ createSharedAndReset()

virtual MaterialPtr prtx::MaterialBuilder::createSharedAndReset ( std::wstring *  warnings = 0)
virtual

Creates and instance of type C based on the current builder state. Resets the builder state at the end.

Parameters
[out]warningsIf warnings != 0, a builder implementation may emit warnings about the creation process.
Returns
Shared pointer to a new instance of type C.

Implements prtx::SharedPtrBuilder< Material >.

◆ setBlindData()

virtual void prtx::MaterialBuilder::setBlindData ( const std::wstring &  key,
void *  val 
)
virtual

Sets a blind data value.

Parameters
keyThe key of the value.
valThe blind data value to set.

Implements prtx::AttributableSetter.

◆ setBool()

virtual void prtx::MaterialBuilder::setBool ( const std::wstring &  key,
Bool  val 
)
virtual

◆ setBoolArray()

virtual void prtx::MaterialBuilder::setBoolArray ( const std::wstring &  key,
const BoolVector val 
)
virtual

Sets a boolean array.

Parameters
keyThe key of the array.
valVector with the values to set.

Implements prtx::AttributableSetter.

◆ setFloat()

virtual void prtx::MaterialBuilder::setFloat ( const std::wstring &  key,
double  val 
)
virtual

Sets a float value.

Parameters
keyThe key of the value.
valThe value to set.

Implements prtx::AttributableSetter.

◆ setFloatArray()

virtual void prtx::MaterialBuilder::setFloatArray ( const std::wstring &  key,
const DoubleVector val 
)
virtual

Sets a float array.

Parameters
keyThe key of the array.
valVector with the values to set.

Implements prtx::AttributableSetter.

◆ setInt()

virtual void prtx::MaterialBuilder::setInt ( const std::wstring &  key,
int32_t  val 
)
virtual

Sets an integer value.

Parameters
keyThe key of the value.
valThe value to set.

Implements prtx::AttributableSetter.

◆ setIntArray()

virtual void prtx::MaterialBuilder::setIntArray ( const std::wstring &  key,
const Int32Vector val 
)
virtual

Sets an integer array.

Parameters
keyThe key of the array.
valVector with the values to set.

Implements prtx::AttributableSetter.

◆ setString()

virtual void prtx::MaterialBuilder::setString ( const std::wstring &  key,
const std::wstring &  val 
)
virtual

Sets a string value.

Parameters
keyThe key of the string.
valThe string to set.

Implements prtx::AttributableSetter.

◆ setStringArray()

virtual void prtx::MaterialBuilder::setStringArray ( const std::wstring &  key,
const WStringVector val 
)
virtual

Sets a string array.

Parameters
keyThe key of the array.
valVector with the values to set.

Implements prtx::AttributableSetter.

◆ setTexture()

virtual void prtx::MaterialBuilder::setTexture ( const std::wstring &  key,
const TexturePtr val,
const std::wstring &  resolveMapKey 
)
virtual

Sets a Texture.

Parameters
keyThe key of the Texture. Valid keys are listed in ShaderTextureKeys.
valThe Texture to set.
resolveMapKeyThe ResolveMap key for the texture. The resolveMapKey is visible in CGA via the matching material.XXXmap attribute.
See also
Material::getShaderTextureArrayKeyAndIndexFromCGAMapName().

◆ setTextureArray()

virtual void prtx::MaterialBuilder::setTextureArray ( const std::wstring &  key,
const TexturePtrVector val,
const WStringVector resolveMapKeys 
)
virtual

Sets a Texture array. Note that for convenience, setTextureArray() can also be used to set attributes of type PT_TEXTURE (just use a vector with exactly 1 element).

Parameters
keyThe key of the Texture array. Valid keys are listed in ShaderTextureKeys.
valThe Texture array to set.
resolveMapKeysThe ResolveMap keys for the textures. Must have the same size as val. The resolveMapKey is visible in CGA via the matching material.XXXmap attribute.
See also
Material::getShaderTextureArrayKeyAndIndexFromCGAMapName().

◆ setTextureArrayItem()

virtual void prtx::MaterialBuilder::setTextureArrayItem ( const std::wstring &  key,
size_t  index,
const TexturePtr val,
const std::wstring &  resolveMapKey 
)
virtual

Sets a Texture array item. Note that for convenience, setTextureArrayItem() can also be used to set attributes of type PT_TEXTURE (just use 0 as index).

Parameters
keyThe key of the Texture array. Valid keys are listed in ShaderTextureKeys.
indexThe index into the texture array. Valid indices are listed in ShaderTextureKeys.
valThe Texture to set.
resolveMapKeyThe ResolveMap key for the texture. The resolveMapKey is visible in CGA via the matching material.XXXmap attribute.
See also
Material::getShaderTextureArrayKeyAndIndexFromCGAMapName().

The documentation for this class was generated from the following file: