Blender V5.0
blender::render::texturemargin::TextureMarginMap Class Reference

Public Member Functions

 TextureMarginMap (size_t w, size_t h, const float uv_offset[2], const int totedge, const OffsetIndices< int > faces, const Span< int > corner_edges, const Span< float2 > uv_map)
 ~TextureMarginMap ()
void set_pixel (int x, int y, uint32_t value)
uint32_t get_pixel (int x, int y) const
void rasterize_tri (float *v1, float *v2, float *v3, uint32_t value, char *mask, bool writemask)
void grow_dijkstra (int margin)
void lookup_pixels (ImBuf *ibuf, char *mask, int maxPolygonSteps)

Static Public Member Functions

static void zscan_store_pixel (void *map, int x, int y, float u, float v)

Detailed Description

The map class contains both a pixel map which maps out face indices for all UV-polygons and adjacency tables.

Definition at line 38 of file texture_margin.cc.

Constructor & Destructor Documentation

◆ TextureMarginMap()

blender::render::texturemargin::TextureMarginMap::TextureMarginMap ( size_t w,
size_t h,
const float uv_offset[2],
const int totedge,
const OffsetIndices< int > faces,
const Span< int > corner_edges,
const Span< float2 > uv_map )
inline

Definition at line 61 of file texture_margin.cc.

References copy_v2_v2(), faces, w(), and zbuf_alloc_span().

Referenced by zscan_store_pixel().

◆ ~TextureMarginMap()

blender::render::texturemargin::TextureMarginMap::~TextureMarginMap ( )
inline

Definition at line 84 of file texture_margin.cc.

References zbuf_free_span().

Member Function Documentation

◆ get_pixel()

uint32_t blender::render::texturemargin::TextureMarginMap::get_pixel ( int x,
int y ) const
inline

Definition at line 96 of file texture_margin.cc.

References x, and y.

Referenced by grow_dijkstra(), and lookup_pixels().

◆ grow_dijkstra()

◆ lookup_pixels()

void blender::render::texturemargin::TextureMarginMap::lookup_pixels ( ImBuf * ibuf,
char * mask,
int maxPolygonSteps )
inline

Walk over the map and for margin pixels follow the direction stored in the bottom 3 bits back to the face. Then look up the pixel from the next face.

Definition at line 220 of file texture_margin.cc.

References BLI_assert, ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, DijkstraPixelGetDirection, DijkstraPixelGetDistance, DijkstraPixelIsUnset, ImBuf::float_buffer, get_pixel(), i, blender::imbuf::interpolate_bilinear_border_byte(), blender::imbuf::interpolate_bilinear_border_fl(), IsDijkstraPixel, mask(), round, x, and y.

Referenced by blender::render::texturemargin::generate_margin().

◆ rasterize_tri()

void blender::render::texturemargin::TextureMarginMap::rasterize_tri ( float * v1,
float * v2,
float * v3,
uint32_t value,
char * mask,
bool writemask )
inline

◆ set_pixel()

void blender::render::texturemargin::TextureMarginMap::set_pixel ( int x,
int y,
uint32_t value )
inline

Definition at line 89 of file texture_margin.cc.

References BLI_assert, x, and y.

Referenced by grow_dijkstra(), and zscan_store_pixel().

◆ zscan_store_pixel()

void blender::render::texturemargin::TextureMarginMap::zscan_store_pixel ( void * map,
int x,
int y,
float u,
float v )
inlinestatic

Definition at line 116 of file texture_margin.cc.

References set_pixel(), TextureMarginMap(), v, x, and y.

Referenced by rasterize_tri().


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