Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
castor3d::Material Class Reference

#include <Material.hpp>

Inheritance diagram for castor3d::Material:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Material:
Collaboration graph
[legend]

Public Member Functions

C3D_API Material (castor::String const &name, Engine &engine, LightingModelID lightingModelId)
 Constructor.
 
virtual C3D_API ~Material ()=default
 
C3D_API void initialise ()
 
C3D_API void cleanup ()
 
C3D_API PassRPtr createPass (LightingModelID lightingModelId)
 Creates a pass.
 
C3D_API PassRPtr createPass ()
 Creates a pass.
 
C3D_API void addPass (Pass const &pass)
 Adds a pass, cloning the given one.
 
C3D_API void removePass (Pass const &pass)
 Removes an external pass to rhe material.
 
C3D_API PassRPtr getPass (uint32_t index) const
 Retrieves a pass and returns it.
 
C3D_API void destroyPass (uint32_t index)
 Destroys the pass at the given index.
 
C3D_API bool hasAlphaBlending () const
 
C3D_API bool hasEnvironmentMapping () const
 
C3D_API bool hasSubsurfaceScattering () const
 
LightingModelID getLightingModelId () const noexcept
 
uint32_t getPassCount () const
 
RenderPassRegisterInfogetRenderPassInfo () const noexcept
 
bool isSerialisable () const noexcept
 
bool isInitialised () const noexcept
 
PassPtrArrayConstIt begin () const
 
PassPtrArrayIt begin ()
 
PassPtrArrayConstIt end () const
 
PassPtrArrayIt end ()
 
void setRenderPassInfo (RenderPassRegisterInfo *renderPassInfo) noexcept
 
void setSerialisable (bool v) noexcept
 
- Public Member Functions inherited from castor::NamedBaseT< T >
 NamedBaseT (T name) noexcept
 Constructor.
 
T const & getName () const noexcept
 Retrieves the name.
 
void rename (T name) noexcept
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Static Public Member Functions

static C3D_API void addParsers (castor::AttributeParsers &result, castor::UInt32StrMap const &textureChannels)
 

Public Attributes

OnMaterialChanged onChanged
 

Static Public Attributes

static const castor::String DefaultMaterialName
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 
- Protected Attributes inherited from castor::NamedBaseT< T >
m_name
 

Constructor & Destructor Documentation

◆ Material()

C3D_API castor3d::Material::Material ( castor::String const & name,
Engine & engine,
LightingModelID lightingModelId )

Constructor.

Parameters
[in]nameThe material name.
[in]engineThe core engine.
[in]lightingModelIdThe material's lighting model ID.

◆ ~Material()

virtual C3D_API castor3d::Material::~Material ( )
virtualdefault

Member Function Documentation

◆ addParsers()

static C3D_API void castor3d::Material::addParsers ( castor::AttributeParsers & result,
castor::UInt32StrMap const & textureChannels )
static

name Getters.

◆ addPass()

C3D_API void castor3d::Material::addPass ( Pass const & pass)

Adds a pass, cloning the given one.

◆ begin() [1/2]

PassPtrArrayIt castor3d::Material::begin ( )
inline

◆ begin() [2/2]

PassPtrArrayConstIt castor3d::Material::begin ( ) const
inline

name Passes iteration.

◆ cleanup()

C3D_API void castor3d::Material::cleanup ( )

◆ createPass() [1/2]

C3D_API PassRPtr castor3d::Material::createPass ( )

Creates a pass.

Returns
The created pass.

◆ createPass() [2/2]

C3D_API PassRPtr castor3d::Material::createPass ( LightingModelID lightingModelId)

Creates a pass.

Parameters
[in]lightingModelIdThe pass' lighting model ID.
Returns
The created pass.

◆ destroyPass()

C3D_API void castor3d::Material::destroyPass ( uint32_t index)

Destroys the pass at the given index.

Parameters
[in]indexThe pass index.

◆ end() [1/2]

PassPtrArrayIt castor3d::Material::end ( )
inline

◆ end() [2/2]

PassPtrArrayConstIt castor3d::Material::end ( ) const
inline

◆ getLightingModelId()

LightingModelID castor3d::Material::getLightingModelId ( ) const
inlinenoexcept

◆ getPass()

C3D_API PassRPtr castor3d::Material::getPass ( uint32_t index) const

Retrieves a pass and returns it.

Parameters
[in]indexThe index of the wanted pass.
Returns
The retrieved pass or nullptr if not found.

Referenced by castor3d::ControlStyle::doCreateMaterial().

Here is the caller graph for this function:

◆ getPassCount()

uint32_t castor3d::Material::getPassCount ( ) const
inline

◆ getRenderPassInfo()

RenderPassRegisterInfo * castor3d::Material::getRenderPassInfo ( ) const
inlinenoexcept

◆ hasAlphaBlending()

C3D_API bool castor3d::Material::hasAlphaBlending ( ) const

name Getters.

◆ hasEnvironmentMapping()

C3D_API bool castor3d::Material::hasEnvironmentMapping ( ) const

◆ hasSubsurfaceScattering()

C3D_API bool castor3d::Material::hasSubsurfaceScattering ( ) const

◆ initialise()

C3D_API void castor3d::Material::initialise ( )

◆ isInitialised()

bool castor3d::Material::isInitialised ( ) const
inlinenoexcept

◆ isSerialisable()

bool castor3d::Material::isSerialisable ( ) const
inlinenoexcept

◆ removePass()

C3D_API void castor3d::Material::removePass ( Pass const & pass)

Removes an external pass to rhe material.

Parameters
[in]passThe pass.

◆ setRenderPassInfo()

void castor3d::Material::setRenderPassInfo ( RenderPassRegisterInfo * renderPassInfo)
inlinenoexcept

name Mutators.

◆ setSerialisable()

void castor3d::Material::setSerialisable ( bool v)
inlinenoexcept

Member Data Documentation

◆ DefaultMaterialName

const castor::String castor3d::Material::DefaultMaterialName
static

The default material name.

◆ onChanged

OnMaterialChanged castor3d::Material::onChanged

The signal raised when the material has changed.


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