texture.h

Back to Textures

pastel/gfx/texture/

// Description: Texture class
// Detail: An abstract class for textures

#ifndef PASTELGFX_TEXTURE_H
#define PASTELGFX_TEXTURE_H

#include "pastel/sys/vector.h"

#include "pastel/math/matrix/matrix.h"

#include <string>

namespace Pastel
{

    template <typename Type, integer N = 2>
    class Texture
    {
    public:
        using Element = Type;

        virtual ~Texture() {}

        virtual Type operator()(
            const Vector<real, N>& p,
            const Matrix<real>& m) const = 0;

        virtual std::string name() const = 0;

        virtual std::string fullName() const
        {
            return name();
        }
    };

}

#endif