|
Blender V5.0
|
#include <algorithm>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_math_base.h"#include "zbuf.h"Go to the source code of this file.
Functions | |
| void | zbuf_alloc_span (ZSpan *zspan, int rectx, int recty) |
| void | zbuf_free_span (ZSpan *zspan) |
| static void | zbuf_init_span (ZSpan *zspan) |
| static void | zbuf_add_to_span (ZSpan *zspan, const float v1[2], const float v2[2]) |
| void | zspan_scanconvert (ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void(*func)(void *, int, int, float, float)) |
Definition in file zbuf.cc.
Definition at line 60 of file zbuf.cc.
References ceil, floor, ZSpan::maxp1, ZSpan::maxp2, ZSpan::maxy1, ZSpan::maxy2, min_ff(), ZSpan::minp1, ZSpan::minp2, ZSpan::miny1, ZSpan::miny2, ZSpan::recty, ZSpan::span1, ZSpan::span2, v2, and y.
Referenced by zspan_scanconvert().
| void zbuf_alloc_span | ( | struct ZSpan * | zspan, |
| int | rectx, | ||
| int | recty ) |
Each Z-buffer has coordinates transformed to local rect coordinates, so we can simply clip.
Definition at line 33 of file zbuf.cc.
References MEM_malloc_arrayN(), ZSpan::rectx, ZSpan::recty, ZSpan::span1, and ZSpan::span2.
Referenced by RE_bake_pixels_populate(), and blender::render::texturemargin::TextureMarginMap::TextureMarginMap().
| void zbuf_free_span | ( | ZSpan * | zspan | ) |
Definition at line 44 of file zbuf.cc.
References MEM_SAFE_FREE, ZSpan::span1, and ZSpan::span2.
Referenced by RE_bake_pixels_populate(), and blender::render::texturemargin::TextureMarginMap::~TextureMarginMap().
|
static |
Definition at line 53 of file zbuf.cc.
References ZSpan::maxp1, ZSpan::maxp2, ZSpan::maxy1, ZSpan::maxy2, ZSpan::minp1, ZSpan::minp2, ZSpan::miny1, ZSpan::miny2, and ZSpan::recty.
Referenced by zspan_scanconvert().
| void zspan_scanconvert | ( | struct ZSpan * | zspan, |
| void * | handle, | ||
| float * | v1, | ||
| float * | v2, | ||
| float * | v3, | ||
| void(* | func )(void *, int, int, float, float) ) |
Scan-convert for strand triangles, calls function for each x, y coordinate and gives UV barycentrics and z.
Definition at line 151 of file zbuf.cc.
References floor, i, max_ff(), max_ii(), ZSpan::maxp2, ZSpan::maxy1, ZSpan::maxy2, min_ff(), min_ii(), ZSpan::minp2, ZSpan::miny1, ZSpan::miny2, ZSpan::rectx, ZSpan::span1, ZSpan::span2, v, v2, x, y, zbuf_add_to_span(), and zbuf_init_span().
Referenced by blender::render::texturemargin::TextureMarginMap::rasterize_tri(), and RE_bake_pixels_populate().