Visual Computing Library  devel
Loading...
Searching...
No Matches
vcl::comp::MaterialIndex< ParentElemType, OPT > Class Template Reference
Inheritance diagram for vcl::comp::MaterialIndex< ParentElemType, OPT >:

Public Member Functions

 MaterialIndex ()
 Constructor that initializes the material index to UINT_NULL.
 
uintmaterialIndex ()
 Returns a reference to the material index.
 
uint materialIndex () const
 Returns the value of the material index.
 

Protected Member Functions

void deserialize (std::istream &is)
 
template<typename Element >
void importFrom (const Element &e, bool=true)
 Returns a reference to the material index.
 
void serialize (std::ostream &os) const
 

Private Types

using Base = Component< MaterialIndex< ParentElemType, OPT >, CompId::MATERIAL_INDEX, uint, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT >
 

Private Member Functions

void init ()
 Initializes the material index to UINT_NULL.
 

Member Function Documentation

◆ importFrom()

template<typename ParentElemType , bool OPT>
template<typename Element >
void vcl::comp::MaterialIndex< ParentElemType, OPT >::importFrom ( const Element e,
bool  = true 
)
protected

Returns a reference to the material index.

Same as materialIndex(). Left for compatibility reasons.

Returns
a reference to the material index.

Returns the value of the material index.

Same as materialIndex(). Left for compatibility reasons.

Returns
the value of the material index.

◆ init()

template<typename ParentElemType = void, bool OPT = false>
void vcl::comp::MaterialIndex< ParentElemType, OPT >::init ( )
inlineprivate

Initializes the material index to UINT_NULL.

It is made in the init function since the component could be not available during construction (e.g. if the component is optional and not enabled).

This member function is hidden by the element that inherits this class.

◆ materialIndex() [1/2]

template<typename ParentElemType = void, bool OPT = false>
uint & vcl::comp::MaterialIndex< ParentElemType, OPT >::materialIndex ( )
inline

Returns a reference to the material index.

Returns
a reference to the material index.

◆ materialIndex() [2/2]

template<typename ParentElemType = void, bool OPT = false>
uint vcl::comp::MaterialIndex< ParentElemType, OPT >::materialIndex ( ) const
inline

Returns the value of the material index.

Returns
the value of the material index.

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