16#ifndef AEONGAMES_MODELCOMPONENT_H
17#define AEONGAMES_MODELCOMPONENT_H
19#include "aeongames/Component.hpp"
20#include "aeongames/ResourceId.hpp"
21#include "aeongames/BufferAccessor.hpp"
42 void Update (
Node& aNode,
double aDelta ) final;
44 void ProcessMessage (
Node& aNode, uint32_t aMessageType, const
void* aMessageData ) final;
70 size_t mActiveAnimation{};
71 double mStartingFrame{};
73 double mCurrentSample{};
75 std::array<uint8_t, 16 * 128 *
sizeof ( float ) > mSkeleton{};
Abstract interface for GPU/memory buffer operations.
Abstract base class for node components.
void Update(Node &aNode, double aDelta) final
Update the component state.
void SetModel(const ResourceId &aModel)
Sets the model resource.
size_t GetPropertyCount() const final
Get the number of properties exposed by this component.
void ProcessMessage(Node &aNode, uint32_t aMessageType, const void *aMessageData) final
Process an incoming message.
void SetProperty(uint32_t, const Property &aProperty) final
Set the value aProperty for the property identified by aId.
void SetActiveAnimation(size_t aActiveAnimation) noexcept
Sets the active animation index.
ModelComponent()
Default constructor.
void Render(const Node &aNode, Renderer &aRenderer, void *aWindowId) final
Render the component.
const ResourceId & GetModel() const noexcept
Returns the current model resource identifier.
void SetStartingFrame(double aAnimationDelta) noexcept
Sets the starting frame for the active animation.
Property GetProperty(const StringId &aId) const final
Get the value of a property.
static const StringId & GetClassId()
Returns the class identifier for the ModelComponent.
const double & GetStartingFrame() const noexcept
Returns the starting frame for the active animation.
const StringId * GetPropertyInfoArray() const final
Get the array of property identifiers.
const size_t & GetActiveAnimation() const noexcept
Returns the active animation index.
const StringId & GetId() const final
Get the unique identifier for this component type.
Scene graph node representing an entity in the game world.
Abstract base class for rendering backends.
Identifies a resource by its type and path CRC32 hashes.
CRC-based compile-time string identifier.
<- This is here just for the literals
std::variant< int, long, long long, unsigned, unsigned long, unsigned long long, float, double, std::string, std::filesystem::path > Property
A variant type that can hold any commonly used property value.