Skip to content

File Material.h

File List > Intern > rayx-core > src > Material > Material.h

Go to the documentation of this file

#pragma once

#include <array>
#include <vector>

#include "Core.h"

namespace rayx {

enum class Material {
    REFLECTIVE = -2,
    VACUUM     = -1,

// Material = 0 is not used yet

#define X(e, z, a, rho) e = z,
#include "materials.xmacro"
#undef X
};

bool materialFromString(const char* matname, Material* out);

struct RAYX_API MaterialTables {
    std::vector<double> materials;
    std::vector<int> indices;
};

// the following function loads the Palik & Nff tables.
// the tables will later be written to the mat and matIdx buffers of shader.comp
MaterialTables RAYX_API loadMaterialTables(std::array<bool, 92> relevantMaterials);

}  // namespace rayx