Public Member Functions | Public Attributes | List of all members
lvr2::Texture Class Reference

This class represents a texture. More...

#include <Texture.hpp>

Public Member Functions

Textureoperator= (const Texture &other)
 
void save ()
 Writes the texture to an image file. More...
 
 Texture ()
 Constructor. More...
 
 Texture (const Texture &other)
 Constructor. More...
 
 Texture (int index, GlTexture *oldTexture)
 Constructor. More...
 
 Texture (int index, unsigned short int width, unsigned short int height, unsigned char numChannels, unsigned char numBytesPerChan, float texelSize, unsigned char *data=nullptr)
 Constructor. More...
 
 Texture (Texture &&other)
 Constructor. More...
 
virtual ~Texture ()
 Destructor. More...
 

Public Attributes

unsigned char * m_data
 The texture data. More...
 
unsigned short int m_height
 
int m_index
 Texture index. More...
 
unsigned char m_numBytesPerChan
 The number of bytes per channel. More...
 
unsigned char m_numChannels
 The number of color channels. More...
 
float m_texelSize
 The size of a texture pixel. More...
 
unsigned short int m_width
 The dimensions of the texture. More...
 

Detailed Description

This class represents a texture.

Definition at line 54 of file Texture.hpp.

Constructor & Destructor Documentation

◆ Texture() [1/5]

lvr2::Texture::Texture ( )

Constructor.

Definition at line 43 of file Texture.cpp.

◆ Texture() [2/5]

lvr2::Texture::Texture ( int  index,
unsigned short int  width,
unsigned short int  height,
unsigned char  numChannels,
unsigned char  numBytesPerChan,
float  texelSize,
unsigned char *  data = nullptr 
)

Constructor.

Definition at line 75 of file Texture.cpp.

◆ Texture() [3/5]

lvr2::Texture::Texture ( int  index,
GlTexture oldTexture 
)

Constructor.

Definition at line 156 of file Texture.cpp.

◆ Texture() [4/5]

lvr2::Texture::Texture ( Texture &&  other)

Constructor.

Definition at line 98 of file Texture.cpp.

◆ Texture() [5/5]

lvr2::Texture::Texture ( const Texture other)

Constructor.

Definition at line 114 of file Texture.cpp.

◆ ~Texture()

lvr2::Texture::~Texture ( )
virtual

Destructor.

Definition at line 186 of file Texture.cpp.

Member Function Documentation

◆ operator=()

Texture & lvr2::Texture::operator= ( const Texture other)

Definition at line 130 of file Texture.cpp.

◆ save()

void lvr2::Texture::save ( )

Writes the texture to an image file.

The file name will be texture_<INDEX>.ppm and the used file format is Portable Pixel Map (ppm).

Definition at line 175 of file Texture.cpp.

Member Data Documentation

◆ m_data

unsigned char* lvr2::Texture::m_data

The texture data.

Definition at line 114 of file Texture.hpp.

◆ m_height

unsigned short int lvr2::Texture::m_height

Definition at line 111 of file Texture.hpp.

◆ m_index

int lvr2::Texture::m_index

Texture index.

Definition at line 108 of file Texture.hpp.

◆ m_numBytesPerChan

unsigned char lvr2::Texture::m_numBytesPerChan

The number of bytes per channel.

Definition at line 120 of file Texture.hpp.

◆ m_numChannels

unsigned char lvr2::Texture::m_numChannels

The number of color channels.

Definition at line 117 of file Texture.hpp.

◆ m_texelSize

float lvr2::Texture::m_texelSize

The size of a texture pixel.

Definition at line 123 of file Texture.hpp.

◆ m_width

unsigned short int lvr2::Texture::m_width

The dimensions of the texture.

Definition at line 111 of file Texture.hpp.


The documentation for this class was generated from the following files:


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:27