CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RenderableComponent::Accessor Struct Reference

A class that describes access to a RenderableComponent. More...

#include <CeresEngine/Scene/Renderable.hpp>

Inheritance diagram for CeresEngine::RenderableComponent::Accessor:
CeresEngine::Component< T >::Accessor

Public Member Functions

const HMeshgetMesh () const
 The mesh to render the component with.
 
void setMesh (HMesh mesh)
 The mesh to render the component with.
 
const RenderableMaterialVectorgetMaterials () const
 The material to render the component with. One material per sub mesh.
 
void setMaterials (RenderableMaterialVector materials)
 The material to render the component with. One material per sub mesh.
 
const HMaterialgetMaterial (UInt32 index) const
 The material to render the component with. One material per sub mesh.
 
void setMaterial (UInt32 index, HMaterial material)
 The material to render the component with. One material per sub mesh.
 
void setMaterial (HMaterial material)
 The material to render the component with. One material per sub mesh.
 
const RendererRenderableSettingsgetRendererSettings () const
 A set of settings that should be used by renderer when rendering the renderable.
 
void setRendererSettings (const RendererRenderableSettings &rendererSettings)
 A set of settings that should be used by renderer when rendering the renderable.
 
template<CInvocable< RendererRenderableSettings & > Func>
decltype(autoupdateRendererSettings (Func &&func) noexcept
 A set of settings that should be used by renderer when rendering the renderable.
 
- Public Member Functions inherited from CeresEngine::Component< T >::Accessor
 Accessor (const Entity &entity)
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Additional Inherited Members

- Public Attributes inherited from CeresEngine::Component< T >::Accessor
const Entityentity
 
- Protected Types inherited from CeresEngine::Component< T >::Accessor
using C = TC
 
- Protected Member Functions inherited from CeresEngine::Component< T >::Accessor
template<typename T >
auto mutate (T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename MutatorFunc , typename T >
requires (CInvocable<MutatorFunc, T&>)
decltype(automutate (MutatorFunc &&func, T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > mutate (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs)
 TODO Write docs.
 
template<typename MutatorFunc , typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > mutate (MutatorFunc &&func, T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptr)
 
template<typename T >
auto get (T C::*ptr)
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< ComponentFieldMutator< T1, C >, ComponentFieldMutator< T2, C >, ComponentFieldMutator< Ts, C >... > get (T1 C::*ptr1, T2 C::*ptr2, Ts C::*... ptrs)
 Accesses an element from an existing Component.
 
template<typename T >
const Tread (const T C::*ptr) const
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< const T1 &, const T2 &, const Ts &... > read (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const
 TODO Write docs.
 
template<typename T >
const Tget (const T C::*ptr) const
 Accesses an element from an existing Component.
 
template<typename T1 , typename T2 , typename... Ts>
Tuple< const T1 &, const T2 &, const Ts &... > get (const T1 C::*ptr1, const T2 C::*ptr2, const Ts C::*... ptrs) const
 Accesses an element from an existing Component.
 

Detailed Description

A class that describes access to a RenderableComponent.

Member Function Documentation

◆ getMaterial()

const HMaterial & CeresEngine::RenderableComponent::Accessor::getMaterial ( UInt32  index) const

The material to render the component with. One material per sub mesh.

◆ getMaterials()

const RenderableMaterialVector & CeresEngine::RenderableComponent::Accessor::getMaterials ( ) const

The material to render the component with. One material per sub mesh.

◆ getMesh()

const HMesh & CeresEngine::RenderableComponent::Accessor::getMesh ( ) const

The mesh to render the component with.

◆ getRendererSettings()

const RendererRenderableSettings & CeresEngine::RenderableComponent::Accessor::getRendererSettings ( ) const

A set of settings that should be used by renderer when rendering the renderable.

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::RenderableComponent::Accessor::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

◆ setMaterial() [1/2]

void CeresEngine::RenderableComponent::Accessor::setMaterial ( HMaterial  material)

The material to render the component with. One material per sub mesh.

◆ setMaterial() [2/2]

void CeresEngine::RenderableComponent::Accessor::setMaterial ( UInt32  index,
HMaterial  material 
)

The material to render the component with. One material per sub mesh.

◆ setMaterials()

void CeresEngine::RenderableComponent::Accessor::setMaterials ( RenderableMaterialVector  materials)

The material to render the component with. One material per sub mesh.

◆ setMesh()

void CeresEngine::RenderableComponent::Accessor::setMesh ( HMesh  mesh)

The mesh to render the component with.

◆ setRendererSettings()

void CeresEngine::RenderableComponent::Accessor::setRendererSettings ( const RendererRenderableSettings rendererSettings)

A set of settings that should be used by renderer when rendering the renderable.

◆ updateRendererSettings()

template<CInvocable< RendererRenderableSettings & > Func>
decltype(auto) CeresEngine::RenderableComponent::Accessor::updateRendererSettings ( Func &&  func)
inlinenoexcept

A set of settings that should be used by renderer when rendering the renderable.


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