struct Material
{
float ambient[3];
float diffuse[3];
float specular[3];
float transmittance[3];
float emission[3];
float shininess;
float ior;
void init_arr(float dst_arr[], float src_arr[]) {
dst_arr[0] = src_arr[0];
dst_arr[1] = src_arr[1];
dst_arr[2] = src_arr[2];
}
Material(){}
Material(float amb[], float diff[], float spec[], float trans[], float emis[],
float sh, float _ior):shininess(sh), ior(_ior) {
init_arr(ambient, amb);
init_arr(diffuse, diff);
init_arr(specular, spec);
init_arr(emission, emis);
init_arr(transmittance, trans);
}
};