Program Listing for File Texture.hpp
↰ Return to documentation for file (include/lvr2/texture/Texture.hpp)
/*
* Texture.hpp
*
* @date 19.07.2017
* @author Jan Philipp Vogtherr (jvogtherr@uos.de)
* @author Kristin Schmidt (krschmidt@uos.de)
*/
#ifndef LVR2_TEXTURE_TEXTURE_HPP_
#define LVR2_TEXTURE_TEXTURE_HPP_
#include <cstring>
#include <math.h>
#include <cstdio>
#include "lvr2/geometry/BoundingRectangle.hpp"
#include "lvr2/io/modelio/PPMIO.hpp"
namespace lvr2
{
class GlTexture;
class Texture {
public:
Texture( );
Texture(
int index,
unsigned short int width,
unsigned short int height,
unsigned char numChannels,
unsigned char numBytesPerChan,
float texelSize,
unsigned char* data = nullptr,
std::string layer = "default"
);
Texture(
int index,
GlTexture* oldTexture
);
Texture(Texture&& other);
Texture(const Texture& other);
Texture & operator=(const Texture &other);
Texture & operator=(Texture &&other);
virtual ~Texture();
void save(const std::string& file_name = "");
int m_index;
unsigned short int m_width, m_height;
unsigned char* m_data;
unsigned char m_numChannels;
unsigned char m_numBytesPerChan;
float m_texelSize;
std::string m_layerName;
};
} // namespace lvr2
#endif /* LVR2_TEXTURE_TEXTURE_HPP_ */