PixelLightAPI
.
|
Material resource class. More...
#include <Material.h>
Public Member Functions | |
virtual PLRENDERER_API | ~Material () |
Destructor. | |
MaterialManager & | GetMaterialManager () const |
Returns the material manager this material is in. | |
PLRENDERER_API Material & | operator= (const Material &cSource) |
Copy operator. | |
PLRENDERER_API Parameter * | GetParameter (const PLCore::String &sName) const |
Gets a material/effect parameter. | |
PLRENDERER_API TextureBuffer * | GetParameterTextureBuffer (const PLCore::String &sName) const |
Gets a texture buffer. | |
ParameterManager & | GetParameterManager () const |
Returns the parameter manager of the material. | |
PLRENDERER_API bool | ReloadTextures () |
Reloads all textures used direct or indirect by the material. | |
PLCore::uint32 | GetNumOfMaterials () const |
Returns the number of materials. | |
PLRENDERER_API bool | AddMaterial (Material &cMaterial) |
Adds a material. | |
PLRENDERER_API Material * | GetMaterial (PLCore::uint32 nIndex) const |
Returns a material. | |
PLRENDERER_API bool | RemoveMaterial (PLCore::uint32 nIndex) |
Removes a material. | |
PLRENDERER_API bool | RemoveAllMaterials () |
Removes all materials. | |
PLRENDERER_API Effect * | GetEffect () const |
Returns the effect of the material. | |
PLRENDERER_API void | SetEffect (Effect *pFX=nullptr) |
Sets the effect of the material. | |
PLRENDERER_API bool | GetBlend () const |
Returns whether the material should be blend or not. | |
PLRENDERER_API PLCore::uint32 | GetNumOfPasses () const |
Gets the number of render passes the current technique is using. | |
PLRENDERER_API bool | SetupPass (PLCore::uint32 nIndex=0) const |
Setup the given path. | |
virtual PLRENDERER_API bool | LoadByFilename (const PLCore::String &sFilename, const PLCore::String &sParams="", const PLCore::String &sMethod="") override |
Loads the loadable from a file given by filename. | |
virtual PLRENDERER_API bool | Reload () override |
Reloads the loadable. | |
virtual PLRENDERER_API bool | Unload () override |
Unloads the loadable. | |
virtual PLRENDERER_API PLCore::String | GetLoadableTypeName () const override |
Returns the loadable type name. | |
Public Attributes | |
PLCore::Event< Parameter & > | EventParameterChanged |
Static Public Attributes | |
static PLRENDERER_API const PLCore::String | DiffuseMap |
static PLRENDERER_API const PLCore::String | LightMap |
static PLRENDERER_API const PLCore::String | AmbientOcclusionMap |
static PLRENDERER_API const PLCore::String | EmissiveMap |
static PLRENDERER_API const PLCore::String | ReflectionMap |
static PLRENDERER_API const PLCore::String | ReflectivityMap |
static PLRENDERER_API const PLCore::String | NormalMap |
static PLRENDERER_API const PLCore::String | SpecularMap |
static PLRENDERER_API const PLCore::String | HeightMap |
Material resource class.
virtual PLRENDERER_API PLRenderer::Material::~Material | ( | ) | [virtual] |
Destructor.
MaterialManager & PLRenderer::Material::GetMaterialManager | ( | ) | const [inline] |
Returns the material manager this material is in.
Copy operator.
[in] | cSource | Source to copy from |
PLRENDERER_API Parameter* PLRenderer::Material::GetParameter | ( | const PLCore::String & | sName | ) | const |
Gets a material/effect parameter.
[in] | sName | Parameter name |
PLRENDERER_API TextureBuffer* PLRenderer::Material::GetParameterTextureBuffer | ( | const PLCore::String & | sName | ) | const |
Gets a texture buffer.
[in] | sName | Parameter name |
ParameterManager & PLRenderer::Material::GetParameterManager | ( | ) | const [inline] |
Returns the parameter manager of the material.
PLRENDERER_API bool PLRenderer::Material::ReloadTextures | ( | ) |
Reloads all textures used direct or indirect by the material.
PLCore::uint32 PLRenderer::Material::GetNumOfMaterials | ( | ) | const [inline] |
Returns the number of materials.
PLRENDERER_API bool PLRenderer::Material::AddMaterial | ( | Material & | cMaterial | ) |
Adds a material.
[in] | cMaterial | Material to add |
PLRENDERER_API Material* PLRenderer::Material::GetMaterial | ( | PLCore::uint32 | nIndex | ) | const |
Returns a material.
[in] | nIndex | Index of the material to return |
PLRENDERER_API bool PLRenderer::Material::RemoveMaterial | ( | PLCore::uint32 | nIndex | ) |
Removes a material.
[in] | nIndex | Index of the material to remove |
PLRENDERER_API bool PLRenderer::Material::RemoveAllMaterials | ( | ) |
Removes all materials.
PLRENDERER_API Effect* PLRenderer::Material::GetEffect | ( | ) | const |
Returns the effect of the material.
PLRENDERER_API void PLRenderer::Material::SetEffect | ( | Effect * | pFX = nullptr | ) |
Sets the effect of the material.
[in] | pFX | The effect of the material, a null pointer if there's no effect |
PLRENDERER_API bool PLRenderer::Material::GetBlend | ( | ) | const |
Returns whether the material should be blend or not.
PLRENDERER_API PLCore::uint32 PLRenderer::Material::GetNumOfPasses | ( | ) | const |
Gets the number of render passes the current technique is using.
PLRENDERER_API bool PLRenderer::Material::SetupPass | ( | PLCore::uint32 | nIndex = 0 | ) | const |
Setup the given path.
[in] | nIndex | Index of the path to setup |
virtual PLRENDERER_API bool PLRenderer::Material::LoadByFilename | ( | const PLCore::String & | sFilename, |
const PLCore::String & | sParams = "" , |
||
const PLCore::String & | sMethod = "" |
||
) | [override, virtual] |
Loads the loadable from a file given by filename.
[in] | sFilename | Loadable filename |
[in] | sParams | Optional load method parameters, can be an empty string |
[in] | sMethod | Optional name of the load method to use, can be an empty string |
Reimplemented from PLCore::Loadable.
virtual PLRENDERER_API bool PLRenderer::Material::Reload | ( | ) | [override, virtual] |
Reloads the loadable.
Reimplemented from PLCore::Loadable.
virtual PLRENDERER_API bool PLRenderer::Material::Unload | ( | ) | [override, virtual] |
Unloads the loadable.
Reimplemented from PLCore::Loadable.
virtual PLRENDERER_API PLCore::String PLRenderer::Material::GetLoadableTypeName | ( | ) | const [override, virtual] |
PLRENDERER_API const PLCore::String PLRenderer::Material::DiffuseMap [static] |
'DiffuseMap' string (other usual name: 'decal map')
PLRENDERER_API const PLCore::String PLRenderer::Material::LightMap [static] |
'LightMap' string (global ambient lighting)
PLRENDERER_API const PLCore::String PLRenderer::Material::AmbientOcclusionMap [static] |
'AmbientOcclusionMap' string (global ambient occlusion)
PLRENDERER_API const PLCore::String PLRenderer::Material::EmissiveMap [static] |
'EmissiveMap' string (other usual name: 'self illumination map')
PLRENDERER_API const PLCore::String PLRenderer::Material::ReflectionMap [static] |
'ReflectionMap' string (other usual name: 'environment map')
PLRENDERER_API const PLCore::String PLRenderer::Material::ReflectivityMap [static] |
'ReflectivityMap' string
PLRENDERER_API const PLCore::String PLRenderer::Material::NormalMap [static] |
'NormalMap' string
PLRENDERER_API const PLCore::String PLRenderer::Material::SpecularMap [static] |
'SpecularMap' string
PLRENDERER_API const PLCore::String PLRenderer::Material::HeightMap [static] |
'HeightMap' string (other usual name: 'bump map')
Parameter changed (created, destroyed, value changed) event, changed parameter as parameter
|