3#include <Infinity/Types/Core/Data.hpp>
4#include <Infinity/Types/Core/Value.hpp>
5#include <Infinity/Types/Containers/Array.hpp>
6#include <Infinity/Types/Containers/Array2D.hpp>
7#include <Infinity/Types/Containers/ImmutableMap.hpp>
141 std::unique_ptr<Core::Base>
clone()
const override;
149 void setInt(
const std::string& key,
int value);
157 void setFloat(
const std::string& key,
float value);
197 void setTexture(
const std::string& key, std::shared_ptr<const Containers::ArrayBase> texture);
270 int getInt(
const std::string& key)
const;
Two-dimensional array container for grid-based data in procedural generation.
Definition Array2D.hpp:82
Abstract base class for all array container types in the Infinity type system.
Definition ArrayBase.hpp:72
Dynamic contiguous container for homogeneous elements in the Infinity type system.
Definition Array.hpp:77
Type-safe heterogeneous key-value container for configuration and metadata.
Definition ImmutableMap.hpp:85
Base class for complex data types with memory wrapping and property support.
Definition Data.hpp:49
Shader configuration with parameters and textures for surface appearance.
Definition Material.hpp:96
void setFloat(const std::string &key, float value)
Sets a float parameter.
bool hasTexture(const std::string &key) const
Checks if a texture parameter exists.
void setTexture2DRGB_SFloat32(const std::string &key, const Containers::Array2D< Math::Vector3 > &texture)
Sets a three-channel 32-bit float texture (RGB format, HDR).
const Containers::Array2D< float > & getTexture2DR_SFloat32(const std::string &key) const
Gets a single-channel 32-bit float texture.
const Containers::Array2D< uint8_t > & getTexture2DR(const std::string &key) const
Gets a single-channel 8-bit texture.
const Infinity::Types::TypeID & typeId() const override
Gets the TypeID for Material.
void setColor(const std::string &key, const Infinity::Types::Math::Vector4ub &value)
Sets a color parameter (8-bit RGBA).
void setVector2(const std::string &key, const Infinity::Types::Math::Vector2 &value)
Sets a 2D vector parameter.
std::string shaderName
Name of the shader to use for rendering.
Definition Material.hpp:119
void setVector4(const std::string &key, const Infinity::Types::Math::Vector4 &value)
Sets a 4D vector parameter.
void setTexture2DRGBA_SFloat32(const std::string &key, const Containers::Array2D< Math::Vector4 > &texture)
Sets a four-channel 32-bit float texture (RGBA format, HDR).
void setTexture2DRGBA(const std::string &key, const Containers::Array2D< Math::Vector4ub > &texture)
Sets a four-channel 8-bit texture (RGBA format).
const Containers::Array2D< Math::Vector2ub > & getTexture2DRG(const std::string &key) const
Gets a two-channel 8-bit texture.
Math::Vector2 getVector2(const std::string &key) const
Gets a 2D vector parameter.
const Containers::Array2D< Math::Vector3 > & getTexture2DRGB_SFloat32(const std::string &key) const
Gets a three-channel 32-bit float texture.
const Containers::Array2D< Math::Vector4ub > & getTexture2DRGBA(const std::string &key) const
Gets a four-channel 8-bit texture.
virtual ~Material()
Destructor.
void setTexture2DR_SFloat32(const std::string &key, const Containers::Array2D< float > &texture)
Sets a single-channel 32-bit float texture (R format, HDR).
const Containers::ArrayBase & getTexture(const std::string &key) const
Gets a texture as generic ArrayBase reference.
Math::Vector4ub getColorRGBA(const std::string &key) const
Gets a color parameter as 8-bit RGBA.
int getInt(const std::string &key) const
Gets an integer parameter.
void setTexture(const std::string &key, std::shared_ptr< const Containers::ArrayBase > texture)
Sets a texture from a generic array base.
Math::Vector4 getVector4(const std::string &key) const
Gets a 4D vector parameter.
std::unique_ptr< Core::Base > clone() const override
Math::Vector4ub getColor(const std::string &key) const
Gets a color parameter as 8-bit RGBA.
const Containers::Array2D< Math::Vector3ub > & getTexture2DRGB(const std::string &key) const
Gets a three-channel 8-bit texture.
void setTexture2DRG(const std::string &key, const Containers::Array2D< Math::Vector2ub > &texture)
Sets a two-channel 8-bit texture (RG format).
Math::Vector3 getVector3(const std::string &key) const
Gets a 3D vector parameter.
void setTexture2DRG_SFloat32(const std::string &key, const Containers::Array2D< Math::Vector2 > &texture)
Sets a two-channel 32-bit float texture (RG format, HDR).
std::string name
Human-readable material name.
Definition Material.hpp:104
bool hasParam(const std::string &key) const
Checks if a parameter exists.
const Containers::Array2D< Math::Vector4 > & getTexture2DRGBA_SFloat32(const std::string &key) const
Gets a four-channel 32-bit float texture.
Math::Vector4 getColorRGBAFloat(const std::string &key) const
Gets a color parameter as normalized float RGBA.
const Containers::Array2D< Math::Vector2 > & getTexture2DRG_SFloat32(const std::string &key) const
Gets a two-channel 32-bit float texture.
void setTexture2DRGB(const std::string &key, const Containers::Array2D< Math::Vector3ub > &texture)
Sets a three-channel 8-bit texture (RGB format).
Containers::ImmutableMap params
Parameter storage for shader uniforms and textures.
Definition Material.hpp:127
void setVector3(const std::string &key, const Infinity::Types::Math::Vector3 &value)
Sets a 3D vector parameter.
float getFloat(const std::string &key) const
Gets a float parameter.
Material()
Default constructor.
void setInt(const std::string &key, int value)
Sets an integer parameter.
void setTexture2DR(const std::string &key, const Containers::Array2D< uint8_t > &texture)
Sets a single-channel 8-bit texture (R format).
Definition IndexBuffer.hpp:9
Template structure representing a 2-component vector.
Definition Vector2.hpp:75
Template structure representing a 3-component vector.
Definition Vector3.hpp:82
Template structure representing a 4-component vector.
Definition Vector4.hpp:85
Runtime type identifier for the Infinity type system.
Definition TypeID.hpp:71