Perception Tool Kit (PTK) API Guide
ptk::Colormap::Texture Class Reference

Detailed Description

The Texture class is used to store and track the actual data, as well as ensure it is loaded to the GPU, while the Colormap wrapper is used as a shared copy-on-write pointer to a Texture that allows us to have built-in Colormaps (such as HEAT) which the user can "modify" without disturbing other users of that colormap. But, if the user isn't modifying it, this allows us to only have one copy in memory instead of dozens.

Collaboration diagram for ptk::Colormap::Texture:
Collaboration graph

Public Member Functions

 Texture ()
 
 ~Texture ()
 
 Texture (const Texture &)=delete
 
Textureoperator= (const Texture &)=delete
 
void bind ()
 
void setPixel (uint32_t pixel, const glm::u8vec4 &color)
 
void setFiltering (GLint filter)
 

Private Attributes

friend Colormap
 
glm::u8vec4 * _data
 
uint32_t _length
 
bool _loaded
 
GLuint _tex
 

Constructor & Destructor Documentation

◆ Texture() [1/2]

ptk::Colormap::Texture::Texture ( )

◆ ~Texture()

ptk::Colormap::Texture::~Texture ( )

◆ Texture() [2/2]

ptk::Colormap::Texture::Texture ( const Texture )
delete

Member Function Documentation

◆ operator=()

Texture& ptk::Colormap::Texture::operator= ( const Texture )
delete

◆ bind()

void ptk::Colormap::Texture::bind ( )

◆ setPixel()

void ptk::Colormap::Texture::setPixel ( uint32_t  pixel,
const glm::u8vec4 &  color 
)

◆ setFiltering()

void ptk::Colormap::Texture::setFiltering ( GLint  filter)

Field Documentation

◆ Colormap

friend ptk::Colormap::Texture::Colormap
private

◆ _data

glm::u8vec4* ptk::Colormap::Texture::_data
private

◆ _length

uint32_t ptk::Colormap::Texture::_length
private

◆ _loaded

bool ptk::Colormap::Texture::_loaded
private

◆ _tex

GLuint ptk::Colormap::Texture::_tex
private