Blender
V3.3
|
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) |
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.
|
inline |
Definition at line 64 of file texture_margin.cc.
References copy_v2_v2(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::compositor::zbuf_alloc_span().
|
inline |
Definition at line 91 of file texture_margin.cc.
References blender::compositor::zbuf_free_span().
|
inline |
Definition at line 103 of file texture_margin.cc.
Referenced by grow_dijkstra(), and lookup_pixels().
|
inline |
Use dijkstra's algorithm to 'grow' a border around the polygons marked in the map. For each pixel mark which direction is the shortest way to a polygon.
Definition at line 148 of file texture_margin.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert, DijkstraPixelGetDirection, DijkstraPixelGetDistance, DijkstraPixelIsUnset, blender::math::distance(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), get_pixel(), IsDijkstraPixel, PackDijkstraPixel, blender::Vector< T, InlineBufferCapacity, Allocator >::pop_last(), set_pixel(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), x, and y.
|
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.
|
inline |
Definition at line 112 of file texture_margin.cc.
References mask(), v1, v2, zscan_store_pixel(), and zspan_scanconvert().
|
inline |
Definition at line 96 of file texture_margin.cc.
References BLI_assert, x, and y.
Referenced by grow_dijkstra(), and zscan_store_pixel().
|
inlinestatic |
Definition at line 122 of file texture_margin.cc.
References map, set_pixel(), x, and y.
Referenced by rasterize_tri().