Castor3D  ..
Classes | Public Member Functions | Static Public Attributes | List of all members
Castor3D::Material Class Reference

Definition of a material. More...

+ Inheritance diagram for Castor3D::Material:
+ Collaboration diagram for Castor3D::Material:

Classes

class  BinaryParser
 Viewport loader. More...
 
class  TextLoader
 Material loader. More...
 

Public Member Functions

C3D_API Material (Castor::String const &p_name, Engine &p_engine)
 Constructor. More...
 
virtual C3D_API ~Material ()
 Destructor. More...
 
C3D_API void Initialise ()
 Initialises the material and all it's passes. More...
 
C3D_API void Cleanup ()
 Flushes passes. More...
 
C3D_API PassSPtr CreatePass ()
 Creates a pass. More...
 
C3D_API const PassSPtr GetPass (uint32_t p_index) const
 Retrieves a pass and returns it. More...
 
C3D_API PassSPtr GetPass (uint32_t p_index)
 Retrieves a pass and returns it. More...
 
C3D_API void DestroyPass (uint32_t p_index)
 Destroys the pass at the given index. More...
 
C3D_API bool HasAlphaBlending () const
 
uint32_t GetPassCount () const
 Retrieves the passes count. More...
 
PassPtrArrayConstIt begin () const
 Retrieves a constant iterator on the beginning of the passes array. More...
 
PassPtrArrayIt begin ()
 Retrieves an iterator on the beginning of the passes array. More...
 
PassPtrArrayConstIt end () const
 Retrieves a constant iterator on the end of the passes array. More...
 
PassPtrArrayIt end ()
 Retrieves an iterator on the end of the passes array. More...
 

Static Public Attributes

static const Castor::String DefaultMaterialName
 The default material name. More...
 

Detailed Description

Definition of a material.

Author
Sylvain DOREMUS
Version
0.1
Date
09/02/2010
Remarks
A material is composed of one or more passes.

Constructor & Destructor Documentation

◆ Material()

C3D_API Castor3D::Material::Material ( Castor::String const &  p_name,
Engine p_engine 
)

Constructor.

Parameters
[in]p_nameThe material name
[in]p_engineThe core engine

◆ ~Material()

virtual C3D_API Castor3D::Material::~Material ( )
virtual

Destructor.

Member Function Documentation

◆ begin() [1/2]

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

Retrieves a constant iterator on the beginning of the passes array.

Returns
The iterator

◆ begin() [2/2]

PassPtrArrayIt Castor3D::Material::begin ( )
inline

Retrieves an iterator on the beginning of the passes array.

Returns
The iterator

◆ Cleanup()

C3D_API void Castor3D::Material::Cleanup ( )

Flushes passes.

◆ CreatePass()

C3D_API PassSPtr Castor3D::Material::CreatePass ( )

Creates a pass.

Returns
The created pass

◆ DestroyPass()

C3D_API void Castor3D::Material::DestroyPass ( uint32_t  p_index)

Destroys the pass at the given index.

Parameters
[in]p_indexThe pass index

◆ end() [1/2]

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

Retrieves a constant iterator on the end of the passes array.

Returns
The iterator

◆ end() [2/2]

PassPtrArrayIt Castor3D::Material::end ( )
inline

Retrieves an iterator on the end of the passes array.

Returns
The iterator

◆ GetPass() [1/2]

C3D_API const PassSPtr Castor3D::Material::GetPass ( uint32_t  p_index) const

Retrieves a pass and returns it.

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

◆ GetPass() [2/2]

C3D_API PassSPtr Castor3D::Material::GetPass ( uint32_t  p_index)

Retrieves a pass and returns it.

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

◆ GetPassCount()

uint32_t Castor3D::Material::GetPassCount ( ) const
inline

Retrieves the passes count.

Returns
The count

◆ HasAlphaBlending()

C3D_API bool Castor3D::Material::HasAlphaBlending ( ) const
Returns
true if all passes needs alpha blending

◆ Initialise()

C3D_API void Castor3D::Material::Initialise ( )

Initialises the material and all it's passes.

Member Data Documentation

◆ DefaultMaterialName

const Castor::String Castor3D::Material::DefaultMaterialName
static

The default material name.


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