forked from blender/blender
main sync #3
@ -222,7 +222,7 @@ struct Rows {
|
||||
/** This pixel is directly affected by a brush and doesn't need to be solved. */
|
||||
Brush,
|
||||
SelectedForCloserExamination,
|
||||
/** This pixel will be copid from another pixel to solve non-manifold edge bleeding. */
|
||||
/** This pixel will be copied from another pixel to solve non-manifold edge bleeding. */
|
||||
CopyFromClosestEdge,
|
||||
};
|
||||
|
||||
@ -233,7 +233,7 @@ struct Rows {
|
||||
/**
|
||||
* Index of the edge in the list of non-manifold edges.
|
||||
*
|
||||
* The edge is kept to calculate athe mix factor between the two pixels that have chosen to
|
||||
* The edge is kept to calculate the mix factor between the two pixels that have chosen to
|
||||
* be mixed.
|
||||
*/
|
||||
int64_t edge_index;
|
||||
@ -309,7 +309,7 @@ struct Rows {
|
||||
* Look for a second source pixel that will be blended with the first source pixel to improve
|
||||
* the quality of the fix.
|
||||
*
|
||||
* - The second source pixel must be a neighbour pixel of the first source, or the same as the
|
||||
* - The second source pixel must be a neighbor pixel of the first source, or the same as the
|
||||
* first source when no second pixel could be found.
|
||||
* - The second source pixel must be a pixel that is painted on by the brush.
|
||||
* - The second source pixel must be the second closest pixel , or the first source
|
||||
|
@ -680,21 +680,21 @@ template<typename T = float> struct AngleFraction {
|
||||
default:
|
||||
BLI_assert_unreachable();
|
||||
}
|
||||
/* Resulting angle should be oscilating in [0..pi/4] range. */
|
||||
/* Resulting angle should be oscillating in [0..pi/4] range. */
|
||||
BLI_assert(a.numerator_ >= 0 && a.numerator_ <= a.denominator_ / 4);
|
||||
T angle = T(M_PI) * (T(a.numerator_) / T(a.denominator_));
|
||||
x = math::cos(angle);
|
||||
y = math::sin(angle);
|
||||
/* Diagonal symetry "unfolding". */
|
||||
/* Diagonal symmetry "unfolding". */
|
||||
if (ELEM(octant, 1, 2)) {
|
||||
std::swap(x, y);
|
||||
}
|
||||
}
|
||||
/* Y axis symetry. */
|
||||
/* Y axis symmetry. */
|
||||
if (octant >= 2) {
|
||||
x = -x;
|
||||
}
|
||||
/* X axis symetry. */
|
||||
/* X axis symmetry. */
|
||||
if (is_negative) {
|
||||
y = -y;
|
||||
}
|
||||
|
@ -90,8 +90,10 @@ template<typename T> inline T floor(const T &a)
|
||||
return std::floor(a);
|
||||
}
|
||||
|
||||
/* Repeats the sawtooth pattern even on negative numbers.
|
||||
* ex: 'mod_periodic(-3, 4) = 1', 'mod(-3, 4)= -3' */
|
||||
/**
|
||||
* Repeats the saw-tooth pattern even on negative numbers.
|
||||
* ex: `mod_periodic(-3, 4) = 1`, `mod(-3, 4)= -3`
|
||||
*/
|
||||
template<typename T> inline T mod_periodic(const T &a, const T &b)
|
||||
{
|
||||
return a - (b * math::floor(a / b));
|
||||
|
@ -1379,8 +1379,8 @@ template<typename MatT> [[nodiscard]] MatT orthogonalize(const MatT &mat, const
|
||||
|
||||
/**
|
||||
* The secondary axis is chosen as follow (X->Y, Y->X, Z->X).
|
||||
* If this axis is coplanar try the third axis.
|
||||
* If also coplanar, make up an axis by shuffling the primary axis coordinates (xyz > yzx).
|
||||
* If this axis is co-planar try the third axis.
|
||||
* If also co-planar, make up an axis by shuffling the primary axis coordinates (XYZ > YZX).
|
||||
*/
|
||||
switch (axis) {
|
||||
case Axis::X:
|
||||
|
@ -271,7 +271,7 @@ TEST(math_rotation_types, AngleFraction)
|
||||
EXPECT_NEAR(angle.cos(), cos((T(M_PI) * i) / 16), 1e-6f);
|
||||
EXPECT_NEAR(angle.sin(), sin((T(M_PI) * i) / 16), 1e-6f);
|
||||
|
||||
/* Ensure symetry. */
|
||||
/* Ensure symmetry. */
|
||||
AngleCartesian angle_opposite(pi + pi * i / 16);
|
||||
EXPECT_EQ(angle.cos(), -angle_opposite.cos());
|
||||
EXPECT_EQ(angle.sin(), -angle_opposite.sin());
|
||||
|
@ -141,6 +141,7 @@ dict_custom = {
|
||||
"instantiable",
|
||||
"instantiation",
|
||||
"instantiations",
|
||||
"interdependencies",
|
||||
"interferences",
|
||||
"interocular",
|
||||
"invariant",
|
||||
|
Loading…
Reference in New Issue
Block a user