|
Blender V5.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 > 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, bool fill) |
| 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 blender::copy_v2_v2(), w(), and blender::zbuf_alloc_span().
Referenced by zscan_store_pixel().
|
inline |
Definition at line 86 of file texture_margin.cc.
References blender::zbuf_free_span().
|
inline |
Definition at line 98 of file texture_margin.cc.
References blender::x, and y.
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 166 of file texture_margin.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::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(), blender::x, and y.
Referenced by blender::render::texturemargin::generate_margin().
|
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 230 of file texture_margin.cc.
References blender::BLI_assert(), blender::ImBuf::byte_data_for_write(), DijkstraPixelGetDirection, DijkstraPixelGetDistance, DijkstraPixelIsUnset, blender::ImBuf::float_data_for_write(), get_pixel(), blender::imbuf::interpolate_bilinear_border_byte(), blender::imbuf::interpolate_bilinear_border_fl(), IsDijkstraPixel, round, blender::x, and y.
Referenced by blender::render::texturemargin::generate_margin().
|
inline |
Definition at line 107 of file texture_margin.cc.
References blender::v2, zscan_store_pixel(), blender::zspan_rasterize_conservative_wireframe(), and blender::zspan_rasterize_triangle().
Referenced by blender::render::texturemargin::generate_margin().
|
inline |
Definition at line 91 of file texture_margin.cc.
References blender::BLI_assert(), blender::x, and y.
Referenced by grow_dijkstra(), and zscan_store_pixel().
|
inlinestatic |
Definition at line 126 of file texture_margin.cc.
References set_pixel(), TextureMarginMap(), blender::v, blender::x, and y.
Referenced by rasterize_tri().