Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::MaterialKit Class Reference

The MaterialKit class is a user space object, useful for carrying a group of attribute settings. More...

#include <hps.h>

Inheritance diagram for HPS::MaterialKit:
Collaboration diagram for HPS::MaterialKit:

Public Member Functions

 MaterialKit ()
 The default constructor creates an empty MaterialKit object. More...
 
 MaterialKit (MaterialKit const &in_kit)
 The copy constructor creates a new MaterialKit object that contains the same settings as the source. More...
 
 MaterialKit (MaterialKit &&in_that)
 The move constructor creates a MaterialKit by transferring the underlying impl of the rvalue reference to this MaterialKit thereby avoiding a copy and allocation. More...
 
MaterialKitoperator= (MaterialKit &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this MaterialKit thereby avoiding a copy. More...
 
 ~MaterialKit ()
 Destroy this kit. More...
 
HPS::Type ObjectType () const
 
void Set (MaterialKit const &in_kit)
 Copies all settings from the source MaterialKit into this object. More...
 
void Show (MaterialKit &out_kit) const
 Copies all settings from this MaterialKit into the given MaterialKit. More...
 
MaterialKitoperator= (MaterialKit const &in_kit)
 Copies the source MaterialKit into this object. More...
 
bool Empty () const
 Indicates whether this object has any values set on it. More...
 
bool Equals (MaterialKit const &in_kit) const
 Check if the source MaterialKit is equivalent to this object. More...
 
bool operator== (MaterialKit const &in_kit) const
 Check if the source MaterialKit is equivalent to this object. More...
 
bool operator!= (MaterialKit const &in_kit) const
 Check if the source MaterialKit is not equivalent to this object. More...
 
MaterialKitSetDiffuse (RGBColor const &in_color)
 Applies an RGB color to the whole diffuse channel, replacing any diffuse textures or shaders. More...
 
MaterialKitSetDiffuse (RGBAColor const &in_color)
 Applies an RGBA color to the whole diffuse channel, replacing any diffuse textures or shaders. More...
 
MaterialKitSetDiffuseColor (RGBColor const &in_color)
 Applies an RGB color to the diffuse color channel. More...
 
MaterialKitSetDiffuseColor (RGBAColor const &in_color)
 Applies an RGBA color to the diffuse color channel. More...
 
MaterialKitSetDiffuseAlpha (float in_alpha)
 Applies an alpha channel the diffuse color channel. More...
 
MaterialKitSetDiffuseTexture (char const *in_texture_name, size_t in_layer=0)
 Applies a named texture to the specified layer of the diffuse texture channel, replacing any other textures on that layer. More...
 
MaterialKitSetDiffuseTexture (char const *in_texture_name, RGBAColor const &in_modulating_color, size_t in_layer=0)
 Applies a modulated named texture to the specified layer of the diffuse texture channel, replacing any other textures on that layer. More...
 
MaterialKitSetDiffuseTexture (UTF8Array const &in_texture_names)
 Applies named textures to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers. More...
 
MaterialKitSetDiffuseTexture (size_t in_count, UTF8 const in_texture_names [])
 Applies named textures to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers. More...
 
MaterialKitSetDiffuseTexture (UTF8Array const &in_texture_names, RGBAColorArray const &in_modulating_colors)
 Applies named textures, possibly modulated, to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers. More...
 
MaterialKitSetDiffuseTexture (size_t in_count, UTF8 const in_texture_names [], RGBAColor const in_modulating_colors [])
 Applies named textures, possibly modulated, to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers. More...
 
MaterialKitSetShader (char const *in_shader_name)
 Internal use only - customers should not use. More...
 
MaterialKitSetSpecular (RGBAColor const &in_rgba_color)
 Applies an RGBA color to the specular channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetSpecular (char const *in_texture_name)
 Applies a named texture to the specular channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetSpecular (char const *in_texture_name, RGBAColor const &in_modulating_color)
 Applies a modulated named texture to the specular channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetMirror (RGBAColor const &in_rgba_color)
 Applies an RGBA color to the mirror channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetMirror (char const *in_texture_name)
 Applies a named texture to the mirror channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetMirror (char const *in_texture_name, RGBAColor const &in_modulating_color)
 Applies a modulated named texture to the mirror channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetTransmission (char const *in_texture_name)
 Applies a named texture to the transmission channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetTransmission (char const *in_texture_name, RGBAColor const &in_modulating_color)
 Applies a modulated named texture to the transmission channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetEmission (RGBAColor const &in_rgba_color)
 Applies an RGBA color to the emission channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetEmission (char const *in_texture_name)
 Applies a named texture to the emission channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetEmission (char const *in_texture_name, RGBAColor const &in_modulating_color)
 Applies a modulated named texture to the emission channel, replacing any other color or texture on that channel. More...
 
MaterialKitSetEnvironmentTexture (char const *in_texture_name)
 Applies a named texture to the environment channel, replacing any other texture or cube map on that channel. More...
 
MaterialKitSetEnvironmentTexture (char const *in_texture_name, RGBAColor const &in_modulating_color)
 Applies a modulated named texture to the environment channel, replacing any other texture or cube map on that channel. More...
 
MaterialKitSetEnvironmentCubeMap (char const *in_cubemap_name)
 Applies a named cube map to the environment channel, replacing any other texture or cube map on that channel. More...
 
MaterialKitSetEnvironmentCubeMap (char const *in_cubemap_name, RGBAColor const &in_modulating_color)
 Applies a modulated named cube map to the environment channel, replacing any other texture or cube map on that channel. More...
 
MaterialKitSetEnvironmentTexture ()
 Cancels any other texture or cube map on the environment channel. More...
 
MaterialKitSetBump (char const *in_texture_name)
 Applies a named texture to the bump channel, replacing any other texture on that channel. More...
 
MaterialKitSetGloss (float in_gloss)
 Gloss is a setting that helps to determine the specular response of a material. More...
 
MaterialKitUnsetDiffuseColorRGB ()
 Removes all settings applied to the diffuse rgb channel. More...
 
MaterialKitUnsetDiffuseColor ()
 Removes all settings applied to the diffuse color channel including alpha. More...
 
MaterialKitUnsetDiffuseAlpha ()
 Removes all settings applied to the diffuse alpha channel. More...
 
MaterialKitUnsetDiffuseTexture ()
 Removes all settings applied to all layers of the diffuse texture channel. More...
 
MaterialKitUnsetDiffuseTexture (size_t in_layer)
 Removes all settings applied to the specified layer of the diffuse texture channel. More...
 
MaterialKitUnsetShader ()
 Internal use only - customers should not use. More...
 
MaterialKitUnsetSpecular ()
 Removes all settings applied to the specular channel. More...
 
MaterialKitUnsetMirror ()
 Removes all settings applied to the mirror channel. More...
 
MaterialKitUnsetTransmission ()
 Removes all settings applied to the transmission channel. More...
 
MaterialKitUnsetEmission ()
 Removes all settings applied to the emission channel. More...
 
MaterialKitUnsetEnvironment ()
 Removes all settings applied to the environment channel. More...
 
MaterialKitUnsetBump ()
 Removes all settings applied to the bump channel. More...
 
MaterialKitUnsetGloss ()
 Removes the gloss setting applied to this material. More...
 
MaterialKitUnsetEverything ()
 Removes all setting from this material. More...
 
bool ShowDiffuse () const
 If the diffuse color will override textures and shaders. More...
 
bool ShowDiffuseColor (RGBColor &out_rgb_color) const
 Retrieves RGB color set on the diffuse RGB channel. More...
 
bool ShowDiffuseColor (RGBAColor &out_rgba_color) const
 Retrieves RGBA color set on the diffuse color channel. More...
 
bool ShowDiffuseAlpha (float &out_alpha) const
 Retrieves alpha set on the diffuse alpha channel. More...
 
bool ShowDiffuseTexture (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the possibly modulated texture applied to layer 0 of the diffuse texture channel. More...
 
bool ShowDiffuseTexture (size_t in_layer, Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the possibly modulated texture applied to the specified layer of the diffuse texture channel. More...
 
bool ShowDiffuseTexture (MaterialTypeArray &out_types, RGBAColorArray &out_colors, UTF8Array &out_texture_names) const
 Retrieves the possibly modulated textures applied to all layers of the diffuse texture channel. More...
 
bool ShowShader (UTF8 &out_shader_name) const
 Internal use only - customers should not use. More...
 
bool ShowSpecular (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the color, texture, or modulated texture applied to the specular channel. More...
 
bool ShowMirror (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the color, texture, or modulated texture applied to the mirror channel. More...
 
bool ShowTransmission (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the color, texture, or modulated texture applied to the transmission channel. More...
 
bool ShowEmission (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the color, texture, or modulated texture applied to the emission channel. More...
 
bool ShowEnvironment (Material::Type &out_type, RGBAColor &out_color, UTF8 &out_texture_name) const
 Retrieves the color, texture, or modulated texture applied to the environment channel. More...
 
bool ShowBump (UTF8 &out_texture_name) const
 Retrieves the texture applied to the bump channel. More...
 
bool ShowGloss (float &out_gloss) const
 Retrieves the gloss of this material. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::MaterialKit
 

Detailed Description

The MaterialKit class is a user space object, useful for carrying a group of attribute settings.

A MaterialKit can be associated with various geometry or subgeometery types using a material mapping kit or control.

Constructor & Destructor Documentation

◆ MaterialKit() [1/3]

HPS::MaterialKit::MaterialKit ( )

The default constructor creates an empty MaterialKit object.

◆ MaterialKit() [2/3]

HPS::MaterialKit::MaterialKit ( MaterialKit const &  in_kit)

The copy constructor creates a new MaterialKit object that contains the same settings as the source.

Parameters
in_kitThe source MaterialKit to copy.

◆ MaterialKit() [3/3]

HPS::MaterialKit::MaterialKit ( MaterialKit &&  in_that)

The move constructor creates a MaterialKit by transferring the underlying impl of the rvalue reference to this MaterialKit thereby avoiding a copy and allocation.

Parameters
in_thatAn rvalue reference to a MaterialKit to take the impl from.

◆ ~MaterialKit()

HPS::MaterialKit::~MaterialKit ( )

Destroy this kit.

Member Function Documentation

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ Empty()

bool HPS::MaterialKit::Empty ( ) const
virtual

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented from HPS::Object.

◆ Equals()

bool HPS::MaterialKit::Equals ( MaterialKit const &  in_kit) const

Check if the source MaterialKit is equivalent to this object.

Parameters
in_kitThe source MaterialKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

Returns an identifier that can be used to identify which instance of a class an object is.

Different keys and controls will return the same value if they are backed by the same database resource.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ ObjectType()

HPS::Type HPS::MaterialKit::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Kit.

Here is the call graph for this function:

◆ operator!=()

bool HPS::MaterialKit::operator!= ( MaterialKit const &  in_kit) const

Check if the source MaterialKit is not equivalent to this object.

Parameters
in_kitThe source MaterialKit to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator=() [1/2]

MaterialKit& HPS::MaterialKit::operator= ( MaterialKit &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this MaterialKit thereby avoiding a copy.

Parameters
in_thatAn rvalue reference to a MaterialKit to take the impl from.
Returns
A reference to this MaterialKit.

◆ operator=() [2/2]

MaterialKit& HPS::MaterialKit::operator= ( MaterialKit const &  in_kit)

Copies the source MaterialKit into this object.

Parameters
in_kitThe source MaterialKit to copy.
Returns
A reference to this object.

◆ operator==()

bool HPS::MaterialKit::operator== ( MaterialKit const &  in_kit) const

Check if the source MaterialKit is equivalent to this object.

Parameters
in_kitThe source MaterialKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

◆ Reset()

◆ Set()

void HPS::MaterialKit::Set ( MaterialKit const &  in_kit)

Copies all settings from the source MaterialKit into this object.

Parameters
in_kitThe source MaterialKit to copy.

◆ SetBump()

MaterialKit& HPS::MaterialKit::SetBump ( char const *  in_texture_name)

Applies a named texture to the bump channel, replacing any other texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetDiffuse() [1/2]

MaterialKit& HPS::MaterialKit::SetDiffuse ( RGBColor const &  in_color)

Applies an RGB color to the whole diffuse channel, replacing any diffuse textures or shaders.

Parameters
in_colorThe color to be applied.
Returns
A reference to this object.

◆ SetDiffuse() [2/2]

MaterialKit& HPS::MaterialKit::SetDiffuse ( RGBAColor const &  in_color)

Applies an RGBA color to the whole diffuse channel, replacing any diffuse textures or shaders.

Parameters
in_colorThe color to be applied.
Returns
A reference to this object.

◆ SetDiffuseAlpha()

MaterialKit& HPS::MaterialKit::SetDiffuseAlpha ( float  in_alpha)

Applies an alpha channel the diffuse color channel.

Only one diffuse color may be set at a time but it can coexist with diffuse textures if they have transparency. If diffuse color has not been set, white will be set as a default value in the diffuse color channel with a transparent value of in_alpha.

Parameters
in_alphaThe alpha to be applied.
Returns
A reference to this object.

◆ SetDiffuseColor() [1/2]

MaterialKit& HPS::MaterialKit::SetDiffuseColor ( RGBColor const &  in_color)

Applies an RGB color to the diffuse color channel.

Only one diffuse color may be set at a time but it can coexist with diffuse textures if they have transparency.

Parameters
in_colorThe color to be applied.
Returns
A reference to this object.

◆ SetDiffuseColor() [2/2]

MaterialKit& HPS::MaterialKit::SetDiffuseColor ( RGBAColor const &  in_color)

Applies an RGBA color to the diffuse color channel.

Only one diffuse color may be set at a time but it can coexist with diffuse textures if they have transparency.

Parameters
in_colorThe color to be applied.
Returns
A reference to this object.

◆ SetDiffuseTexture() [1/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( char const *  in_texture_name,
size_t  in_layer = 0 
)

Applies a named texture to the specified layer of the diffuse texture channel, replacing any other textures on that layer.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible. There are two special values that can be passed in here. A null pointer removes the texture name from that layer, allowing the texture on that layer to be inherited from above in the tree. Passing an empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
in_layerThe layer to apply the texture to. Higher numbered layers are applied on top of lower numbered ones.
Returns
A reference to this object.

◆ SetDiffuseTexture() [2/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color,
size_t  in_layer = 0 
)

Applies a modulated named texture to the specified layer of the diffuse texture channel, replacing any other textures on that layer.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible. There are two special values that can be passed in here. A null pointer removes the texture name from that layer, allowing the texture on that layer to be inherited from above in the tree. Passing an empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
in_modulating_colorA color that will be applied as a filter to the texture.
in_layerThe layer to apply the texture to. Higher numbered layers are applied on top of lower numbered ones.
Returns
A reference to this object.

◆ SetDiffuseTexture() [3/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( UTF8Array const &  in_texture_names)

Applies named textures to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers.

Parameters
in_texture_namesThe names of textures, one per layer. Uninitialized strings are ignored. An empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
Returns
A reference to this object.

◆ SetDiffuseTexture() [4/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( size_t  in_count,
UTF8 const  in_texture_names[] 
)

Applies named textures to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers.

Parameters
in_countthe number of elements in the array of names.
in_texture_namesThe names of textures, one per layer. Uninitialized strings are ignored. An empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
Returns
A reference to this object.

◆ SetDiffuseTexture() [5/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( UTF8Array const &  in_texture_names,
RGBAColorArray const &  in_modulating_colors 
)

Applies named textures, possibly modulated, to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers.

Parameters
in_texture_namesThe names of textures, one per layer. Uninitialized strings are ignored. An empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
in_modulating_colorsAn array of modulating colors to be applied to the corresponding layer. If a color in the this array is uninitialized, the texture on that layer will be unmodulated.
Returns
A reference to this object.

◆ SetDiffuseTexture() [6/6]

MaterialKit& HPS::MaterialKit::SetDiffuseTexture ( size_t  in_count,
UTF8 const  in_texture_names[],
RGBAColor const  in_modulating_colors[] 
)

Applies named textures, possibly modulated, to each of the specified layers of the diffuse texture channel, replacing any other textures on those layers.

Parameters
in_countthe number of elements in the both arrays.
in_texture_namesThe names of textures, one per layer. Uninitialized strings are ignored. An empty string, "", removes the texture from that layer but indicates that no texture should be inherited from above, an explicit blank.
in_modulating_colorsAn array of modulating colors to be applied to the corresponding layer. If a color in the this array is uninitialized, the texture on that layer will be unmodulated.
Returns
A reference to this object.

◆ SetEmission() [1/3]

MaterialKit& HPS::MaterialKit::SetEmission ( RGBAColor const &  in_rgba_color)

Applies an RGBA color to the emission channel, replacing any other color or texture on that channel.

Parameters
in_rgba_colorThe color to be applied.
Returns
A reference to this object.

◆ SetEmission() [2/3]

MaterialKit& HPS::MaterialKit::SetEmission ( char const *  in_texture_name)

Applies a named texture to the emission channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetEmission() [3/3]

MaterialKit& HPS::MaterialKit::SetEmission ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named texture to the emission channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the texture.
Returns
A reference to this object.

◆ SetEnvironmentCubeMap() [1/2]

MaterialKit& HPS::MaterialKit::SetEnvironmentCubeMap ( char const *  in_cubemap_name)

Applies a named cube map to the environment channel, replacing any other texture or cube map on that channel.

Parameters
in_cubemap_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetEnvironmentCubeMap() [2/2]

MaterialKit& HPS::MaterialKit::SetEnvironmentCubeMap ( char const *  in_cubemap_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named cube map to the environment channel, replacing any other texture or cube map on that channel.

Parameters
in_cubemap_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the cube map.
Returns
A reference to this object.

◆ SetEnvironmentTexture() [1/3]

MaterialKit& HPS::MaterialKit::SetEnvironmentTexture ( char const *  in_texture_name)

Applies a named texture to the environment channel, replacing any other texture or cube map on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetEnvironmentTexture() [2/3]

MaterialKit& HPS::MaterialKit::SetEnvironmentTexture ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named texture to the environment channel, replacing any other texture or cube map on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the texture.
Returns
A reference to this object.

◆ SetEnvironmentTexture() [3/3]

MaterialKit& HPS::MaterialKit::SetEnvironmentTexture ( )

Cancels any other texture or cube map on the environment channel.

Returns
A reference to this object.

◆ SetGloss()

MaterialKit& HPS::MaterialKit::SetGloss ( float  in_gloss)

Gloss is a setting that helps to determine the specular response of a material.

It is a single floating point value that describes the "focus" of specular reflections off a surface. The gloss value changes the area of the "glare" off a surface. A high gloss value gives a small, focused glare; a low gloss value results in a less polished, more scattered reflection.

Parameters
in_glossGloss is always positive, and most surfaces have a gloss in the range of 1.0 to 30.0.
Returns
A reference to this object.

◆ SetMirror() [1/3]

MaterialKit& HPS::MaterialKit::SetMirror ( RGBAColor const &  in_rgba_color)

Applies an RGBA color to the mirror channel, replacing any other color or texture on that channel.

Parameters
in_rgba_colorThe color to be applied.
Returns
A reference to this object.

◆ SetMirror() [2/3]

MaterialKit& HPS::MaterialKit::SetMirror ( char const *  in_texture_name)

Applies a named texture to the mirror channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetMirror() [3/3]

MaterialKit& HPS::MaterialKit::SetMirror ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named texture to the mirror channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the texture.
Returns
A reference to this object.

◆ SetShader()

MaterialKit& HPS::MaterialKit::SetShader ( char const *  in_shader_name)

Internal use only - customers should not use.

Applies a shader which replaces the diffuse texture at layer 0. It may also replace all diffuse textures depending on the multitexture setting of the shader.

Parameters
in_shader_nameThe name of a shader, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetSpecular() [1/3]

MaterialKit& HPS::MaterialKit::SetSpecular ( RGBAColor const &  in_rgba_color)

Applies an RGBA color to the specular channel, replacing any other color or texture on that channel.

Parameters
in_rgba_colorThe color to be applied.
Returns
A reference to this object.

◆ SetSpecular() [2/3]

MaterialKit& HPS::MaterialKit::SetSpecular ( char const *  in_texture_name)

Applies a named texture to the specular channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetSpecular() [3/3]

MaterialKit& HPS::MaterialKit::SetSpecular ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named texture to the specular channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the texture.
Returns
A reference to this object.

◆ SetTransmission() [1/2]

MaterialKit& HPS::MaterialKit::SetTransmission ( char const *  in_texture_name)

Applies a named texture to the transmission channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
Returns
A reference to this object.

◆ SetTransmission() [2/2]

MaterialKit& HPS::MaterialKit::SetTransmission ( char const *  in_texture_name,
RGBAColor const &  in_modulating_color 
)

Applies a modulated named texture to the transmission channel, replacing any other color or texture on that channel.

Parameters
in_texture_nameThe name of a texture, defined in a portfolio that is accessible.
in_modulating_colorA color that will be applied as a filter to the texture.
Returns
A reference to this object.

◆ Show()

void HPS::MaterialKit::Show ( MaterialKit out_kit) const

Copies all settings from this MaterialKit into the given MaterialKit.

Parameters
out_kitThe MaterialKit to populate with the contents of this object.

◆ ShowBump()

bool HPS::MaterialKit::ShowBump ( UTF8 out_texture_name) const

Retrieves the texture applied to the bump channel.

Parameters
out_texture_nameThe name of a texture applied to this channel.
Returns
true if a texture has been set on the bump channel, false otherwise.

◆ ShowDiffuse()

bool HPS::MaterialKit::ShowDiffuse ( ) const

If the diffuse color will override textures and shaders.

Returns
true if the diffuse color will override textures and shaders, false otherwise.

◆ ShowDiffuseAlpha()

bool HPS::MaterialKit::ShowDiffuseAlpha ( float &  out_alpha) const

Retrieves alpha set on the diffuse alpha channel.

Parameters
out_alphaThe color set on the diffuse alpha channel.
Returns
true if the internal selection limit is valid, false otherwise.

◆ ShowDiffuseColor() [1/2]

bool HPS::MaterialKit::ShowDiffuseColor ( RGBColor out_rgb_color) const

Retrieves RGB color set on the diffuse RGB channel.

Parameters
out_rgb_colorThe RGB color set on the diffuse RGB channel.
Returns
true if the diffuse RGB color is valid, false otherwise.

◆ ShowDiffuseColor() [2/2]

bool HPS::MaterialKit::ShowDiffuseColor ( RGBAColor out_rgba_color) const

Retrieves RGBA color set on the diffuse color channel.

Parameters
out_rgba_colorThe RGBA color set on the diffuse color channel.
Returns
true if the diffuse RGB color is valid, false otherwise.

◆ ShowDiffuseTexture() [1/3]

bool HPS::MaterialKit::ShowDiffuseTexture ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the possibly modulated texture applied to layer 0 of the diffuse texture channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA modulating color applied as a filter to the named texture, only valid if out_type is ModulatedTexture.
out_texture_nameThe name of a texture applied to this channel.
Returns
true if a texture has been set on layer 0 of the diffuse texture channel, false otherwise.

◆ ShowDiffuseTexture() [2/3]

bool HPS::MaterialKit::ShowDiffuseTexture ( size_t  in_layer,
Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the possibly modulated texture applied to the specified layer of the diffuse texture channel.

Parameters
in_layerThe layer number to query for a texture.
out_typeIndicates which of the following arguments is valid. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA modulating color applied as a filter to the named texture, only valid if out_type is ModulatedTexture.
out_texture_nameThe name of a texture applied to this channel.
Returns
true if a texture has been set on the specified layer of the diffuse texture channel, false otherwise.

◆ ShowDiffuseTexture() [3/3]

bool HPS::MaterialKit::ShowDiffuseTexture ( MaterialTypeArray out_types,
RGBAColorArray out_colors,
UTF8Array out_texture_names 
) const

Retrieves the possibly modulated textures applied to all layers of the diffuse texture channel.

Parameters
out_typesAn array of types indicating which of the following arguments is valid for each layer. If a type is TextureName, only the texture name is valid, the color should be ignored. If a type is ModulatedTexture, both the texture name and the modulating color are valid. If a type is Nothing, there is no texture applied to that layer
out_colorsAn array of modulating colors applied as filters to the named textures, each entry is only valid if the corresponding entry in out_types is ModulatedTexture.
out_texture_namesAn array of names of a textures applied to this channel, indexed by layer.
Returns
true if any texture has been set on the diffuse texture channel, false otherwise.

◆ ShowEmission()

bool HPS::MaterialKit::ShowEmission ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the color, texture, or modulated texture applied to the emission channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is RGBAColor, only out_color is valid, the texture name should be ignored. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA color used either for the entire channel or to modulate a texture on this channel. See out_type to determine if this color is valid.
out_texture_nameThe name of a possibly modulated texture applied to this channel. See out_type to determine if this texture name is valid.
Returns
true if any color or texture has been set on the emission channel, false otherwise.

◆ ShowEnvironment()

bool HPS::MaterialKit::ShowEnvironment ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the color, texture, or modulated texture applied to the environment channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is RGBAColor, only out_color is valid, the texture name should be ignored. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA color used either for the entire channel or to modulate a texture on this channel. See out_type to determine if this color is valid.
out_texture_nameThe name of a possibly modulated texture applied to this channel. See out_type to determine if this texture name is valid.
Returns
true if any color or texture has been set on the environment channel, false otherwise.

◆ ShowGloss()

bool HPS::MaterialKit::ShowGloss ( float &  out_gloss) const

Retrieves the gloss of this material.

Gloss is a single floating point value that describes the "focus" of specular reflections off a surface.

See also
SetGloss().
Parameters
out_glossThe gloss value of this material. Gloss is always positive, and most surfaces have a gloss in the range of 1.0 to 30.0.
Returns
true if gloss has been specified for this material, false otherwise.

◆ ShowMirror()

bool HPS::MaterialKit::ShowMirror ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the color, texture, or modulated texture applied to the mirror channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is RGBAColor, only out_color is valid, the texture name should be ignored. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA color used either for the entire channel or to modulate a texture on this channel. See out_type to determine if this color is valid.
out_texture_nameThe name of a possibly modulated texture applied to this channel. See out_type to determine if this texture name is valid.
Returns
true if any color or texture has been set on the mirror channel, false otherwise.

◆ ShowShader()

bool HPS::MaterialKit::ShowShader ( UTF8 out_shader_name) const

Internal use only - customers should not use.

Retrieves the shader applied to this material

Parameters
out_shader_nameThe name of a shader applied to this material.
Returns
true if a shader has been set on this material, false otherwise.

◆ ShowSpecular()

bool HPS::MaterialKit::ShowSpecular ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the color, texture, or modulated texture applied to the specular channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is RGBAColor, only out_color is valid, the texture name should be ignored. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA color used either for the entire channel or to modulate a texture on this channel. See out_type to determine if this color is valid.
out_texture_nameThe name of a possibly modulated texture applied to this channel. See out_type to determine if this texture name is valid.
Returns
true if any color or texture has been set on the specular channel, false otherwise.

◆ ShowTransmission()

bool HPS::MaterialKit::ShowTransmission ( Material::Type out_type,
RGBAColor out_color,
UTF8 out_texture_name 
) const

Retrieves the color, texture, or modulated texture applied to the transmission channel.

Parameters
out_typeIndicates which of the following arguments is valid. If the type is RGBAColor, only out_color is valid, the texture name should be ignored. If the type is TextureName, only the texture name is valid, the color should be ignored. If the type is ModulatedTexture, both the texture name and the modulating color are valid.
out_colorA color used either for the entire channel or to modulate a texture on this channel. See out_type to determine if this color is valid.
out_texture_nameThe name of a possibly modulated texture applied to this channel. See out_type to determine if this texture name is valid.
Returns
true if any color or texture has been set on the transmission channel, false otherwise.

◆ Type()

virtual HPS::Type HPS::Kit::Type ( ) const
inlinevirtualinherited

This function returns the true type of the underlying object.

This function is useful for finding the type of smart pointer objects that have been cast to more generic types.

Returns
The true type of the object in question.

Reimplemented from HPS::Object.

◆ UnsetBump()

MaterialKit& HPS::MaterialKit::UnsetBump ( )

Removes all settings applied to the bump channel.

Returns
A reference to this object.

◆ UnsetDiffuseAlpha()

MaterialKit& HPS::MaterialKit::UnsetDiffuseAlpha ( )

Removes all settings applied to the diffuse alpha channel.

Returns
A reference to this object.

◆ UnsetDiffuseColor()

MaterialKit& HPS::MaterialKit::UnsetDiffuseColor ( )

Removes all settings applied to the diffuse color channel including alpha.

Returns
A reference to this object.

◆ UnsetDiffuseColorRGB()

MaterialKit& HPS::MaterialKit::UnsetDiffuseColorRGB ( )

Removes all settings applied to the diffuse rgb channel.

Returns
A reference to this object.

◆ UnsetDiffuseTexture() [1/2]

MaterialKit& HPS::MaterialKit::UnsetDiffuseTexture ( )

Removes all settings applied to all layers of the diffuse texture channel.

Returns
A reference to this object.

◆ UnsetDiffuseTexture() [2/2]

MaterialKit& HPS::MaterialKit::UnsetDiffuseTexture ( size_t  in_layer)

Removes all settings applied to the specified layer of the diffuse texture channel.

Parameters
in_layerThe layer to remove the setting from.
Returns
A reference to this object.

◆ UnsetEmission()

MaterialKit& HPS::MaterialKit::UnsetEmission ( )

Removes all settings applied to the emission channel.

Returns
A reference to this object.

◆ UnsetEnvironment()

MaterialKit& HPS::MaterialKit::UnsetEnvironment ( )

Removes all settings applied to the environment channel.

Returns
A reference to this object.

◆ UnsetEverything()

MaterialKit& HPS::MaterialKit::UnsetEverything ( )

Removes all setting from this material.

Returns
A reference to this object.

◆ UnsetGloss()

MaterialKit& HPS::MaterialKit::UnsetGloss ( )

Removes the gloss setting applied to this material.

Returns
A reference to this object.

◆ UnsetMirror()

MaterialKit& HPS::MaterialKit::UnsetMirror ( )

Removes all settings applied to the mirror channel.

Returns
A reference to this object.

◆ UnsetShader()

MaterialKit& HPS::MaterialKit::UnsetShader ( )

Internal use only - customers should not use.

Removes any shader applied to this material.

Returns
A reference to this object.

◆ UnsetSpecular()

MaterialKit& HPS::MaterialKit::UnsetSpecular ( )

Removes all settings applied to the specular channel.

Returns
A reference to this object.

◆ UnsetTransmission()

MaterialKit& HPS::MaterialKit::UnsetTransmission ( )

Removes all settings applied to the transmission channel.

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::MaterialKit::staticType = HPS::Type::MaterialKit
static

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