ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
AnimatedMaterial.h
Go to the documentation of this file.
1/**
2 * @file AnimatedMaterial.h
3 * @brief Declares the `AnimatedMaterial` class for time-based material updates.
4 *
5 * This class serves as a base for materials that require dynamic updates over time.
6 *
7 * @date 22/12/2024
8 * @version 1.0
9 * @author Coela Can't
10 */
11
12#pragma once
13
14#include "Material.h"
15
16/**
17 * @class AnimatedMaterial
18 * @brief Base class for dynamically updating materials.
19 *
20 * The `AnimatedMaterial` class provides an interface for materials that require
21 * animation or time-based updates. Derived classes must implement the `Update` and
22 * `GetMaterial` methods.
23 */
24class AnimatedMaterial : public Material {
25public:
26 /**
27 * @brief Updates the material's state based on a ratio.
28 *
29 * This function is called to update the material's state over time.
30 *
31 * @param ratio A float value (0.0 to 1.0) representing the progression of time.
32 */
33 virtual void Update(float ratio) = 0;
34
35 /**
36 * @brief Retrieves the current material instance for rendering.
37 *
38 * @return A pointer to the current `Material` instance.
39 */
40 virtual Material* GetMaterial() = 0;
41};
Base class for materials defining shading and rendering behavior.
Base class for dynamically updating materials.
virtual Material * GetMaterial()=0
Retrieves the current material instance for rendering.
virtual void Update(float ratio)=0
Updates the material's state based on a ratio.
Abstract base class for rendering materials.
Definition Material.h:27