Objects::Components::Material

Materials in Unified Engine

Materials in the Unified Engine determine how an object appears visually, including its color, texture, and shading. The engine provides different types of materials to cater to varied visual needs.

Base Material Class

The foundational class from which all specific material types derive. It provides the basic attributes and functionalities common to all materials.

class Material : public ObjectComponent{
    public:
        Material(ObjectComponent* Parent);
        ~Material();

    public:
        virtual int Update();
        virtual int Render();
};

Color Material

The ColorMaterial class represents a simple material that uses a single color to render an object.

class ColorMaterial : public Material{
    public:
        ColorMaterial(ObjectComponent* Parent);
        ~ColorMaterial();

    public:
        int Update();
        int Render();
};

Gradient Material

The GradientMaterial class specializes in rendering objects with a gradient finish. Specific gradient details are yet to be implemented.

class GradientMaterial : public Material{
    public:
        GradientMaterial(ObjectComponent* Parent);
        ~GradientMaterial();

    public:
        int Update();
        int Render();
};

Texture2D Material

The Texture2DMaterial class is designed for objects that need to be rendered with a 2D texture. It incorporates a Texture2D instance to specify the texture details.

class Texture2DMaterial : public Material{
    public:
        Texture2DMaterial(ObjectComponent* Parent, Texture2D* texture);
        ~Texture2DMaterial();

    public:
        Texture2D* texture;

    public:
        int Update();
        int Render();
};

Last updated