Blender V4.3
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 > mloopuv)
 
 ~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 40 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 > mloopuv )
inline

◆ ~TextureMarginMap()

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

Definition at line 86 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 98 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 222 of file texture_margin.cc.

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

◆ rasterize_tri()

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

Definition at line 107 of file texture_margin.cc.

References mask(), v2, zscan_store_pixel(), and zspan_scanconvert().

◆ set_pixel()

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

Definition at line 91 of file texture_margin.cc.

References BLI_assert, and x.

Referenced by grow_dijkstra(), and zscan_store_pixel().

◆ zscan_store_pixel()

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

Definition at line 118 of file texture_margin.cc.

References set_pixel(), and x.

Referenced by rasterize_tri().


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