3D City v-1.0
Computer Graphics Project
material.h
Go to the documentation of this file.
1//
2// Created by ankit on 5/9/2021.
3//
4#pragma once
5
6#include "core.h"
10struct texture {
11 unsigned char *m_data = nullptr;
12
13 int w = 0, h = 0, m_bpp;
14 ~texture() { delete[] m_data; }
15};
16
20struct Material {
21 int id = -1;
22 float AmbientStrength = 0.7;
23 float DiffuseStrength = 1;
26 float shininess = 32;
30 /* std::string ambientMap;
31 std::string diffuseMap;
32 std::string specularMap;
33 std::string normalMap;*/
35};
class to store information about material read from .mtl file along with obj
Definition: material.h:20
Material()
Definition: material.h:34
float SpecularStrength
Definition: material.h:24
float DiffuseStrength
Definition: material.h:23
color diffuseColor
Definition: material.h:27
float AmbientStrength
Definition: material.h:22
texture diffuse
Definition: material.h:28
float shininess
Definition: material.h:26
texture specular
Definition: material.h:29
color specularColor
Definition: material.h:25
class that holds color with 8 bits per channel with 4 channels rgba.
Definition: core.h:165
Texture class to hold image data.
Definition: material.h:10
int h
Definition: material.h:13
int m_bpp
Definition: material.h:13
~texture()
Definition: material.h:14
int w
Definition: material.h:13
unsigned char * m_data
Definition: material.h:11