Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_SunBeamsOperation.cc
| Show All 40 Lines | |||||
| /** | /** | ||||
| * Defines a line accumulator for a specific sector, | * Defines a line accumulator for a specific sector, | ||||
| * given by the four matrix entries that rotate from buffer space into the sector | * given by the four matrix entries that rotate from buffer space into the sector | ||||
| * | * | ||||
| * (x,y) is used to designate buffer space coordinates | * (x,y) is used to designate buffer space coordinates | ||||
| * (u,v) is used to designate sector space coordinates | * (u,v) is used to designate sector space coordinates | ||||
| * | * | ||||
| * For a target point (x,y) the sector should be chosen such that | * For a target point (x,y) the sector should be chosen such that | ||||
| * ``u >= v >= 0`` | * `u >= v >= 0` | ||||
| * This removes the need to handle all sorts of special cases. | * This removes the need to handle all sorts of special cases. | ||||
| * | * | ||||
| * Template parameters: | * Template parameters: | ||||
| * fxu : buffer increment in x for sector u+1 | * \param fxu: buffer increment in x for sector `u + 1`. | ||||
| * fxv : buffer increment in x for sector v+1 | * \param fxv: buffer increment in x for sector `v + 1`. | ||||
| * fyu : buffer increment in y for sector u+1 | * \param fyu: buffer increment in y for sector `u + 1`. | ||||
| * fyv : buffer increment in y for sector v+1 | * \param fyv: buffer increment in y for sector `v + 1`. | ||||
| */ | */ | ||||
| template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator { | template<int fxu, int fxv, int fyu, int fyv> struct BufferLineAccumulator { | ||||
| /* utility functions implementing the matrix transform to/from sector space */ | /* utility functions implementing the matrix transform to/from sector space */ | ||||
| static inline void buffer_to_sector(const float source[2], int x, int y, int &u, int &v) | static inline void buffer_to_sector(const float source[2], int x, int y, int &u, int &v) | ||||
| { | { | ||||
| int x0 = (int)source[0]; | int x0 = (int)source[0]; | ||||
| ▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines | |||||