VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
venom::common::MaterialComponent Class Reference

MaterialComponent Contains all the data of a material component. More...

#include <MaterialComponent.h>

Public Types

typedef std::variant< vcm::Vec3, vcm::Vec4, float > ComponentValue
 

Public Member Functions

 MaterialComponent (const MaterialComponentType type)
 
 MaterialComponent (const MaterialComponent &other)
 
 MaterialComponent (MaterialComponent &&other) noexcept
 
MaterialComponentoperator= (const MaterialComponent &other)
 
MaterialComponentoperator= (MaterialComponent &&other) noexcept
 
void SetValue (const vcm::Vec3 &value)
 Sets Material component value.
 
void SetValue (const vcm::Vec4 &value)
 Sets Material component value.
 
void SetValue (const float value)
 Sets Material component value.
 
void RemoveValue ()
 Removes the value of the material component.
 
void SetTexture (const Texture &texture)
 Sets Material component value.
 
void RemoveTexture ()
 Removes the texture value of the material component.
 
const TextureGetTexture () const
 Gets the texture value of the material component.
 
const vcm::Vec4 & GetColor4D () const
 Gets the color value of the material component.
 
const vcm::Vec3 & GetColor3D () const
 Gets the color value of the material component.
 
float GetFloatValue () const
 Gets the value of the material component.
 
ComponentValue & GetValueRef ()
 
const ComponentValue & GetValueRef () const
 
void SetChannels (const MaterialComponentValueChannels channels)
 
void SetChannelsFromIndex (const int index)
 
bool HasTexture () const
 
int GetValueType () const
 
int & GetValueTypeRef ()
 
MaterialComponentValueChannels GetChannels () const
 
MaterialComponentValueChannels & GetChannelsRef ()
 

Static Public Member Functions

static constexpr vc::Array< const char *, 9 > GetChannelsViews ()
 
static MaterialComponentValueChannels GetComponentValueChannelsFromIndex (const int index)
 

Detailed Description

MaterialComponent Contains all the data of a material component.

Member Function Documentation

◆ GetColor3D()

const vcm::Vec3 & venom::common::MaterialComponent::GetColor3D ( ) const
inline

Gets the color value of the material component.

Returns
Vec3

◆ GetColor4D()

const vcm::Vec4 & venom::common::MaterialComponent::GetColor4D ( ) const
inline

Gets the color value of the material component.

Returns
Vec4

◆ GetFloatValue()

float venom::common::MaterialComponent::GetFloatValue ( ) const
inline

Gets the value of the material component.

Returns
float

◆ GetTexture()

const Texture * venom::common::MaterialComponent::GetTexture ( ) const
inline

Gets the texture value of the material component.

Returns
Texture

◆ SetTexture()

void venom::common::MaterialComponent::SetTexture ( const Texture & texture)
inline

Sets Material component value.

Parameters
valuecan be a color3D/4D, a value or a texture

◆ SetValue() [1/3]

void venom::common::MaterialComponent::SetValue ( const float value)
inline

Sets Material component value.

Parameters
valuecan be a color3D/4D, a value or a texture

◆ SetValue() [2/3]

void venom::common::MaterialComponent::SetValue ( const vcm::Vec3 & value)
inline

Sets Material component value.

Parameters
valuecan be a color3D/4D, a value or a texture

◆ SetValue() [3/3]

void venom::common::MaterialComponent::SetValue ( const vcm::Vec4 & value)
inline

Sets Material component value.

Parameters
valuecan be a color3D/4D, a value or a texture

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