|
Blender V4.3
|
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) |
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.
|
inline |
Definition at line 63 of file texture_margin.cc.
References copy_v2_v2(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and zbuf_alloc_span().
|
inline |
Definition at line 86 of file texture_margin.cc.
References zbuf_free_span().
Definition at line 98 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 face.
Definition at line 158 of file texture_margin.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), BLI_assert, DijkstraPixelGetDirection, DijkstraPixelGetDistance, DijkstraPixelIsUnset, 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 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.
|
inline |
Definition at line 107 of file texture_margin.cc.
References mask(), v2, zscan_store_pixel(), and zspan_scanconvert().
|
inline |
Definition at line 91 of file texture_margin.cc.
References BLI_assert, and x.
Referenced by grow_dijkstra(), and zscan_store_pixel().
|
inlinestatic |
Definition at line 118 of file texture_margin.cc.
References set_pixel(), and x.
Referenced by rasterize_tri().