CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MaterialProperty< ValueType, TextureType > Struct Template Reference

A material property with an associated value and texture. More...

#include <CeresEngine/Material/MaterialModel.hpp>

Inheritance diagram for CeresEngine::MaterialProperty< ValueType, TextureType >:
CeresEngine::RendererMaterialPBR::Property< Color > CeresEngine::RendererMaterialPBR::Property< double > CeresEngine::RendererMaterialPBR::Property< Vector3 >

Public Member Functions

 MaterialProperty ()=default
 Creates a new empty material property.
 
 MaterialProperty (ValueType value)
 Creates a new material property from a raw value and no texture.
 
 MaterialProperty (TextureType texture, MaterialPropertySwizzle< ValueType > swizzle={})
 Creates a new material property from an texture value and no raw value.
 
 MaterialProperty (ValueType value, TextureType texture, MaterialPropertySwizzle< ValueType > swizzle={})
 Creates a new material property from both a raw value and an texture.
 
 MaterialProperty (const MaterialProperty &)=default
 
MaterialPropertyoperator= (const MaterialProperty &)=default
 
 MaterialProperty (MaterialProperty &&) noexcept=default
 
MaterialPropertyoperator= (MaterialProperty &&) noexcept=default
 

Public Attributes

ValueType value = ValueType(0)
 The value associated with the material property.
 
TextureType texture = nullptr
 The texture associated with the material property.
 
GPUSamplerDescriptor sampler
 A descriptor that describes how material sampling should be done.
 
MaterialPropertySwizzle< ValueType > swizzle = {}
 A property that allows mixing channels in a material property.
 

Detailed Description

template<typename ValueType, typename TextureType = HTexture>
struct CeresEngine::MaterialProperty< ValueType, TextureType >

A material property with an associated value and texture.

Constructor & Destructor Documentation

◆ MaterialProperty() [1/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( )
default

Creates a new empty material property.

◆ MaterialProperty() [2/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( ValueType  value)
inline

Creates a new material property from a raw value and no texture.

◆ MaterialProperty() [3/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( TextureType  texture,
MaterialPropertySwizzle< ValueType >  swizzle = {} 
)
inline

Creates a new material property from an texture value and no raw value.

◆ MaterialProperty() [4/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( ValueType  value,
TextureType  texture,
MaterialPropertySwizzle< ValueType >  swizzle = {} 
)
inlineexplicit

Creates a new material property from both a raw value and an texture.

◆ MaterialProperty() [5/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( const MaterialProperty< ValueType, TextureType > &  )
default

◆ MaterialProperty() [6/6]

template<typename ValueType , typename TextureType = HTexture>
CeresEngine::MaterialProperty< ValueType, TextureType >::MaterialProperty ( MaterialProperty< ValueType, TextureType > &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<typename ValueType , typename TextureType = HTexture>
MaterialProperty & CeresEngine::MaterialProperty< ValueType, TextureType >::operator= ( const MaterialProperty< ValueType, TextureType > &  )
default

◆ operator=() [2/2]

template<typename ValueType , typename TextureType = HTexture>
MaterialProperty & CeresEngine::MaterialProperty< ValueType, TextureType >::operator= ( MaterialProperty< ValueType, TextureType > &&  )
defaultnoexcept

Member Data Documentation

◆ sampler

template<typename ValueType , typename TextureType = HTexture>
GPUSamplerDescriptor CeresEngine::MaterialProperty< ValueType, TextureType >::sampler
Initial value:
{
.mipMapFilter = GPUSamplerFilter::Linear,
.mipMapping = true,
}
@ Linear
Interpolate between multiple image samples.

A descriptor that describes how material sampling should be done.

◆ swizzle

template<typename ValueType , typename TextureType = HTexture>
MaterialPropertySwizzle<ValueType> CeresEngine::MaterialProperty< ValueType, TextureType >::swizzle = {}

A property that allows mixing channels in a material property.

◆ texture

template<typename ValueType , typename TextureType = HTexture>
TextureType CeresEngine::MaterialProperty< ValueType, TextureType >::texture = nullptr

The texture associated with the material property.

◆ value

template<typename ValueType , typename TextureType = HTexture>
ValueType CeresEngine::MaterialProperty< ValueType, TextureType >::value = ValueType(0)

The value associated with the material property.


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