|
BlankMat 0.1.0
Free open-source 3D texture creation application
|
Class that stores all texture and render information for a material. More...


Public Member Functions | |
| bool | IsInternal () |
| Returns whether the material is for internal use only or not. | |
| unsigned int | UpdateShader (Shader *shader) |
| Updates the given shader with this material's properties. | |
| void | LoadShaderTextures (State *state, Material *defaultMat) |
| Loads the textures of this material into the OpenGL context. | |
| void | LoadMaterialTextures (TextureContainer *textures) |
| Loads the textures of the material from the scene's texture list. | |
| Material (TextureContainer *textures) | |
| Constructs the default material. | |
| Material (const std::string &name, const std::string &scope, TextureContainer *textures, const glm::vec3 &color=glm::vec3(1.0f), bool internal=false) | |
| Constructs a material out of a single color (diffuse) | |
| Material (const std::string &name, const std::string &scope, Config *config, Texture *map_kd, Texture *map_ka, Texture *map_ks, Texture *map_bump, Texture *map_ns, Texture *map_d) | |
| Constructs a material out of a config file and preloaded textures. | |
| Material (const std::string &name, const std::string &scope, Texture *map_kd, Texture *map_ka, Texture *map_ks, Texture *map_bump, Texture *map_ns, Texture *map_d, const glm::vec3 &ka=glm::vec3(), const glm::vec3 &kd=glm::vec3(), const glm::vec3 &ks=glm::vec3(), float ns=0, float ni=1, float d=1, const glm::vec3 &ke=glm::vec3(), int illum=2) | |
| Constructs a material out of preloaded textures. | |
| Material (const std::string &name, const std::string &scope, const std::vector< Texture * > &map_kd, const std::vector< Texture * > &map_ka, const std::vector< Texture * > &map_ks, const std::vector< Texture * > &map_bump, const std::vector< Texture * > &map_ns, const std::vector< Texture * > &map_d, const glm::vec3 &ka=glm::vec3(), const glm::vec3 &kd=glm::vec3(), const glm::vec3 &ks=glm::vec3(), float ns=0, float ni=1, float d=1, const glm::vec3 &ke=glm::vec3(), int illum=2) | |
| Constructs a material out of lists of preloaded textures. | |
| Material (const std::string &name, const std::string &scope, const std::string &map_kd, const std::string &map_ka, const std::string &map_ks, const std::string &map_bump, const std::string &map_ns, const std::string &map_d, const glm::vec3 &ka=glm::vec3(), const glm::vec3 &kd=glm::vec3(), const glm::vec3 &ks=glm::vec3(), float ns=0, float ni=1, float d=1, const glm::vec3 &ke=glm::vec3(), int illum=2) | |
| Constructs a material out of unloaded texture names. | |
Public Member Functions inherited from ISelectable | |
| virtual SelectableType | GetSelectableType () |
| Returns the type of the selectable. | |
| ISelectable (SelectableType type=SelectableType::NONE) | |
| Sets the type of the selectable. | |
Public Member Functions inherited from INameable | |
| virtual void | Rename (const std::string &newName, bool includeScope=true) |
| Renames the object, setting the scope to be the scoped part of the name. | |
| virtual void | SetName (const std::string &name) |
| Sets the name of the object. Note: Does not set the scope variable. If renaming based on raw input, use Rename() instead to set the scope. | |
| virtual void | SetScope (const std::string &scope) |
| Sets the scope of the object. | |
| std::string | GetUnscopedName () |
| Returns the unscoped name of the object. | |
| std::string | GetScope () |
| Returns the scope of the object. | |
| std::string | GetScopedName () |
| Returns the scoped name of the object. | |
| void | InitName (const std::string &name, const std::string &scope="") |
| Initializes the nameable object with the given name and scope. | |
| INameable () | |
| Creates a default nameable object without name or scope. | |
Public Attributes | |
| glm::vec3 | mKA |
| Ambient color. | |
| glm::vec3 | mKD |
| Diffuse color. | |
| glm::vec3 | mKS |
| Specular color. | |
| glm::vec3 | mKE |
| Emissive color. | |
| float | mNS |
| Specular exponent. | |
| float | mNI |
| Index of Refraction. | |
| float | mD |
| Dissolve, AKA. transparency. | |
| int | mIllum |
| Illumination mode. | |
| Texture * | mMapKD |
| Diffuse color texture. | |
| Texture * | mMapKA |
| Ambient color texture. | |
| Texture * | mMapKS |
| Specular color texture. | |
| Texture * | mMapBump |
| Bump/Normal texture. | |
| Texture * | mMapNS |
| Specular highlight texture. | |
| Texture * | mMapD |
| Alpha (dissolve) texture. | |
Protected Attributes | |
| glm::vec3 | mCurKD = glm::vec3(1.0f) |
| glm::vec3 | mCurKA = glm::vec3(0.0f) |
| glm::vec3 | mCurKS = glm::vec3(1.0f) |
| glm::vec3 | mCurKE = glm::vec3(0.0f) |
| bool | mShadowsEnabled = true |
| bool | mIsInternal = false |
| std::vector< Texture * > | mCurTextures |
| std::vector< std::string > | mCurTextureNames |
| std::string | mTargetMapKD = "default_diffuse" |
| std::string | mTargetMapKA = "default_ambient" |
| std::string | mTargetMapKS = "default_specular" |
| std::string | mTargetMapBump = "default_normal" |
| std::string | mTargetMapNS = "default_height" |
| std::string | mTargetMapD = "default_alpha" |
| std::vector< Texture * > | mTextures |
| List of textures that are part of this material. | |
Protected Attributes inherited from ISelectable | |
| SelectableType | mSelectableType = SelectableType::NONE |
| Type of the selectable. | |
Protected Attributes inherited from INameable | |
| std::string | mName = "" |
| Name of the object. | |
| std::string | mScope = "" |
| Scope of the object. | |
Class that stores all texture and render information for a material.
|
explicit |
Constructs the default material.
| textures | Texture container for the scene |
|
explicit |
Constructs a material out of a single color (diffuse)
| name | Name of the material |
| scope | Scope of the material |
| textures | Texture container for the scene |
| color | Diffuse color of the material |
| internal | Whether the material is for internal use only |
|
explicit |
Constructs a material out of a config file and preloaded textures.
| name | Name of the material |
| scope | Scope of the material |
| config | Config to build material from |
| map_kd | Diffuse texture |
| map_ka | Ambient texture |
| map_ks | Specular texture |
| map_bump | Normal/Bump texture |
| map_ns | Specular highlight/Height texture |
| map_d | Alpha texture |
|
explicit |
Constructs a material out of preloaded textures.
| name | Name of the material |
| scope | Scope of the material |
| map_kd | Diffuse texture |
| map_ka | Ambient texture |
| map_ks | Specular texture |
| map_bump | Normal/Bump texture |
| map_ns | Specular highlight/Height texture |
| map_d | Alpha texture |
| ka | Alpha color |
| kd | Diffuse color |
| ks | Specular color |
| ns | Specular exponent |
| ni | Index of refraction |
| d | Alpha |
| ke | Emissive color |
| illum | Illumination mode |
|
explicit |
Constructs a material out of lists of preloaded textures.
| name | Name of the material |
| scope | Scope of the material |
| map_kd | Diffuse textures |
| map_ka | Ambient textures |
| map_ks | Specular textures |
| map_bump | Normal/Bump textures |
| map_ns | Specular highlight/Height textures |
| map_d | Alpha textures |
| ka | Alpha color |
| kd | Diffuse color |
| ks | Specular color |
| ns | Specular exponent |
| ni | Index of refraction |
| d | Alpha |
| ke | Emissive color |
| illum | Illumination mode |
|
explicit |
Constructs a material out of unloaded texture names.
| name | Name of the material |
| scope | Scope of the material |
| map_kd | Diffuse texture |
| map_ka | Ambient texture |
| map_ks | Specular texture |
| map_bump | Normal/Bump texture |
| map_ns | Specular highlight/Height texture |
| map_d | Alpha texture |
| ka | Alpha color |
| kd | Diffuse color |
| ks | Specular color |
| ns | Specular exponent |
| ni | Index of refraction |
| d | Alpha |
| ke | Emissive color |
| illum | Illumination mode |
| bool Material::IsInternal | ( | ) |
Returns whether the material is for internal use only or not.
| void Material::LoadMaterialTextures | ( | TextureContainer * | textures | ) |
Loads the textures of the material from the scene's texture list.
| textures | Texture container for the scene |
Loads the textures of this material into the OpenGL context.
| state | Global state of the application |
| defaultMat | Default material |
| unsigned int Material::UpdateShader | ( | Shader * | shader | ) |
Updates the given shader with this material's properties.
| shader | Shader to use for this material |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| float Material::mD |
Dissolve, AKA. transparency.
| int Material::mIllum |
Illumination mode.
|
protected |
| glm::vec3 Material::mKA |
Ambient color.
| glm::vec3 Material::mKD |
Diffuse color.
| glm::vec3 Material::mKE |
Emissive color.
| glm::vec3 Material::mKS |
Specular color.
| Texture* Material::mMapBump |
Bump/Normal texture.
| Texture* Material::mMapD |
Alpha (dissolve) texture.
| Texture* Material::mMapKA |
Ambient color texture.
| Texture* Material::mMapKD |
Diffuse color texture.
| Texture* Material::mMapKS |
Specular color texture.
| Texture* Material::mMapNS |
Specular highlight texture.
| float Material::mNI |
Index of Refraction.
| float Material::mNS |
Specular exponent.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
List of textures that are part of this material.