Blender V4.3
zbuf.h File Reference

Go to the source code of this file.

Classes

struct  ZSpan
 

Typedefs

typedef struct ZSpan ZSpan
 

Functions

void zbuf_alloc_span (struct ZSpan *zspan, int rectx, int recty)
 
void zbuf_free_span (struct ZSpan *zspan)
 
void zspan_scanconvert (struct ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void(*func)(void *, int, int, float, float))
 

Typedef Documentation

◆ ZSpan

typedef struct ZSpan ZSpan

Span fill in method, is also used to localize data for Z-buffering.

Function Documentation

◆ zbuf_alloc_span()

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 32 of file zbuf.cc.

References MEM_mallocN, ZSpan::rectx, ZSpan::recty, ZSpan::span1, and ZSpan::span2.

Referenced by RE_bake_pixels_populate(), and blender::render::texturemargin::TextureMarginMap::TextureMarginMap().

◆ zbuf_free_span()

void zbuf_free_span ( struct ZSpan * zspan)

◆ 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 160 of file zbuf.cc.

References double(), floor(), 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().