CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MaterialPropertySwizzle< ValueType > Struct Template Referencefinal

A structure that describes how channels of the input texture should be mapped in the material. More...

#include <CeresEngine/Material/MaterialModel.hpp>

Public Types

using RawType = TVector4< ValueType >
 The raw type used to perform the swizzle.
 

Public Member Functions

constexpr MaterialPropertySwizzle ()=default
 Creates a new empty material property swizzle.
 
constexpr MaterialPropertySwizzle (RawType swizzle)
 Creates a new material property swizzle from a swizzle vector.
 
constexpr MaterialPropertySwizzle (ValueType r, ValueType g, ValueType b, ValueType a)
 Creates a new material property swizzle from a swizzle vector components.
 
 operator RawType () const noexcept
 Converts the swizzle object into it's underlying representation.
 

Public Attributes

RawType raw = {ValueType(1), ValueType(0), ValueType(0), ValueType(0)}
 The vector that represents the swizzle operation.
 

Detailed Description

template<typename ValueType>
struct CeresEngine::MaterialPropertySwizzle< ValueType >

A structure that describes how channels of the input texture should be mapped in the material.

Template Parameters
ValueTypeThe type of value that should be read from the texture.

Member Typedef Documentation

◆ RawType

template<typename ValueType >
using CeresEngine::MaterialPropertySwizzle< ValueType >::RawType = TVector4<ValueType>

The raw type used to perform the swizzle.

Constructor & Destructor Documentation

◆ MaterialPropertySwizzle() [1/3]

template<typename ValueType >
constexpr CeresEngine::MaterialPropertySwizzle< ValueType >::MaterialPropertySwizzle ( )
constexprdefault

Creates a new empty material property swizzle.

◆ MaterialPropertySwizzle() [2/3]

template<typename ValueType >
constexpr CeresEngine::MaterialPropertySwizzle< ValueType >::MaterialPropertySwizzle ( RawType  swizzle)
inlineconstexpr

Creates a new material property swizzle from a swizzle vector.

◆ MaterialPropertySwizzle() [3/3]

template<typename ValueType >
constexpr CeresEngine::MaterialPropertySwizzle< ValueType >::MaterialPropertySwizzle ( ValueType  r,
ValueType  g,
ValueType  b,
ValueType  a 
)
inlineconstexpr

Creates a new material property swizzle from a swizzle vector components.

Member Function Documentation

◆ operator RawType()

template<typename ValueType >
CeresEngine::MaterialPropertySwizzle< ValueType >::operator RawType ( ) const
inlineexplicitnoexcept

Converts the swizzle object into it's underlying representation.

Member Data Documentation

◆ raw

template<typename ValueType >
RawType CeresEngine::MaterialPropertySwizzle< ValueType >::raw = {ValueType(1), ValueType(0), ValueType(0), ValueType(0)}

The vector that represents the swizzle operation.


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