HighMap library (C++)
Loading...
Searching...
No Matches
hmap::VirtualTexture Class Reference

#include <virtual_texture.hpp>

Public Member Functions

 VirtualTexture ()=default
 VirtualTexture (glm::ivec2 shape, glm::ivec2 tile_shape, int halo, int channels, std::unique_ptr< TileStorage > storage_proto)
 VirtualTexture (glm::ivec2 shape, glm::ivec2 tile_shape, int halo, int channels, StorageMode storage_mode)
void copy_from (VirtualTexture &src, const ComputeMode &cm)
int channels () const
VirtualArray & channel (int c)
const VirtualArray & channel (int c) const
std::vector< VirtualArray * > channels_ptr ()
std::vector< const VirtualArray * > channels_ptr () const
std::vector< VirtualArray > & get_arrays ()
void fill (float value, const ComputeMode &cm)
void fill (int c, float value, const ComputeMode &cm)
void sync_overlap_buffers (SyncOperation op=SyncOperation::SmoothBlend)
void from_arrays (const std::vector< const Array * > &p_arrays, const ComputeMode &cm)
std::vector< uint8_t > to_img_8bit (const glm::ivec2 &img_shape, const ComputeMode &c, bool flip_y=false) const
void to_png (const glm::ivec2 &array_shape, const std::string &fname, const ComputeMode &cm, int depth=CV_8U) const
void to_png (const std::string &fname, const ComputeMode &cm, int depth=CV_8U) const
std::vector< float > to_raw (const ComputeMode &cm, bool flip_y=false)
Texture to_texture (const glm::ivec2 &img_shape, const ComputeMode &cm) const
void trim_storage () const
size_t live_memory_bytes () const

Public Attributes

glm::ivec2 shape
glm::ivec2 tile_shape
int halo

Constructor & Destructor Documentation

◆ VirtualTexture() [1/3]

hmap::VirtualTexture::VirtualTexture ( )
default

◆ VirtualTexture() [2/3]

hmap::VirtualTexture::VirtualTexture ( glm::ivec2 shape,
glm::ivec2 tile_shape,
int halo,
int channels,
std::unique_ptr< TileStorage > storage_proto )

◆ VirtualTexture() [3/3]

hmap::VirtualTexture::VirtualTexture ( glm::ivec2 shape,
glm::ivec2 tile_shape,
int halo,
int channels,
StorageMode storage_mode )

Member Function Documentation

◆ copy_from()

void hmap::VirtualTexture::copy_from ( VirtualTexture & src,
const ComputeMode & cm )

◆ channels()

int hmap::VirtualTexture::channels ( ) const

◆ channel() [1/2]

VirtualArray & hmap::VirtualTexture::channel ( int c)

◆ channel() [2/2]

const VirtualArray & hmap::VirtualTexture::channel ( int c) const

◆ channels_ptr() [1/2]

std::vector< VirtualArray * > hmap::VirtualTexture::channels_ptr ( )

◆ channels_ptr() [2/2]

std::vector< const VirtualArray * > hmap::VirtualTexture::channels_ptr ( ) const

◆ get_arrays()

std::vector< VirtualArray > & hmap::VirtualTexture::get_arrays ( )

◆ fill() [1/2]

void hmap::VirtualTexture::fill ( float value,
const ComputeMode & cm )

◆ fill() [2/2]

void hmap::VirtualTexture::fill ( int c,
float value,
const ComputeMode & cm )

◆ sync_overlap_buffers()

void hmap::VirtualTexture::sync_overlap_buffers ( SyncOperation op = SyncOperation::SmoothBlend)

◆ from_arrays()

void hmap::VirtualTexture::from_arrays ( const std::vector< const Array * > & p_arrays,
const ComputeMode & cm )

◆ to_img_8bit()

std::vector< uint8_t > hmap::VirtualTexture::to_img_8bit ( const glm::ivec2 & img_shape,
const ComputeMode & c,
bool flip_y = false ) const

◆ to_png() [1/2]

void hmap::VirtualTexture::to_png ( const glm::ivec2 & array_shape,
const std::string & fname,
const ComputeMode & cm,
int depth = CV_8U ) const

◆ to_png() [2/2]

void hmap::VirtualTexture::to_png ( const std::string & fname,
const ComputeMode & cm,
int depth = CV_8U ) const

◆ to_raw()

std::vector< float > hmap::VirtualTexture::to_raw ( const ComputeMode & cm,
bool flip_y = false )

◆ to_texture()

Texture hmap::VirtualTexture::to_texture ( const glm::ivec2 & img_shape,
const ComputeMode & cm ) const

◆ trim_storage()

void hmap::VirtualTexture::trim_storage ( ) const

◆ live_memory_bytes()

size_t hmap::VirtualTexture::live_memory_bytes ( ) const

Member Data Documentation

◆ shape

glm::ivec2 hmap::VirtualTexture::shape

◆ tile_shape

glm::ivec2 hmap::VirtualTexture::tile_shape

◆ halo

int hmap::VirtualTexture::halo

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