Blender  V3.3
Public Member Functions | Static Public Member Functions | List of all members
blender::render::texturemargin::TextureMarginMap Class Reference

Public Member Functions

 TextureMarginMap (size_t w, size_t h, const float uv_offset[2], MPoly const *mpoly, MLoop const *mloop, MLoopUV const *mloopuv, int totpoly, int totloop, int totedge)
 
 ~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)
 
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, [[maybe_unused]] float u, [[maybe_unused]] float v)
 

Detailed Description

The map class contains both a pixel map which maps out polygon 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],
MPoly const *  mpoly,
MLoop const *  mloop,
MLoopUV const *  mloopuv,
int  totpoly,
int  totloop,
int  totedge 
)
inline

◆ ~TextureMarginMap()

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

Definition at line 91 of file texture_margin.cc.

References blender::compositor::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 103 of file texture_margin.cc.

References x, and y.

Referenced by grow_dijkstra(), and lookup_pixels().

◆ grow_dijkstra()

void blender::render::texturemargin::TextureMarginMap::grow_dijkstra ( int  margin)
inline

◆ 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 polygon. Then look up the pixel from the next polygon.

Definition at line 214 of file texture_margin.cc.

References bilinear_interpolation(), BLI_assert, DijkstraPixelGetDirection, DijkstraPixelGetDistance, DijkstraPixelIsUnset, get_pixel(), IsDijkstraPixel, mask(), ny, x, and y.

◆ rasterize_tri()

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

Definition at line 112 of file texture_margin.cc.

References mask(), v1, 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 96 of file texture_margin.cc.

References BLI_assert, x, and y.

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,
[[maybe_unused] ] float  u,
[[maybe_unused] ] float  v 
)
inlinestatic

Definition at line 122 of file texture_margin.cc.

References map, set_pixel(), x, and y.

Referenced by rasterize_tri().


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