39 lines
794 B
C++
39 lines
794 B
C++
#pragma once
|
|
|
|
#include "Density.h"
|
|
|
|
#include <vector>
|
|
#include <glm/vec3.hpp>
|
|
|
|
class TextureMapper {
|
|
size_t textureSize;
|
|
|
|
public:
|
|
typedef std::vector< glm::tvec3<uint8_t> > texture3_t;
|
|
typedef std::vector<uint8_t> texture1_t;
|
|
typedef std::vector<glm::vec3> vec3v_t;
|
|
typedef std::vector<glm::vec2> vec2v_t;
|
|
typedef std::vector<glm::uvec3> uvec3v_t;
|
|
|
|
Density &density;
|
|
|
|
texture3_t albedo;
|
|
texture3_t normal;
|
|
texture1_t roughness;
|
|
texture1_t metalness;
|
|
|
|
vec3v_t vertices;
|
|
vec3v_t normals;
|
|
vec2v_t texcoords;
|
|
uvec3v_t indices;
|
|
|
|
glm::vec3 darkestColor, brightestColor;
|
|
|
|
TextureMapper(Density &density, size_t textureSize);
|
|
|
|
void setTextureSize(size_t size);
|
|
size_t getTextureSize();
|
|
void map(const vec3v_t &inVertices, const vec3v_t &inNormals,
|
|
const uvec3v_t &inIndices);
|
|
};
|