54 template<typename Processor> static constexpr
void reflect(Processor&& RTTI) {
95 const ScopeExit commitSettings([&]() { setRendererSettings(settings); });
96 return func(settings);
102 template<
typename Processor>
static constexpr void reflect(Processor&& RTTI) {
111 using TSceneObject::TSceneObject;
#define CE_EXTERN_COMPONENT(T)
Definition Component.hpp:600
#define CE_ENTITY_OBJECT_HASH(T)
Definition Entity.hpp:784
#define CE_REFLECT_HASH(T)
Definition Hash.hpp:89
#define CE_REFLECTABLE_STRUCT
Definition IReflectable.hpp:47
#define CE_REFL_DATA_GETSET(N, G, S)
Definition Macros.hpp:549
#define CE_REFL_DATA(N)
Definition Macros.hpp:541
#define CE_SCRIPT_EXPORT(...)
The CE_SCRIPT_EXPORT macro marks a class or method as exportable and available in scripting environme...
Definition Macros.hpp:247
Definition Renderable.hpp:109
The SceneObject template class is a helper class that EntityObjects might choose to use to provide so...
Definition SceneObject.hpp:323
Definition Application.hpp:19
sfl::small_vector< T, N, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > SmallVector
SmallVector is a sequence container similar to Vector.
Definition SmallVector.hpp:31
SmallVector< HMaterial, 10 > RenderableMaterialVector
Definition Renderable.hpp:26
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Components serve as the base for data storage for an entity.
Definition Component.hpp:68
A class that describes access to a RenderableComponent.
Definition Renderable.hpp:62
void setMaterial(HMaterial material)
The material to render the component with. One material per sub mesh.
const RendererRenderableSettings & getRendererSettings() const
A set of settings that should be used by renderer when rendering the renderable.
static constexpr void reflect(Processor &&RTTI)
Executes the given processor for every field of the struct.
Definition Renderable.hpp:102
const HMesh & getMesh() const
The mesh to render the component with.
const HMaterial & getMaterial(UInt32 index) const
The material to render the component with. One material per sub mesh.
void setMesh(HMesh mesh)
The mesh to render the component with.
const RenderableMaterialVector & getMaterials() const
The material to render the component with. One material per sub mesh.
void setRendererSettings(const RendererRenderableSettings &rendererSettings)
A set of settings that should be used by renderer when rendering the renderable.
void setMaterial(UInt32 index, HMaterial material)
The material to render the component with. One material per sub mesh.
decltype(auto) updateRendererSettings(Func &&func) noexcept
A set of settings that should be used by renderer when rendering the renderable.
Definition Renderable.hpp:93
void setMaterials(RenderableMaterialVector materials)
The material to render the component with. One material per sub mesh.
A component that represents an object that can be rendered by a renderer.
Definition Renderable.hpp:30
RendererRenderableSettings rendererSettings
A set of settings that should be used by renderer when rendering the renderable.
Definition Renderable.hpp:42
HMesh mesh
The mesh to render the component with.
Definition Renderable.hpp:35
RenderableMaterialVector materials
The material to render the component with. One material per sub mesh.
Definition Renderable.hpp:38
A structure that holds renderer-specific settings for a Renderable.
Definition RendererRenderableSettings.hpp:15
Definition ScopeExit.hpp:15