asteroidgen/src/TextureMapper.h

39 lines
794 B
C
Raw Normal View History

2017-10-29 05:16:22 +01:00
#pragma once
#include "Density.h"
2017-10-26 12:49:45 +02:00
#include <vector>
#include <glm/vec3.hpp>
class TextureMapper {
size_t textureSize;
2017-10-29 05:16:22 +01:00
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;
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
Density &density;
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
texture3_t albedo;
texture3_t normal;
texture1_t roughness;
texture1_t metalness;
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
vec3v_t vertices;
vec3v_t normals;
vec2v_t texcoords;
uvec3v_t indices;
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
glm::vec3 darkestColor, brightestColor;
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
TextureMapper(Density &density, size_t textureSize);
2017-10-26 12:49:45 +02:00
2017-10-29 05:16:22 +01:00
void setTextureSize(size_t size);
size_t getTextureSize();
void map(const vec3v_t &inVertices, const vec3v_t &inNormals,
const uvec3v_t &inIndices);
2017-10-26 12:49:45 +02:00
};