Blender
V3.3
|
Static Public Member Functions | |
static void | buffer_to_sector (const float source[2], float x, float y, float &u, float &v) |
static void | sector_to_buffer (const float source[2], int u, int v, int &x, int &y) |
static float * | init_buffer_iterator (MemoryBuffer *input, const float source[2], const float co[2], float dist_min, float dist_max, int &x, int &y, int &num, float &v, float &dv, float &falloff_factor) |
static void | eval (MemoryBuffer *input, float output[4], const float co[2], const float source[2], float dist_min, float dist_max) |
Defines a line accumulator for a specific sector, given by the four matrix entries that rotate from buffer space into the sector
(x,y) is used to designate buffer space coordinates (u,v) is used to designate sector space coordinates
For a target point (x,y) the sector should be chosen such that u >= v >= 0
This removes the need to handle all sorts of special cases.
Template parameters:
fxu | buffer increment in x for sector u + 1 . |
fxv | buffer increment in x for sector v + 1 . |
fyu | buffer increment in y for sector u + 1 . |
fyv | buffer increment in y for sector v + 1 . |
Definition at line 49 of file COM_SunBeamsOperation.cc.
|
inlinestatic |
Definition at line 53 of file COM_SunBeamsOperation.cc.
References float(), v, x, and y.
Referenced by blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::init_buffer_iterator().
|
inlinestatic |
Perform the actual accumulation along a ray segment from source to pt. Only pixels within dist_min..dist_max contribute.
The loop runs backwards(!) over the primary sector space axis u, i.e. increasing distance to pt. After each step it decrements v by dv < 1, adding a buffer shift when necessary.
Definition at line 127 of file COM_SunBeamsOperation.cc.
References border, buffer, copy_v4_v4(), float(), floorf, blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::init_buffer_iterator(), input, madd_v4_v4fl(), mul_v4_fl(), output, v, x, rcti::xmin, y, rcti::ymax, rcti::ymin, zero_v3(), and zero_v4().
Referenced by blender::compositor::accumulate_line().
|
inlinestatic |
Set up the initial buffer pointer and calculate necessary variables for looping.
Note that sector space is centered around the "source" point while the loop starts at dist_min from the target pt. This way the loop can be canceled as soon as it runs out of the buffer rect, because no pixels further along the line can contribute.
x,y | Start location in the buffer |
num | Total steps in the loop |
v,dv | Vertical offset in sector space, for line offset perpendicular to the loop axis |
Definition at line 82 of file COM_SunBeamsOperation.cc.
References blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::buffer_to_sector(), ceilf, double(), floorf, input, max_ff(), blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::sector_to_buffer(), sqrt(), v, x, and y.
Referenced by blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::eval().
|
inlinestatic |
Definition at line 63 of file COM_SunBeamsOperation.cc.
Referenced by blender::compositor::BufferLineAccumulator< fxu, fxv, fyu, fyv >::init_buffer_iterator().