Blender  V3.3
Classes | Typedefs | Functions
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 31 of file zbuf.c.

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

◆ zbuf_free_span()

void zbuf_free_span ( struct ZSpan zspan)

Definition at line 42 of file zbuf.c.

References MEM_SAFE_FREE, ZSpan::span1, and ZSpan::span2.

◆ zspan_scanconvert()

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

Scan-convert for strand triangles, calls function for each x, y coordinate and gives UV barycentrics and z.

Definition at line 159 of file zbuf.c.

References double(), blender::math::floor(), max_ff(), max_ii(), ZSpan::maxp2, ZSpan::maxy1, ZSpan::maxy2, min_ff(), min_ii(), ZSpan::minp2, ZSpan::miny1, ZSpan::miny2, NULL, ZSpan::rectx, ZSpan::span1, ZSpan::span2, v, v1, v2, x, x2, y, y1, zbuf_add_to_span(), and zbuf_init_span().

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