|
Blender V5.0
|
Namespaces | |
| namespace | projection |
| namespace | detail |
| namespace | numbers |
| namespace | tests |
Classes | |
| struct | AngleRadianBase |
| struct | AngleCartesianBase |
| struct | AngleFraction |
| struct | AxisAngleBase |
| class | Axis |
| class | AxisSigned |
| struct | CartesianBasis |
| struct | EulerBase |
| struct | EulerXYZBase |
| struct | Euler3Base |
| struct | QuaternionBase |
| struct | DualQuaternionBase |
| struct | AssertUnitEpsilon< QuaternionBase< U > > |
| struct | TypeTraits |
| struct | TypeTraits< float > |
| struct | isect_result |
| struct | AssertUnitEpsilon |
| struct | locus_entry_t |
Typedefs | |
| using | AngleRadian = AngleRadianBase<float> |
| using | AngleCartesian = AngleCartesianBase<float> |
| using | AxisAngle = AxisAngleBase<float, AngleRadianBase<float>> |
| using | AxisAngleCartesian = AxisAngleBase<float, AngleCartesianBase<float>> |
| using | EulerXYZ = EulerXYZBase<float> |
| using | Euler3 = Euler3Base<float> |
Intermediate Types | |
Some functions need to have higher precision than standard floats for some operations. | |
| using | Quaternion = QuaternionBase<float> |
| using | DualQuaternion = DualQuaternionBase<float> |
Enumerations | |
| enum | EulerOrder { XYZ = 1 , XZY , YXZ , YZX , ZXY , ZYX } |
| enum class | InterpWrapMode { Extend , Repeat , Border } |
| enum class | eCubicFilter { BSpline , Mitchell } |
Functions | |
| template<typename T> | |
| T | cos (const AngleRadianBase< T > &a) |
| template<typename T> | |
| T | sin (const AngleRadianBase< T > &a) |
| template<typename T> | |
| T | tan (const AngleRadianBase< T > &a) |
| template<typename T> | |
| T | cos (const AngleCartesianBase< T > &a) |
| template<typename T> | |
| T | sin (const AngleCartesianBase< T > &a) |
| template<typename T> | |
| T | tan (const AngleCartesianBase< T > &a) |
| template<typename T> | |
| T | cos (const AngleFraction< T > &a) |
| template<typename T> | |
| T | sin (const AngleFraction< T > &a) |
| template<typename T> | |
| T | tan (const AngleFraction< T > &a) |
| template<typename T> | |
| bool | is_zero (const T &a) |
| template<typename T> | |
| bool | is_any_zero (const T &a) |
| template<typename T> | |
| T | abs (const T &a) |
| template<typename T> | |
| T | sign (const T &a) |
| template<typename T> | |
| T | min (const T &a, const T &b) |
| template<typename T> | |
| T | max (const T &a, const T &b) |
| template<typename T> | |
| void | max_inplace (T &a, const T &b) |
| template<typename T> | |
| void | min_inplace (T &a, const T &b) |
| template<typename T> | |
| T | clamp (const T &a, const T &min, const T &max) |
| template<typename T> | |
| T | step (const T &edge, const T &value) |
| template<typename T> | |
| T | mod (const T &a, const T &b) |
| template<typename T> | |
| T | safe_mod (const T &a, const T &b) |
| template<typename T> | |
| T | floored_mod (const T &a, const T &b) |
| template<typename T> | |
| T | safe_floored_mod (const T &a, const T &b) |
| template<typename T> | |
| void | min_max (const T &value, T &min, T &max) |
| template<typename T> | |
| T | safe_divide (const T &a, const T &b) |
| template<typename T> | |
| T | floor (const T &a) |
| template<typename T> | |
| T | round (const T &a) |
| template<typename T> | |
| T | mod_periodic (const T &a, const T &b) |
| template<typename T> | |
| T | ceil (const T &a) |
| template<typename T> | |
| T | distance (const T &a, const T &b) |
| template<typename T> | |
| T | fract (const T &a) |
| template<typename T> | |
| T | sqrt (const T &a) |
| template<typename T> | |
| T | rcp (const T &a) |
| template<typename T> | |
| T | safe_rcp (const T &a) |
| template<typename T> | |
| T | cos (const T &a) |
| template<typename T> | |
| T | sin (const T &a) |
| template<typename T> | |
| T | tan (const T &a) |
| template<typename T> | |
| T | acos (const T &a) |
| template<typename T> | |
| T | pow (const T &x, const T &power) |
| template<typename T> | |
| T | safe_pow (const T &x, const T &power) |
| template<typename T> | |
| T | fallback_pow (const T &x, const T &power, const T &fallback) |
| template<typename T> | |
| T | square (const T &a) |
| template<typename T> | |
| T | cube (const T &a) |
| template<typename T> | |
| T | exp (const T &x) |
| template<typename T> | |
| T | safe_acos (const T &a) |
| float | safe_acos_approx (float x) |
| template<typename T> | |
| T | asin (const T &a) |
| template<typename T> | |
| T | atan (const T &a) |
| template<typename T> | |
| T | atan2 (const T &y, const T &x) |
| template<typename T> | |
| T | hypot (const T &y, const T &x) |
| template<typename T, typename FactorT> | |
| T | interpolate (const T &a, const T &b, const FactorT &t) |
| template<typename T> | |
| T | midpoint (const T &a, const T &b) |
| template<eAlpha Alpha> | |
| ColorSceneLinear4f< Alpha > | interpolate (const ColorSceneLinear4f< Alpha > &a, const ColorSceneLinear4f< Alpha > &b, const float t) |
| template<eAlpha Alpha> | |
| ColorSceneLinearByteEncoded4b< Alpha > | interpolate (const ColorSceneLinearByteEncoded4b< Alpha > &a, const ColorSceneLinearByteEncoded4b< Alpha > &b, const float t) |
| float3 | whitepoint_from_temp_tint (float temperature, float tint) |
| bool | whitepoint_to_temp_tint (const float3 &white, float &temperature, float &tint) |
| float3x3 | chromatic_adaption_matrix (const float3 &from_XYZ, const float3 &to_XYZ) |
| std::ostream & | operator<< (std::ostream &stream, EulerOrder order) |
| uint16_t | float_to_half (float v) |
| uint16_t | float_to_half_make_finite (float v) |
| float | half_to_float (uint16_t v) |
| void | float_to_half_array (const float *src, uint16_t *dst, size_t length) |
| void | float_to_half_make_finite_array (const float *src, uint16_t *dst, size_t length) |
| void | half_to_float_array (const uint16_t *src, float *dst, size_t length) |
| void | interpolate_nearest_border_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v) |
| uchar4 | interpolate_nearest_border_byte (const uchar *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_border_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| float4 | interpolate_nearest_border_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v) |
| uchar4 | interpolate_nearest_byte (const uchar *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| float4 | interpolate_nearest_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_wrap_byte (const uchar *buffer, uchar *output, int width, int height, float u, float v) |
| uchar4 | interpolate_nearest_wrap_byte (const uchar *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_wrap_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| float4 | interpolate_nearest_wrap_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_nearest_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v) |
| uchar4 | interpolate_bilinear_border_byte (const uchar *buffer, int width, int height, float u, float v) |
| float4 | interpolate_bilinear_border_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_bilinear_border_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| uchar4 | interpolate_bilinear_byte (const uchar *buffer, int width, int height, float u, float v) |
| float4 | interpolate_bilinear_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_bilinear_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| uchar4 | interpolate_bilinear_wrap_byte (const uchar *buffer, int width, int height, float u, float v) |
| float4 | interpolate_bilinear_wrap_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_bilinear_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v) |
| uchar4 | interpolate_cubic_bspline_byte (const uchar *buffer, int width, int height, float u, float v) |
| float4 | interpolate_cubic_bspline_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_cubic_bspline_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| void | interpolate_cubic_bspline_wrapmode_fl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v) |
| uchar4 | interpolate_cubic_mitchell_byte (const uchar *buffer, int width, int height, float u, float v) |
| float4 | interpolate_cubic_mitchell_fl (const float *buffer, int width, int height, float u, float v) |
| void | interpolate_cubic_mitchell_fl (const float *buffer, float *output, int width, int height, int components, float u, float v) |
| void | transform_normals (const float3x3 &transform, MutableSpan< float3 > normals) |
| void | transform_normals (Span< float3 > src, const float3x3 &transform, MutableSpan< float3 > dst) |
| void | transform_points (const float4x4 &transform, MutableSpan< float3 > points, bool use_threading=true) |
| void | transform_points (Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst, bool use_threading=true) |
| float3 | rotate_direction_around_axis (const float3 &direction, const float3 &axis, float angle) |
| float3 | rotate_around_axis (const float3 &vector, const float3 ¢er, const float3 &axis, float angle) |
| template<typename T, int Size> | |
| bool | almost_equal_relative (const VecBase< T, Size > &a, const VecBase< T, Size > &b, const T &epsilon_factor) |
| template<typename T, int Size> | |
| VecBase< T, Size > | abs (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | sign (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | min (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | min (Span< VecBase< T, Size > > values) |
| template<typename T, int Size> | |
| VecBase< T, Size > | min (std::initializer_list< VecBase< T, Size > > values) |
| template<typename T, int Size> | |
| VecBase< T, Size > | max (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | max (Span< VecBase< T, Size > > values) |
| template<typename T, int Size> | |
| VecBase< T, Size > | max (std::initializer_list< VecBase< T, Size > > values) |
| template<typename T, int Size> | |
| VecBase< T, Size > | clamp (const VecBase< T, Size > &a, const VecBase< T, Size > &min, const VecBase< T, Size > &max) |
| template<typename T, int Size> | |
| VecBase< T, Size > | clamp (const VecBase< T, Size > &a, const T &min, const T &max) |
| template<typename T, int Size> | |
| VecBase< T, Size > | step (const VecBase< T, Size > &edge, const VecBase< T, Size > &value) |
| template<typename T, int Size> | |
| VecBase< T, Size > | step (const T &edge, const VecBase< T, Size > &value) |
| template<typename T, int Size> | |
| VecBase< T, Size > | mod (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | mod (const VecBase< T, Size > &a, const T &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_mod (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_mod (const VecBase< T, Size > &a, const T &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | floored_mod (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | floored_mod (const VecBase< T, Size > &a, const T &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | pow (const VecBase< T, Size > &x, const T &y) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_pow (const VecBase< T, Size > &x, const T &y) |
| template<typename T, int Size> | |
| VecBase< T, Size > | fallback_pow (const VecBase< T, Size > &x, const T &y, const VecBase< T, Size > &fallback) |
| template<typename T, int Size> | |
| VecBase< T, Size > | pow (const VecBase< T, Size > &x, const VecBase< T, Size > &y) |
| template<typename T, int Size> | |
| VecBase< T, Size > | square (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | exp (const VecBase< T, Size > &x) |
| template<typename T, int Size> | |
| VecBase< T, Size > | ceil_to_multiple (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | divide_ceil (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| void | min_max (const VecBase< T, Size > &vector, VecBase< T, Size > &min, VecBase< T, Size > &max) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_divide (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_divide (const VecBase< T, Size > &a, const T &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | floor (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | round (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | ceil (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | sqrt (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_sqrt (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | rcp (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | safe_rcp (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| VecBase< T, Size > | fract (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | dot (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| T | length_manhattan (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | length_squared (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | length (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| bool | is_unit_scale (const VecBase< T, Size > &v) |
| template<typename T, int Size> | |
| T | distance_manhattan (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| T | distance_squared (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| T | distance (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | reflect (const VecBase< T, Size > &incident, const VecBase< T, Size > &normal) |
| template<typename T, int Size> | |
| VecBase< T, Size > | refract (const VecBase< T, Size > &incident, const VecBase< T, Size > &normal, const T &eta) |
| template<typename T, int Size> | |
| VecBase< T, Size > | project (const VecBase< T, Size > &p, const VecBase< T, Size > &v_proj) |
| template<typename T, int Size> | |
| VecBase< T, Size > | normalize_and_get_length (const VecBase< T, Size > &v, T &out_length) |
| template<typename T, int Size> | |
| VecBase< T, Size > | normalize (const VecBase< T, Size > &v) |
| template<typename T> | |
| T | cross (const VecBase< T, 2 > &a, const VecBase< T, 2 > &b) |
| template<typename T> | |
| VecBase< T, 3 > | cross (const VecBase< T, 3 > &a, const VecBase< T, 3 > &b) |
| VecBase< float, 3 > | cross_high_precision (const VecBase< float, 3 > &a, const VecBase< float, 3 > &b) |
| template<typename T> | |
| VecBase< T, 3 > | cross_poly (Span< VecBase< T, 3 > > poly) |
| template<typename T> | |
| VecBase< T, 3 > | cross_tri (const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3) |
| template<typename T> | |
| VecBase< T, 3 > | normal_tri (const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3) |
| template<typename T, typename FactorT, int Size> | |
| VecBase< T, Size > | interpolate (const VecBase< T, Size > &a, const VecBase< T, Size > &b, const FactorT &t) |
| template<typename T, int Size> | |
| VecBase< T, Size > | midpoint (const VecBase< T, Size > &a, const VecBase< T, Size > &b) |
| template<typename T, int Size> | |
| VecBase< T, Size > | faceforward (const VecBase< T, Size > &vector, const VecBase< T, Size > &incident, const VecBase< T, Size > &reference) |
| template<typename T> | |
| int | dominant_axis (const VecBase< T, 3 > &a) |
| template<typename T, int Size> | |
| T | reduce_max (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | reduce_min (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | reduce_add (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | reduce_mul (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| T | average (const VecBase< T, Size > &a) |
| template<typename T> | |
| VecBase< T, 3 > | orthogonal (const VecBase< T, 3 > &v) |
| template<typename T> | |
| VecBase< T, 2 > | orthogonal (const VecBase< T, 2 > &v) |
| template<typename T, int Size> | |
| bool | is_equal (const VecBase< T, Size > &a, const VecBase< T, Size > &b, const T epsilon=T(0)) |
| template<typename T, int Size> | |
| bool | is_zero (const VecBase< T, Size > &a, const T epsilon=T(0)) |
| template<typename T, int Size> | |
| bool | is_any_zero (const VecBase< T, Size > &a) |
| template<typename T, int Size> | |
| bool | is_unit (const VecBase< T, Size > &a, const T epsilon=T(10) *std::numeric_limits< T >::epsilon()) |
| template<typename T, int Size> | |
| isect_result< VecBase< T, Size > > | isect_seg_seg (const VecBase< T, Size > &v1, const VecBase< T, Size > &v2, const VecBase< T, Size > &v3, const VecBase< T, Size > &v4) |
| template<typename T> | |
| uint64_t | vector_hash (const T &vec) |
| std::ostream & | operator<< (std::ostream &stream, const Axis axis) |
| std::ostream & | operator<< (std::ostream &stream, const AxisSigned axis) |
| std::ostream & | operator<< (std::ostream &stream, const CartesianBasis &rot) |
| BLI_INLINE int | wrap_coord (float u, int size, InterpWrapMode wrap) |
| template<enum eCubicFilter filter> | |
| static float4 | cubic_filter_coefficients (float f) |
| template<typename T, eCubicFilter filter> | |
| BLI_INLINE void | bicubic_interpolation (const T *src_buffer, T *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_u, InterpWrapMode wrap_v) |
| BLI_INLINE void | bilinear_fl_impl (const float *buffer, float *output, int width, int height, int components, float u, float v, InterpWrapMode wrap_x, InterpWrapMode wrap_y) |
| template<bool border> | |
| BLI_INLINE uchar4 | bilinear_byte_impl (const uchar *buffer, int width, int height, float u, float v) |
| template<typename T> | |
| bool | is_similarity_transform (const MatBase< T, 3, 3 > &matrix, const T &epsilon=1e-6) |
| static bool | skip_transform (const float4x4 &transform) |
| static void | transform_points_no_threading (const Span< float3 > src, const float4x4 &transform, MutableSpan< float3 > dst) |
| static void | transform_points_no_threading (const float4x4 &transform, MutableSpan< float3 > points) |
| template<> | |
| isect_result< float2 > | isect_seg_seg (const float2 &v1, const float2 &v2, const float2 &v3, const float2 &v4) |
| template<> | |
| isect_result< double2 > | isect_seg_seg (const double2 &v1, const double2 &v2, const double2 &v3, const double2 &v4) |
Conversion to Quaternions | |
| template<typename T, typename AngleT> | |
| QuaternionBase< T > | to_quaternion (const AxisAngleBase< T, AngleT > &axis_angle) |
| template<typename T> | |
| QuaternionBase< T > | to_quaternion (const EulerXYZBase< T > &eul) |
| template<typename T> | |
| QuaternionBase< T > | to_quaternion (const Euler3Base< T > &eulO) |
Conversion to Euler | |
| template<typename T, typename AngleT> | |
| Euler3Base< T > | to_euler (const AxisAngleBase< T, AngleT > &axis_angle, EulerOrder order) |
| template<typename T, typename AngleT> | |
| EulerXYZBase< T > | to_euler (const AxisAngleBase< T, AngleT > &axis_angle) |
| template<typename T, typename AngleT = AngleRadian> | |
| AxisAngleBase< T, AngleT > | to_axis_angle (const QuaternionBase< T > &quat) |
| template<typename T> | |
| EulerXYZBase< T > | to_euler (const QuaternionBase< T > &quat) |
| template<typename T> | |
| Euler3Base< T > | to_euler (const QuaternionBase< T > &quat, EulerOrder order) |
Axes | |
| constexpr bool | operator<= (const Axis::Value a, const Axis::Value b) |
| constexpr bool | operator<= (const AxisSigned::Value a, const AxisSigned::Value b) |
Axes Utilities | |
| template<> | |
| AxisSigned | abs (const AxisSigned &axis) |
| int | sign (const AxisSigned &axis) |
| AxisSigned | cross (const AxisSigned a, const AxisSigned b) |
| template<typename T> | |
| T | to_vector (const Axis axis) |
| template<typename T> | |
| T | to_vector (const AxisSigned axis) |
CartesianBasis | |
| CartesianBasis | from_orthonormal_axes (const AxisSigned forward, const AxisSigned up) |
| CartesianBasis | rotation_between (const CartesianBasis &a, const CartesianBasis &b) |
| CartesianBasis | rotation_between (const AxisSigned a_forward, const AxisSigned b_forward) |
| template<typename T> | |
| VecBase< T, 3 > | transform_point (const CartesianBasis &basis, const VecBase< T, 3 > &v) |
| CartesianBasis | invert (const CartesianBasis &basis) |
Conversion to axis angles | |
| template<typename T, typename AngleT = AngleRadian> | |
| AxisAngleBase< T, AngleT > | to_axis_angle (const EulerXYZBase< T > &euler) |
| template<typename T, typename AngleT = AngleRadian> | |
| AxisAngleBase< T, AngleT > | to_axis_angle (const Euler3Base< T > &euler) |
Matrix Operations | |
| template<typename T, int Size> | |
| MatBase< T, Size, Size > | invert (const MatBase< T, Size, Size > &mat, bool &r_success) |
| template<typename T, int NumCol, int NumRow> | |
| MatBase< T, NumCol, NumRow > | transpose (const MatBase< T, NumRow, NumCol > &mat) |
| template<typename T, int NumCol, int NumRow> | |
| MatBase< T, NumCol, NumRow > | normalize (const MatBase< T, NumCol, NumRow > &a) |
| template<typename T, int NumCol, int NumRow, typename VectorT> | |
| MatBase< T, NumCol, NumRow > | normalize_and_get_size (const MatBase< T, NumCol, NumRow > &a, VectorT &r_size) |
| template<typename T, int Size> | |
| T | determinant (const MatBase< T, Size, Size > &mat) |
| template<typename T, int Size> | |
| MatBase< T, Size, Size > | adjoint (const MatBase< T, Size, Size > &mat) |
| template<typename T, int NumCol, int NumRow, typename VectorT> | |
| MatBase< T, NumCol, NumRow > | translate (const MatBase< T, NumCol, NumRow > &mat, const VectorT &translation) |
| template<typename T, int NumCol, int NumRow, typename RotationT> | |
| MatBase< T, NumCol, NumRow > | rotate (const MatBase< T, NumCol, NumRow > &mat, const RotationT &rotation) |
| template<typename T, int NumCol, int NumRow, typename VectorT> | |
| MatBase< T, NumCol, NumRow > | scale (const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale) |
| template<typename T, int NumCol, int NumRow> | |
| MatBase< T, NumCol, NumRow > | interpolate_linear (const MatBase< T, NumCol, NumRow > &a, const MatBase< T, NumCol, NumRow > &b, T t) |
| template<typename T> | |
| MatBase< T, 3, 3 > | interpolate (const MatBase< T, 3, 3 > &a, const MatBase< T, 3, 3 > &b, T t) |
| template<typename T> | |
| MatBase< T, 4, 4 > | interpolate (const MatBase< T, 4, 4 > &a, const MatBase< T, 4, 4 > &b, T t) |
| template<typename T> | |
| MatBase< T, 3, 3 > | interpolate_fast (const MatBase< T, 3, 3 > &a, const MatBase< T, 3, 3 > &b, T t) |
| template<typename T> | |
| MatBase< T, 4, 4 > | interpolate_fast (const MatBase< T, 4, 4 > &a, const MatBase< T, 4, 4 > &b, T t) |
| template<typename T, int Size> | |
| MatBase< T, Size, Size > | pseudo_invert (const MatBase< T, Size, Size > &mat, T epsilon=1e-8) |
Init helpers. | |
| template<typename MatT> | |
| MatT | from_location (const typename MatT::loc_type &location) |
| template<typename MatT, int ScaleDim> | |
| MatT | from_scale (const VecBase< typename MatT::base_type, ScaleDim > &scale) |
| template<typename MatT, typename RotationT> | |
| MatT | from_rotation (const RotationT &rotation) |
| template<typename MatT, typename RotationT, typename VectorT> | |
| MatT | from_rot_scale (const RotationT &rotation, const VectorT &scale) |
| template<typename MatT, typename RotationT> | |
| MatT | from_loc_rot (const typename MatT::loc_type &location, const RotationT &rotation) |
| template<typename MatT, int ScaleDim> | |
| MatT | from_loc_scale (const typename MatT::loc_type &location, const VecBase< typename MatT::base_type, ScaleDim > &scale) |
| template<typename MatT, typename RotationT, int ScaleDim> | |
| MatT | from_loc_rot_scale (const typename MatT::loc_type &location, const RotationT &rotation, const VecBase< typename MatT::base_type, ScaleDim > &scale) |
| template<typename T> | |
| MatBase< T, 2, 2 > | from_direction (const VecBase< T, 2 > &direction) |
| template<typename MatT, typename VectorT> | |
| MatT | from_orthonormal_axes (const VectorT forward, const VectorT up) |
| template<typename MatT, typename VectorT> | |
| MatT | from_orthonormal_axes (const VectorT location, const VectorT forward, const VectorT up) |
| template<typename MatT, typename VectorT> | |
| MatT | from_up_axis (const VectorT up) |
| template<typename MatT> | |
| MatT | orthogonalize (const MatT &mat, const Axis axis) |
| template<typename MatT, typename VectorT> | |
| MatT | from_origin_transform (const MatT &transform, const VectorT origin) |
Conversion function. | |
| template<typename T> | |
| AngleRadianBase< T > | to_angle (const MatBase< T, 2, 2 > &mat) |
| template<typename T> | |
| EulerXYZBase< T > | to_euler (const MatBase< T, 3, 3 > &mat) |
| template<typename T> | |
| EulerXYZBase< T > | to_euler (const MatBase< T, 4, 4 > &mat) |
| template<typename T> | |
| Euler3Base< T > | to_euler (const MatBase< T, 3, 3 > &mat, EulerOrder order) |
| template<typename T> | |
| Euler3Base< T > | to_euler (const MatBase< T, 4, 4 > &mat, EulerOrder order) |
| template<typename T> | |
| EulerXYZBase< T > | to_nearest_euler (const MatBase< T, 3, 3 > &mat, const EulerXYZBase< T > &reference) |
| template<typename T> | |
| EulerXYZBase< T > | to_nearest_euler (const MatBase< T, 4, 4 > &mat, const EulerXYZBase< T > &reference) |
| template<typename T> | |
| Euler3Base< T > | to_nearest_euler (const MatBase< T, 3, 3 > &mat, const Euler3Base< T > &reference) |
| template<typename T> | |
| Euler3Base< T > | to_nearest_euler (const MatBase< T, 4, 4 > &mat, const Euler3Base< T > &reference) |
| template<typename T> | |
| QuaternionBase< T > | to_quaternion (const MatBase< T, 3, 3 > &mat) |
| template<typename T> | |
| QuaternionBase< T > | to_quaternion (const MatBase< T, 4, 4 > &mat) |
| Quaternion | to_quaternion_legacy (const float3x3 &mat) |
| template<bool AllowNegativeScale = false, typename T, int NumCol, int NumRow> | |
| VecBase< T, 3 > | to_scale (const MatBase< T, NumCol, NumRow > &mat) |
| template<bool AllowNegativeScale = false, typename T> | |
| VecBase< T, 2 > | to_scale (const MatBase< T, 2, 2 > &mat) |
| template<bool AllowNegativeScale = false, typename T> | |
| void | to_rot_scale (const MatBase< T, 2, 2 > &mat, AngleRadianBase< T > &r_rotation, VecBase< T, 2 > &r_scale) |
| template<bool AllowNegativeScale = false, typename T> | |
| void | to_loc_rot_scale (const MatBase< T, 3, 3 > &mat, VecBase< T, 2 > &r_location, AngleRadianBase< T > &r_rotation, VecBase< T, 2 > &r_scale) |
| template<bool AllowNegativeScale = false, typename T, typename RotationT> | |
| void | to_rot_scale (const MatBase< T, 3, 3 > &mat, RotationT &r_rotation, VecBase< T, 3 > &r_scale) |
| template<bool AllowNegativeScale = false, typename T, typename RotationT> | |
| void | to_loc_rot_scale (const MatBase< T, 4, 4 > &mat, VecBase< T, 3 > &r_location, RotationT &r_rotation, VecBase< T, 3 > &r_scale) |
Transform functions. | |
| template<typename T> | |
| VecBase< T, 2 > | transform_point (const MatBase< T, 2, 2 > &mat, const VecBase< T, 2 > &point) |
| template<typename T> | |
| VecBase< T, 2 > | transform_point (const MatBase< T, 3, 3 > &mat, const VecBase< T, 2 > &point) |
| template<typename T> | |
| VecBase< T, 3 > | transform_point (const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &point) |
| template<typename T> | |
| VecBase< T, 3 > | transform_point (const MatBase< T, 4, 4 > &mat, const VecBase< T, 3 > &point) |
| template<typename T> | |
| VecBase< T, 3 > | transform_direction (const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &direction) |
| template<typename T> | |
| VecBase< T, 3 > | transform_direction (const MatBase< T, 4, 4 > &mat, const VecBase< T, 3 > &direction) |
| template<typename MatT, typename VectorT> | |
| VectorT | project_point (const MatT &mat, const VectorT &point) |
| template<typename T> | |
| VecBase< T, 3 > | transform_point (const QuaternionBase< T > &q, const VecBase< T, 3 > &v) |
Compare / Test | |
| template<typename T> | |
| bool | is_negative (const MatBase< T, 3, 3 > &mat) |
| template<typename T> | |
| bool | is_negative (const MatBase< T, 4, 4 > &mat) |
| template<typename T, int NumCol, int NumRow> | |
| bool | is_equal (const MatBase< T, NumCol, NumRow > &a, const MatBase< T, NumCol, NumRow > &b, const T epsilon=T(0)) |
| template<typename T, int NumCol, int NumRow> | |
| bool | is_identity (const MatBase< T, NumCol, NumRow > &mat) |
| template<typename MatT> | |
| bool | is_orthogonal (const MatT &mat) |
| template<typename MatT> | |
| bool | is_orthonormal (const MatT &mat) |
| template<typename MatT> | |
| bool | is_uniformly_scaled (const MatT &mat) |
| template<typename T, int NumCol, int NumRow> | |
| bool | is_zero (const MatBase< T, NumCol, NumRow > &mat) |
Implementation. | |
| template<typename T, int NumCol, int NumRow> | |
| bool | is_unit_scale (const MatBase< T, NumCol, NumRow > &m) |
| template<typename T, int Size> | |
| MatBase< T, Size, Size > | invert (const MatBase< T, Size, Size > &mat) |
| template<typename T, int NumCol, int NumRow, typename AngleT> | |
| MatBase< T, NumCol, NumRow > | rotate (const MatBase< T, NumCol, NumRow > &mat, const AxisAngleBase< T, AngleT > &rotation) |
| template<typename T, int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment> | |
| MatBase< T, NumCol, NumRow > | normalize (const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > &a) |
| template<typename T, int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment, typename VectorT> | |
| MatBase< T, NumCol, NumRow > | normalize_and_get_size (const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > &a, VectorT &r_size) |
| template<typename T> | |
| QuaternionBase< T > | normalized_to_quaternion_safe (const MatBase< T, 3, 3 > &mat) |
| template<bool AllowNegativeScale, typename T, typename RotationT> | |
| void | to_loc_rot_scale_safe (const MatBase< T, 4, 4 > &mat, VecBase< T, 3 > &r_location, RotationT &r_rotation, VecBase< T, 3 > &r_scale) |
| template<typename T, int N, int NumRow> | |
| VecBase< T, N > | project_point (const MatBase< T, N+1, NumRow > &mat, const VecBase< T, N > &point) |
| template float3 | transform_point (const float3x3 &mat, const float3 &point) |
| template float3 | transform_point (const float4x4 &mat, const float3 &point) |
| template float3 | transform_direction (const float3x3 &mat, const float3 &direction) |
| template float3 | transform_direction (const float4x4 &mat, const float3 &direction) |
| template float3 | project_point (const float4x4 &mat, const float3 &point) |
| template float2 | project_point (const float3x3 &mat, const float2 &point) |
Quaternion functions. | |
| template<typename T> | |
| T | dot (const QuaternionBase< T > &a, const QuaternionBase< T > &b) |
| template<typename T> | |
| QuaternionBase< T > | pow (const QuaternionBase< T > &q, const T &y) |
| template<typename T> | |
| QuaternionBase< T > | conjugate (const QuaternionBase< T > &a) |
| template<typename T> | |
| QuaternionBase< T > | canonicalize (const QuaternionBase< T > &q) |
| template<typename T> | |
| QuaternionBase< T > | invert (const QuaternionBase< T > &q) |
| template<typename T> | |
| QuaternionBase< T > | invert_normalized (const QuaternionBase< T > &q) |
| template<typename T> | |
| QuaternionBase< T > | normalize (const QuaternionBase< T > &q) |
| template<typename T> | |
| QuaternionBase< T > | normalize_and_get_length (const QuaternionBase< T > &q, T &out_length) |
| template<typename T> | |
| QuaternionBase< T > | interpolate (const QuaternionBase< T > &a, const QuaternionBase< T > &b, T t) |
Test functions. | |
| template<typename T> | |
| bool | is_zero (const QuaternionBase< T > &q) |
| template<typename T> | |
| bool | is_equal (const QuaternionBase< T > &a, const QuaternionBase< T > &b, const T epsilon=T(0)) |
| template<typename T> | |
| bool | is_unit_scale (const QuaternionBase< T > &q) |
Quaternion | |
| template<typename T> | |
| VecBase< T, 2 > | interpolate_dot_slerp (const T t, const T cosom) |
Dual-Quaternion | |
| template<typename T> | |
| DualQuaternionBase< T > | normalize (const DualQuaternionBase< T > &dual_quat) |
| template<typename T> | |
| VecBase< T, 3 > | transform_point (const DualQuaternionBase< T > &dq, const VecBase< T, 3 > &point, MatBase< T, 3, 3 > *r_crazy_space_mat=nullptr) |
| template<typename T> | |
| DualQuaternionBase< T > | to_dual_quaternion (const MatBase< T, 4, 4 > &mat, const MatBase< T, 4, 4 > &basemat) |
| template<typename T> | |
| bool | is_normalized (const DualQuaternionBase< T > &dq) |
Rotation helpers | |
| template<typename T, typename RotT> | |
| QuaternionBase< T > | rotate (const QuaternionBase< T > &a, const RotT &b) |
| template<typename T, typename RotT, typename AngleT> | |
| AxisAngleBase< T, AngleT > | rotate (const AxisAngleBase< T, AngleT > &a, const RotT &b) |
| template<typename T, typename RotT> | |
| EulerXYZBase< T > | rotate (const EulerXYZBase< T > &a, const RotT &b) |
| template<typename T, typename RotT> | |
| Euler3Base< T > | rotate (const Euler3Base< T > &a, const RotT &b) |
| template<typename T> | |
| QuaternionBase< T > | rotation_between (const QuaternionBase< T > &a, const QuaternionBase< T > &b) |
| template<typename T> | |
| QuaternionBase< T > | from_triangle (const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3, const VecBase< T, 3 > &normal) |
| template<typename T> | |
| QuaternionBase< T > | from_triangle (const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3) |
| template<typename T> | |
| QuaternionBase< T > | from_vector (const VecBase< T, 3 > &vector, const AxisSigned track_flag, const Axis up_flag) |
| template<typename T> | |
| QuaternionBase< T > | from_tracking (AxisSigned forward_axis, Axis up_axis) |
| template<typename T> | |
| MatBase< T, 3, 3 > | to_gimbal_axis (const Euler3Base< T > &rotation) |
Angles | |
| template<typename T> | |
| AngleRadianBase< T > | angle_of (const QuaternionBase< T > &q) |
| template<typename T> | |
| AngleRadianBase< T > | angle_of_signed (const QuaternionBase< T > &q) |
| template<typename T> | |
| AngleRadianBase< T > | angle_between (const QuaternionBase< T > &a, const QuaternionBase< T > &b) |
| template<typename T> | |
| AngleRadianBase< T > | angle_between (const VecBase< T, 3 > &a, const VecBase< T, 3 > &b) |
| template<typename T> | |
| AngleFraction< T > | angle_between (const AxisSigned a, const AxisSigned b) |
| template<typename T> | |
| AngleRadianBase< T > | angle_between_signed (const QuaternionBase< T > &a, const QuaternionBase< T > &b) |
Conversion from Cartesian Basis | |
| template<typename T> | |
| QuaternionBase< T > | to_quaternion (const CartesianBasis &rotation) |
Explicit Template Instantiations | |
| template EulerXYZ | to_euler (const AxisAngle &) |
| template EulerXYZ | to_euler (const AxisAngleCartesian &) |
| template EulerXYZ | to_euler (const Quaternion &) |
| template Euler3 | to_euler (const AxisAngle &, EulerOrder) |
| template Euler3 | to_euler (const AxisAngleCartesian &, EulerOrder) |
| template Euler3 | to_euler (const Quaternion &, EulerOrder) |
| template Quaternion | to_quaternion (const AxisAngle &) |
| template Quaternion | to_quaternion (const AxisAngleCartesian &) |
| template Quaternion | to_quaternion (const Euler3 &) |
| template Quaternion | to_quaternion (const EulerXYZ &) |
| template AxisAngleCartesian | to_axis_angle (const Euler3 &) |
| template AxisAngleCartesian | to_axis_angle (const EulerXYZ &) |
| template AxisAngleCartesian | to_axis_angle (const Quaternion &) |
Determinant | |
| template float | determinant (const float2x2 &mat) |
| template float | determinant (const float3x3 &mat) |
| template float | determinant (const float4x4 &mat) |
| template double | determinant (const double2x2 &mat) |
| template double | determinant (const double3x3 &mat) |
| template double | determinant (const double4x4 &mat) |
| template bool | is_negative (const float3x3 &mat) |
| template bool | is_negative (const float4x4 &mat) |
| template bool | is_negative (const double3x3 &mat) |
| template bool | is_negative (const double4x4 &mat) |
Adjoint | |
| template float2x2 | adjoint (const float2x2 &mat) |
| template float3x3 | adjoint (const float3x3 &mat) |
| template float4x4 | adjoint (const float4x4 &mat) |
| template double2x2 | adjoint (const double2x2 &mat) |
| template double3x3 | adjoint (const double3x3 &mat) |
| template double4x4 | adjoint (const double4x4 &mat) |
Inverse | |
| template float2x2 | invert (const float2x2 &mat, bool &r_success) |
| template float3x3 | invert (const float3x3 &mat, bool &r_success) |
| template float4x4 | invert (const float4x4 &mat, bool &r_success) |
| template double2x2 | invert (const double2x2 &mat, bool &r_success) |
| template double3x3 | invert (const double3x3 &mat, bool &r_success) |
| template double4x4 | invert (const double4x4 &mat, bool &r_success) |
| template float2x2 | pseudo_invert (const float2x2 &mat, float epsilon) |
| template float3x3 | pseudo_invert (const float3x3 &mat, float epsilon) |
| template float4x4 | pseudo_invert (const float4x4 &mat, float epsilon) |
| template double2x2 | pseudo_invert (const double2x2 &mat, double epsilon) |
| template double3x3 | pseudo_invert (const double3x3 &mat, double epsilon) |
| template double4x4 | pseudo_invert (const double4x4 &mat, double epsilon) |
Polar Decomposition | |
| template<typename T> | |
| static void | polar_decompose (const MatBase< T, 3, 3 > &mat3, MatBase< T, 3, 3 > &r_U, MatBase< T, 3, 3 > &r_P) |
Interpolate | |
| template float3x3 | interpolate (const float3x3 &a, const float3x3 &b, float t) |
| template double3x3 | interpolate (const double3x3 &a, const double3x3 &b, double t) |
| template float4x4 | interpolate (const float4x4 &a, const float4x4 &b, float t) |
| template double4x4 | interpolate (const double4x4 &a, const double4x4 &b, double t) |
| template float3x3 | interpolate_fast (const float3x3 &a, const float3x3 &b, float t) |
| template double3x3 | interpolate_fast (const double3x3 &a, const double3x3 &b, double t) |
| template float4x4 | interpolate_fast (const float4x4 &a, const float4x4 &b, float t) |
| template double4x4 | interpolate_fast (const double4x4 &a, const double4x4 &b, double t) |
Variables | |
| template<typename T> | |
| constexpr bool | is_math_float_type = std::is_floating_point_v<T> |
| template<typename T> | |
| constexpr bool | is_math_integral_type = std::is_integral_v<T> |
| static const std::array< locus_entry_t, 31 > | planck_locus |
Definition at line 724 of file BLI_math_angle_types.hh.
Definition at line 723 of file BLI_math_angle_types.hh.
Definition at line 89 of file BLI_math_axis_angle_types.hh.
Definition at line 90 of file BLI_math_axis_angle_types.hh.
Definition at line 317 of file BLI_math_quaternion_types.hh.
| using blender::math::Euler3 = Euler3Base<float> |
Definition at line 436 of file BLI_math_euler_types.hh.
| using blender::math::EulerXYZ = EulerXYZBase<float> |
Definition at line 435 of file BLI_math_euler_types.hh.
| using blender::math::Quaternion = QuaternionBase<float> |
Definition at line 316 of file BLI_math_quaternion_types.hh.
|
strong |
| Enumerator | |
|---|---|
| BSpline | |
| Mitchell | |
Definition at line 69 of file math_interp.cc.
| Enumerator | |
|---|---|
| XYZ | |
| XZY | |
| YXZ | |
| YZX | |
| ZXY | |
| ZYX | |
Definition at line 40 of file BLI_math_euler_types.hh.
|
strong |
Texture coordinate wrapping mode.
| Enumerator | |
|---|---|
| Extend | Image edges are extended outside the image, i.e. sample coordinates are clamped to the edge. |
| Repeat | Image repeats, i.e. sample coordinates are wrapped around. |
| Border | Samples outside the image return transparent black. |
Definition at line 34 of file BLI_math_interp.hh.
|
inline |
Definition at line 201 of file BLI_math_basis_types.hh.
References blender::math::AxisSigned::axis().
Definition at line 33 of file BLI_math_base.hh.
References T.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_cpu(), almost_equal_relative(), blender::math::AngleCartesianBase< float >::AngleCartesianBase(), blender::apply_stroke_transform(), blender::nodes::node_composite_boxmask_cc::box_mask(), blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::ed::sculpt_paint::filter::calc_sphere_translations(), blender::bke::pbvh::pixels::CopyPixelCommand::can_be_extended(), blender::nodes::node_composite_chroma_matte_cc::chroma_matte(), blender::ed::curves::clamp_to_zero(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost_cpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_depth_cpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_cpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_maximum_diameter_of_circle_of_confusion(), blender::nodes::node_composite_vec_blur_cc::compute_motion_rect(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::compute_piecewise_linear_falloff(), convexhull_2d_angle_iter_init(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), blender::imbuf::transform::edge_aa(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_cpu(), blender::geometry::extend_curve_curved(), blender::find_envelope(), blender::compositor::find_scale_factor(), blender::ed::spreadsheet::format_matrix_to_grid(), from_orthonormal_axes(), blender::ed::greasepencil::generate_arc_from_point_to_point(), generate_vert_coordinates(), blender::get_factor_from_draw_speed(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::get_morphological_distance_threshold_radius(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::get_structuring_element_size(), blender::compositor::horizontal_pass_cpu(), blender::compositor::horizontal_pass_gpu(), blender::draw::overlay::FlatObjectRef::if_flat_axis_orthogonal_to_view(), interpolate_dot_slerp(), is_equal(), is_equal(), is_equal(), blender::nodes::node_composite_vec_blur_cc::is_inside_motion_line(), is_orthogonal(), is_orthonormal(), is_similarity_transform(), is_uniformly_scaled(), is_unit(), is_unit_scale(), is_unit_scale(), is_zero(), length_manhattan(), mod_periodic(), blender::compositor::morphological_distance(), blender::compositor::morphological_distance_gpu(), blender::nodes::node_composite_diff_matte_cc::node_build_multi_function(), blender::ed::sculpt_paint::brushes::clay_strips::node_in_box(), blender::math::detail::normalized_to_quat_fast(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), project_point(), blender::seq::query_thumbnail(), blender::nodes::node_fn_integer_math_cc::safe_divide_round_i(), blender::ed::sculpt_paint::greasepencil::simplify_opacities(), blender::Bounds< T >::size(), blender::compositor::SMAABlendingWeightCalculationPS(), blender::compositor::SMAADecodeDiagBilinearAccess(), blender::compositor::SMAADecodeDiagBilinearAccess(), blender::compositor::SMAALumaEdgeDetectionPS(), blender::nodes::node_composite_glare_cc::GlareOperation::smooth_min(), blender::ed::transform::snap_object_context_runtime_init(), blender::compositor::spectral_bokeh(), blender::eevee::IrradianceBake::surfels_create(), blender::math::QuaternionBase< T >::swing(), blender::compositor::vertical_pass_cpu(), and blender::compositor::vertical_pass_gpu().
|
inlinenodiscard |
Definition at line 38 of file BLI_math_vector.hh.
Definition at line 189 of file BLI_math_base.hh.
References T.
Referenced by blender::noise::compute_3d_orientation(), interpolate_dot_slerp(), and safe_acos().
|
nodiscard |
Returns the adjoint of the matrix (also known as adjugate matrix).
Definition at line 165 of file math_matrix.cc.
References determinant(), T, and blender::unroll().
|
inlinenodiscard |
Returns true if the given vectors are equal within the given epsilon. The epsilon is scaled for each component by magnitude of the matching component of a.
Definition at line 25 of file BLI_math_vector.hh.
References abs(), b, distance(), i, and T.
Referenced by blender::bke::CurvesGeometry::evaluated_tangents().
|
nodiscard |
Definition at line 163 of file BLI_math_rotation.hh.
References abs, b, blender::math::AngleFraction< T >::identity(), and blender::math::AngleFraction< T >::pi().
|
nodiscard |
Extract angle between 2 orientations. For Quaternion, the returned angle is in [0..2pi] range. For other types, the returned angle is in [0..pi] range. See angle_of for more detail.
Definition at line 150 of file BLI_math_rotation.hh.
References angle_of(), b, and rotation_between().
Referenced by blender::ed::sculpt_paint::greasepencil::compute_auto_flip(), blender::geometry::extend_curve_curved(), blender::math::tests::TEST(), and blender::bke::pbvh::uv_islands::UVBorderCorner::uv().
|
nodiscard |
Definition at line 156 of file BLI_math_rotation.hh.
References b, BLI_assert, dot(), is_unit_scale(), and safe_acos().
|
nodiscard |
Extract angle between 2 orientations. Returned angle is in [-pi..pi] range. See angle_of_signed for more detail.
Definition at line 180 of file BLI_math_rotation.hh.
References angle_of_signed(), b, and rotation_between().
Referenced by blender::math::tests::TEST().
|
nodiscard |
Extract rotation angle from a unit quaternion. Returned angle is in [0..2pi] range.
Unlike the angle between vectors, this does NOT return the shortest angle. See angle_of_signed below for this.
Definition at line 123 of file BLI_math_rotation.hh.
References BLI_assert, is_unit_scale(), safe_acos(), T, and blender::math::QuaternionBase< T >::w.
Referenced by angle_between(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), blender::math::tests::TEST(), and blender::nodes::node_geo_transform_geometry_cc::use_translate().
|
nodiscard |
Extract rotation angle from a unit quaternion. Always return the shortest angle. Returned angle is in [-pi..pi] range.
angle_of with quaternion can exceed PI radians. Having signed versions of these functions allows to use 'abs(angle_of_signed(...))' to get the shortest angle between quaternions with higher precision than subtracting 2pi afterwards.
Definition at line 137 of file BLI_math_rotation.hh.
References BLI_assert, is_unit_scale(), safe_acos(), T, and blender::math::QuaternionBase< T >::w.
Referenced by angle_between_signed(), and blender::math::tests::TEST().
Definition at line 253 of file BLI_math_base.hh.
References T.
Definition at line 258 of file BLI_math_base.hh.
References T.
Referenced by blender::tests::TEST().
Definition at line 263 of file BLI_math_base.hh.
Referenced by blender::math::AngleRadianBase< float >::AngleRadianBase(), blender::compositor::bokeh(), blender::nodes::node_composite_chroma_matte_cc::chroma_matte(), from_triangle(), blender::noise::gabor(), blender::noise::gabor(), blender::ed::greasepencil::generate_arc_from_point_to_point(), blender::ed::greasepencil::grease_pencil_primitive_rotate_all_update(), blender::math::detail::normalized_to_eul2(), blender::math::detail::normalized_to_eul2(), blender::math::AngleCartesianBase< float >::operator float(), blender::bke::greasepencil::Drawing::set_texture_matrices(), to_quaternion_legacy(), and blender::write_fill_transforms().
|
inlinenodiscard |
Definition at line 723 of file BLI_math_vector.hh.
References reduce_add(), and T.
Referenced by blender::ed::greasepencil::create_curves_outline(), blender::ed::greasepencil::image_render::create_shader_ubo(), blender::ed::greasepencil::image_render::draw_circles(), blender::ed::sculpt_paint::grease_pencil_fill_extension_lines_from_circles(), blender::io::grease_pencil::shape_attributes_to_curves(), and blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform().
| BLI_INLINE void blender::math::bicubic_interpolation | ( | const T * | src_buffer, |
| T * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v, | ||
| InterpWrapMode | wrap_u, | ||
| InterpWrapMode | wrap_v ) |
Definition at line 152 of file math_interp.cc.
References BLI_assert, BLI_INLINE, Border, copy_v2_v2(), copy_v3_v3(), copy_v4_v4(), cubic_filter_coefficients(), data, Extend, filter, float, floor, i, max(), min(), Mitchell, out, output, T, v, w(), and wrap_coord().
Referenced by interpolate_cubic_bspline_byte(), interpolate_cubic_bspline_fl(), interpolate_cubic_bspline_fl(), interpolate_cubic_bspline_wrapmode_fl(), interpolate_cubic_mitchell_byte(), interpolate_cubic_mitchell_fl(), and interpolate_cubic_mitchell_fl().
| BLI_INLINE uchar4 blender::math::bilinear_byte_impl | ( | const uchar * | buffer, |
| int | width, | ||
| int | height, | ||
| float | u, | ||
| float | v ) |
Definition at line 418 of file math_interp.cc.
References b, BLI_assert, BLI_INLINE, clamp(), floorf, and v.
Referenced by interpolate_bilinear_border_byte(), and interpolate_bilinear_byte().
| BLI_INLINE void blender::math::bilinear_fl_impl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v, | ||
| InterpWrapMode | wrap_x, | ||
| InterpWrapMode | wrap_y ) |
Definition at line 287 of file math_interp.cc.
References b, BLI_assert, BLI_INLINE, Border, clamp(), copy_vn_fl(), floored_fmod(), floorf, output, Repeat, and v.
Referenced by interpolate_bilinear_border_fl(), interpolate_bilinear_border_fl(), interpolate_bilinear_fl(), interpolate_bilinear_fl(), interpolate_bilinear_wrap_fl(), and interpolate_bilinear_wrapmode_fl().
|
inlinenodiscard |
Negate the quaternion if real component (w) is negative.
Definition at line 227 of file BLI_math_quaternion.hh.
References T, and blender::math::QuaternionBase< T >::w.
Referenced by blender::math::QuaternionBase< T >::swing(), blender::math::tests::TEST(), blender::math::QuaternionBase< T >::twist(), and blender::math::QuaternionBase< T >::twist_angle().
Definition at line 138 of file BLI_math_base.hh.
References T.
Referenced by blender::bke::compositor::add_passes_used_by_cryptomatte_node(), blender::seq::apply_word_wrapping(), BKE_tracking_distortion_bounds_deltas(), blender::seq::calc_boundbox(), ceil(), blender::nodes::node_composite_blur_cc::BlurOperation::compute_extended_boundary_size(), blender::nodes::node_composite_vec_blur_cc::compute_motion_rect(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::deform_drawing(), blender::ed::vse::draw_strip_thumbnails(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_pass_cpu(), blender::geometry::extend_curve_curved(), blender::geometry::extend_curve_straight(), blender::geometry::extend_curves(), blender::seq::final_image_cache_invalidate_frame_range(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_iterations(), blender::nodes::node_composite_cryptomatte_cc::CryptoMatteOperation::get_layers_from_render(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::get_morphological_distance_threshold_radius(), blender::image_engine::ScreenTileTextures< Divisions >::gpu_texture_size(), blender::TimeMapping::local_frame_after_scene_frame(), blender::eevee::Film::overscan_pixels_get(), blender::geometry::sample_curve_padded(), blender::TimeMapping::scene_frame_after_local_frame(), blender::compositor::SymmetricBlurWeights::SymmetricBlurWeights(), blender::compositor::SymmetricSeparableBlurWeights::SymmetricSeparableBlurWeights(), blender::table_sample(), and blender::nodes::node_composite_vec_blur_cc::velocity_atomic_max_value().
|
inlinenodiscard |
Definition at line 364 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and ceil().
|
inlinenodiscard |
Returns a if it is a multiple of b or the next multiple or b after a . In other words, it is equivalent to divide_ceil(a, b) * b. It is undefined if a is negative or b is not strictly positive.
Definition at line 296 of file BLI_math_vector.hh.
References b, BLI_assert, i, and result.
Referenced by blender::eevee::DepthOfField::sync(), blender::eevee::HiZBuffer::sync(), and blender::tests::TEST().
| float3x3 blender::math::chromatic_adaption_matrix | ( | const float3 & | from_XYZ, |
| const float3 & | to_XYZ ) |
Definition at line 884 of file math_color.cc.
References from_scale(), and invert().
Referenced by blender::ocio::calculate_white_point_matrix(), blender::nodes::node_composite_colorbalance_cc::get_white_point_matrix(), and blender::nodes::node_composite_colorbalance_cc::white_point_variable().
Definition at line 69 of file BLI_math_base.hh.
References max(), min(), and T.
Referenced by blender::nodes::node_composite_alpha_over_cc::alpha_over(), blender::nodes::node_composite_alpha_over_cc::alpha_over_conjoint(), blender::nodes::node_composite_alpha_over_cc::alpha_over_disjoint(), blender::seq::HueCorrectApplyOp::apply(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::apply_weight_to_point(), bilinear_byte_impl(), bilinear_fl_impl(), blender::nodes::node_composite_boxmask_cc::box_mask(), blender::imbuf::transform::calc_coverage(), blender::calc_min_radius_v3v3(), blender::nodes::node_shader_radial_tiling_cc::RoundedPolygonFunction::call(), blender::nodes::node_shader_tex_gradient_cc::GradientFunction::call(), blender::nodes::node_shader_tex_noise_cc::NoiseFunction::call(), clamp(), clamp(), blender::seq::clamp_rect(), blender::ed::sculpt_paint::color::color_filter_task(), blender::nodes::node_composite_crop_cc::CropOperation::compute_cropping_bounds(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_scale_cpu(), blender::compositor::compute_marker_points(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_cpu(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_cpu(), blender::create_envelope_stroke_for_point(), blender::deform_drawing(), blender::nodes::node_composite_vec_blur_cc::depth_compare(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::color::do_paint_brush_task(), do_version_glare_node_options_to_inputs(), blender::draw::drw_particle_get_hair_source(), blender::nodes::node_composite_ellipsemask_cc::ellipse_mask(), blender::nodes::node_composite_time_curves_cc::TimeCurveOperation::execute(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_cpu(), blender::geometry::extend_curve_curved(), blender::seq::fill_rect_alpha_under(), blender::ed::greasepencil::fit_strokes_to_view(), blender::ed::vse::ScopeHistogram::float_to_bin(), blender::seq::freeze_key_pair_create(), blender::noise::gabor(), blender::noise::gabor(), blender::ed::greasepencil::get_active_frame_for_falloff(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_black_level(), blender::get_build_factor(), blender::nodes::node_composite_bokehimage_cc::BokehImageOperation::get_catadioptric_size(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_center(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::get_chromatic_adaptation(), blender::nodes::node_composite_glare_cc::GlareOperation::get_color_modulation(), blender::nodes::node_composite_bokehimage_cc::BokehImageOperation::get_color_shift(), blender::nodes::node_composite_antialiasing_cc::AntiAliasingOperation::get_corner_rounding(), blender::seq::get_default_fac_fade(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_despill_balance(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::get_eccentricity(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_edge_tolerance(), blender::get_factor_from_draw_speed(), blender::nodes::node_composite_glare_cc::GlareOperation::get_fade(), blender::nodes::node_composite_bokehimage_cc::BokehImageOperation::get_flaps(), blender::ed::greasepencil::trim::get_intersection_distance_of_segments(), blender::nodes::node_composite_glare_cc::GlareOperation::get_jitter_factor(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_key_balance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::get_light_adaptation(), blender::nodes::node_composite_mask_cc::MaskOperation::get_motion_blur_samples(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::get_motion_blur_samples(), blender::nodes::node_composite_mask_cc::MaskOperation::get_motion_blur_shutter(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::get_motion_blur_shutter(), blender::nodes::node_fn_bit_math_cc::get_multi_function(), blender::nodes::node_sh_mix_cc::get_multi_function(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::get_neighbor_threshold(), blender::nodes::node_composite_glare_cc::GlareOperation::get_number_of_iterations(), blender::nodes::node_composite_glare_cc::GlareOperation::get_number_of_streaks(), MovieIndex::get_pts(), blender::nodes::node_composite_bokehimage_cc::BokehImageOperation::get_roundness(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_samples(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::get_samples_count(), MovieIndex::get_seek_pos_dts(), MovieIndex::get_seek_pos_pts(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::get_sharpness(), blender::nodes::node_composite_glare_cc::GlareOperation::get_size(), blender::nodes::node_composite_keyingscreen_cc::KeyingScreenOperation::get_smoothness(), blender::nodes::node_composite_antialiasing_cc::AntiAliasingOperation::get_threshold(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_translation_amount(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_white_level(), blender::ed::space_node::gizmo_node_split_prop_matrix_set(), blender::nodes::node_composite_huecorrect_cc::hue_correct(), imb_working_space_convert(), blender::seq::initialize_shadow_alpha(), blender::eevee::Instance::Instance(), interpolate_nearest_byte(), interpolate_nearest_fl(), blender::ed::curves::pen_tool::line_segment_closest_point(), blender::compositor::Result::load_pixel_extended(), blender::nodes::node_composite_luma_matte_cc::node_build_multi_function(), blender::nodes::node_composite_posterize_cc::node_build_multi_function(), blender::nodes::node_composite_rgb_curves_cc::node_build_multi_function(), blender::ed::sculpt_paint::node_in_sphere(), blender::ed::greasepencil::normalize_vertex_weights_try(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), openexr_jpg_like_quality_to_dwa_quality(), paint_sample_color(), blender::nodes::node_composite_alpha_over_cc::preprocess_foreground(), blender::imbuf::transform::process_scanlines(), project_face_pixel(), project_paint_PickColor(), blender::ed::greasepencil::randomize_opacity(), blender::seq::retiming_add_transition(), blender::geometry::ReverseUVSampler::sample(), blender::ed::vse::sequencer_draw_scopes(), blender::ed::vse::sequencer_generic_invoke_xy_guess_channel(), blender::io::fbx::set_bsdf_color_param(), blender::io::fbx::set_bsdf_float_param(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_composite_vec_blur_cc::spread_compare(), blender::seq::strip_channel_set(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::greasepencil::weight_sample_invoke(), whitepoint_from_temp_tint(), wrap_coord(), blender::nodes::node_composite_glare_cc::GlareOperation::write_glare_output_cpu(), blender::io::ply::write_vertices(), and blender::write_weights_for_drawing().
|
inlinenodiscard |
Return the conjugate of the given quaternion. If the quaternion q represent the rotation from A to B, then the conjugate of q represents the rotation from B to A.
Definition at line 221 of file BLI_math_quaternion.hh.
References blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
Referenced by from_triangle(), invert(), invert_normalized(), blender::math::tests::TEST(), to_quaternion_legacy(), and transform_point().
| T blender::math::cos | ( | const AngleCartesianBase< T > & | a | ) |
Definition at line 697 of file BLI_math_angle_types.hh.
References blender::math::AngleCartesianBase< T >::cos(), and T.
| T blender::math::cos | ( | const AngleFraction< T > & | a | ) |
Definition at line 710 of file BLI_math_angle_types.hh.
| T blender::math::cos | ( | const AngleRadianBase< T > & | a | ) |
Definition at line 684 of file BLI_math_angle_types.hh.
References cos, blender::math::AngleRadianBase< T >::radian(), and T.
Referenced by blender::math::AngleRadianBase< float >::AngleRadianBase(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::noise::compute_2d_gabor_kernel(), blender::noise::compute_3d_gabor_kernel(), blender::noise::compute_3d_orientation(), blender::compositor::compute_denominator_1(), blender::compositor::compute_denominator_2(), blender::compositor::compute_denominator_3(), blender::compositor::compute_numerator_1(), blender::compositor::compute_numerator_2(), blender::compositor::compute_numerator_3(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_streak_direction(), blender::bke::tests::GreasePencilInterpolate::create_test_shape(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_cpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_cpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_cpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_cpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_gpu(), blender::workbench::filter_blackman_harris(), blender::math::detail::from_rotation(), from_triangle(), blender::ed::greasepencil::generate_arc_from_point_to_point(), blender::ed::greasepencil::generate_circle_from_point(), blender::ed::greasepencil::generate_corner(), blender::compositor::get_regular_polygon_vertex_position(), blender::ed::greasepencil::grease_pencil_primitive_rotate_all_update(), blender::workbench::SceneResources::load_jitter_tx(), blender::math::AngleFraction< T >::operator AngleCartesianBase< T >(), pow(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::draw::overlay::ring_vertices(), blender::ed::sculpt_paint::greasepencil::rotate_by_angle(), blender::rotate_by_angle(), blender::draw::statvis_calc_thickness(), blender::tests::TEST(), to_quaternion(), to_quaternion(), to_quaternion_legacy(), and blender::write_fill_transforms().
Definition at line 174 of file BLI_math_base.hh.
References T.
|
inlinenodiscard |
Returns the cross direction from two basis direction using the right hand rule. This is much faster than true cross product if the vectors are basis vectors. Any ill-formed case will return a orthogonal axis to a but will also trigger an assert. It is better to filter these cases upstream.
Definition at line 217 of file BLI_math_basis_types.hh.
References abs, b, BLI_assert_msg, blender::math::AxisSigned::next_after(), blender::math::AxisSigned::X_NEG, blender::math::AxisSigned::X_POS, blender::math::AxisSigned::Y_NEG, blender::math::AxisSigned::Y_POS, blender::math::AxisSigned::Z_NEG, and blender::math::AxisSigned::Z_POS.
Referenced by blender::ed::sculpt_paint::boundary::bend_data_init_bmesh(), blender::ed::sculpt_paint::boundary::bend_data_init_grids(), blender::ed::sculpt_paint::boundary::bend_data_init_mesh(), BKE_multires_construct_tangent_matrix(), blender::bke::build_point_matrix(), blender::ed::sculpt_paint::brushes::clay_strips::calc_local_matrix(), blender::bke::curves::poly::calculate_next_normal(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::bke::mesh::corner_fan_space_define(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), blender::deform_drawing(), blender::bke::curves::poly::direction_bisect(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_nudge_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::brushes::do_thumb_brush(), blender::bke::subdiv::eval_limit_point_and_normal(), blender::geometry::extend_curve_curved(), from_orthonormal_axes(), from_vector(), blender::generate_curves(), gizmo_ruler_draw(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::draw::overlay::FlatObjectRef::if_flat_axis_orthogonal_to_view(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::brushes::clay_strips::node_in_box(), rotate_direction_around_axis(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::draw::overlay::ShapeCache::ShapeCache(), and blender::ed::transform::transform_mesh_edge_slide_data_create().
|
inlinenodiscard |
Definition at line 543 of file BLI_math_vector.hh.
|
inlinenodiscard |
Definition at line 557 of file BLI_math_vector.hh.
References b.
|
inlinenodiscard |
Same as cross(a, b) but use double float precision for the computation.
Definition at line 565 of file BLI_math_vector.hh.
Referenced by blender::nodes::node_fn_align_euler_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_auto_pivot(), damptrack_do_transform(), and blender::nodes::try_dispatch_float_math_fl3_fl3_to_fl3().
|
inlinenodiscard |
| poly | Array of points around a polygon. They don't have to be co-planar. |
Definition at line 578 of file BLI_math_vector.hh.
References i.
Referenced by get_dupliface_transform_from_coords().
|
inlinenodiscard |
Return normal vector to a triangle. The result is not normalized and can be degenerate.
Definition at line 606 of file BLI_math_vector.hh.
Referenced by normal_tri().
Definition at line 214 of file BLI_math_base.hh.
References T.
Referenced by blender::compositor::compute_fog_glow_kernel_value(), and blender::eevee::LightProbeModule::end_sync().
|
static |
Definition at line 76 of file math_interp.cc.
References BSpline, filter, and Mitchell.
Referenced by bicubic_interpolation().
| template double blender::math::determinant | ( | const double2x2 & | mat | ) |
| template double blender::math::determinant | ( | const double3x3 & | mat | ) |
| template double blender::math::determinant | ( | const double4x4 & | mat | ) |
|
nodiscard |
Returns the determinant of the matrix. It can be interpreted as the signed volume (or area) of the unit cube after transformation.
Definition at line 131 of file math_matrix.cc.
References blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr(), and T.
Referenced by BKE_volume_grid_transform_valid(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::bke::tests::EXPECT_M3_ORTHOGONAL(), IMB_colormanagement_working_space_convert(), blender::nodes::node_fn_matrix_determinant_cc::node_build_multi_function(), blender::math::detail::normalized_to_quat_with_checks(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::geometry::transform_volume(), and blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform().
Definition at line 143 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_cpu(), blender::length_parameterize::accumulate_lengths(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::active_smoothing(), blender::nodes::node_composite_glare_cc::GlareOperation::adaptive_smooth_clamp(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::add_point_under_brush_to_brush_buffer(), almost_equal_relative(), blender::ed::sculpt_paint::greasepencil::brush_point_influence(), blender::geometry::build_point_to_sample_map(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::ed::sculpt_paint::trim::calc_expand_factor(), blender::seq::calc_wipe_blend(), blender::bke::curves::bezier::calculate_aligned_handle(), blender::ed::space_node::calculate_inner_link_bezier_points(), blender::ed::sculpt_paint::greasepencil::closest_distance_to_surface_2d(), blender::ed::sculpt_paint::cloth::cloth_brush_add_length_constraint(), blender::ed::sculpt_paint::cloth::cloth_brush_simulation_falloff_get(), blender::ed::sculpt_paint::mask::color_delta_get(), blender::nodes::node_composite_color_matte_cc::color_matte(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost_cpu(), blender::nodes::node_composite_double_edge_mask_cc::DoubleEdgeMaskOperation::compute_gradient_cpu(), blender::nodes::node_composite_lensdist_cc::compute_number_of_integration_steps(), blender::ed::sculpt_paint::ScaleCurvesEffect::compute_poly_curve_length(), blender::geometry::curve_constraints::compute_segment_lengths(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::ed::transform::curves::curve_connected_point_distances(), blender::ed::transform::curves::cyclic_curve_connected_point_distances(), blender::deform_drawing(), blender::nodes::node_composite_distance_matte_cc::distance_key(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::ed::sculpt_paint::boundary::edit_data_init_bmesh(), blender::ed::sculpt_paint::boundary::edit_data_init_grids(), blender::ed::sculpt_paint::boundary::edit_data_init_mesh(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams_cpu(), blender::meshintersect::fill_crossdata_for_intersect(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_cpu(), blender::bke::pbvh::pixels::Rows::filter_pixels_for_closer_examination(), blender::ed::vse::find_closest_cursor_offset(), blender::bke::pbvh::pixels::Rows::find_copy_source(), blender::ed::greasepencil::find_curve_intersections(), blender::find_envelope(), blender::bke::pbvh::pixels::Rows::find_second_source(), blender::ed::space_node::find_socket_at_mouse_y(), blender::ed::space_node::find_visible_center_of_link(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::get_distance_factor(), blender::bke::greasepencil::Layer::get_frame_duration_at(), gizmo_ruler_draw(), blender::ed::sculpt_paint::grease_pencil_fill_event_modal_map(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::ed::sculpt_paint::grease_pencil_fill_modal(), blender::ed::greasepencil::grease_pencil_primitive_update_curves(), blender::ed::sculpt_paint::pose::ik_chain_origin_heads_init(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::intersections_segment_circle_integers(), blender::geometry::limit_radius(), blender::ed::sculpt_paint::mask::mask_by_color_contiguous_mesh(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::modify_geometry_set(), blender::ed::sculpt_paint::move_last_point_and_resample(), blender::ed::space_node::node_find_indicated_socket(), blender::draw::overlay::ForceFields::object_sync(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), blender::ed::sculpt_paint::paint_cursor_cursor_draw_3d_view_brush_cursor_active(), blender::ed::sculpt_paint::paint_cursor_draw_3d_view_brush_cursor_inactive(), blender::geometry::perpendicular_distance(), blender::ed::greasepencil::polyline_fit_curve(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::ed::sculpt_paint::raycast_init(), blender::reorder_strokes(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::dyntopo::sample_detail_voxel(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::eevee::ShadowModule::screen_pixel_radius(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::segment_intersections_and_points_sides(), blender::ed::greasepencil::select_similar_exec(), blender::ed::sculpt_paint::greasepencil::simplify_opacities(), blender::ed::transform::snap_calc_preview_origin(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::ed::greasepencil::subdivide_last_segement(), blender::draw::test_draw_curves_interpolate_position(), blender::length_parameterize::tests::test_uniform_lengths(), blender::ed::sculpt_paint::transform_brush_radius(), blender::ed::transform::transform_mesh_edge_slide_data_create(), blender::ed::transform::transform_mesh_uv_edge_slide_data_create(), blender::ed::sculpt_paint::pose::vert_inside_brush_radius(), blender::noise::voronoi_distance(), blender::noise::voronoi_distance(), blender::noise::voronoi_distance(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_n_sphere_radius(), and blender::noise::voronoi_n_sphere_radius().
|
inlinenodiscard |
Definition at line 480 of file BLI_math_vector.hh.
|
inlinenodiscard |
Definition at line 468 of file BLI_math_vector.hh.
References b, length_manhattan(), and T.
|
inlinenodiscard |
Definition at line 474 of file BLI_math_vector.hh.
References b, length_squared(), and T.
Referenced by blender::ed::greasepencil::add_armature_automatic_weights(), blender::ed::sculpt_paint::cloth::add_constraints_for_verts(), blender::ed::spreadsheet::apply_row_filter(), blender::ed::transform::bm_loop_uv_calc_opposite_co(), blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), blender::ed::sculpt_paint::calc_brush_distances_squared(), blender::ed::sculpt_paint::calc_brush_distances_squared(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::geometry::quad::calc_quad_directions(), blender::ed::sculpt_paint::greasepencil::compute_auto_flip(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::io::fbx::ArmatureImportContext::create_armature_bones(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical(), distfactor_to_bone(), blender::bke::pbvh::edge_queue_tri_in_circle(), blender::bke::pbvh::edge_queue_tri_in_sphere(), blender::ed::sculpt_paint::fake_neighbor_search_bmesh(), blender::ed::sculpt_paint::fake_neighbor_search_grids(), blender::ed::sculpt_paint::fake_neighbor_search_mesh(), blender::meshintersect::fill_crossdata_for_intersect(), blender::find_closest_point(), blender::ed::sculpt_paint::SlideOperationExecutor::find_closest_ray_hit(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::sculpt_paint::geometry_preview_lines_update(), blender::ed::sculpt_paint::boundary::get_closest_boundary_vert_bmesh(), blender::ed::sculpt_paint::boundary::get_closest_boundary_vert_grids(), blender::ed::sculpt_paint::boundary::get_closest_boundary_vert_mesh(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_corners(), blender::ed::greasepencil::grease_pencil_primitive_event_modal_map(), blender::ed::greasepencil::grease_pencil_primitive_mouse_event(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::intersections_segment_circle_integers(), blender::seq::jump_flooding_pass(), layerEqual_propfloat2(), blender::ed::sculpt_paint::nearest_vert_calc_bmesh(), blender::ed::sculpt_paint::nearest_vert_calc_grids(), blender::ed::sculpt_paint::nearest_vert_calc_mesh(), blender::ed::sculpt_paint::node_in_sphere(), blender::bke::pbvh::node_raycast_bmesh(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::paint_smooth_stroke(), blender::ed::curves::pen_tool::pen_find_closest_edge_point(), blender::ed::curves::pen_tool::pen_find_closest_handle(), blender::ed::curves::pen_tool::pen_find_closest_point(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), blender::ed::greasepencil::primitive_check_ui_hover(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::meshintersect::remove_non_constraint_edges_leave_valid_bmesh(), blender::bke::mesh_surface_sample::sample_nearest_weights(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::ed::pointcloud::select_circle(), blender::ed::curves::select_circle_mask(), uv_remove_doubles_to_selected_shared_vertex(), vfont_to_curve(), view3d_ruler_pick(), and blender::math::QuaternionBase< T >::wrapped_around().
|
inlinenodiscard |
Integer division that returns the ceiling, instead of flooring like normal C division. It is undefined if a is negative or b is not strictly positive.
Definition at line 313 of file BLI_math_vector.hh.
References b, BLI_assert, i, and result.
Referenced by blender::nodes::node_composite_displace_cc::DisplaceOperation::compute_anisotropic(), blender::compositor::compute_complete_blocks(), blender::compositor::compute_complete_x_prologues(), blender::compositor::compute_complete_y_prologues(), blender::compositor::compute_dispatch_threads_at_least(), blender::compositor::compute_incomplete_prologues(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::compute_max_tile_velocity(), blender::nodes::node_composite_vec_blur_cc::compute_max_tile_velocity_cpu(), blender::eevee::LightModule::end_sync(), blender::eevee::ShadowModule::end_sync(), blender::eevee::VolumeModule::end_sync(), blender::nodes::node_composite_map_uv_cc::MapUVOperation::execute_cpu_anisotropic(), blender::nodes::node_composite_glare_cc::GlareOperation::get_glare_image_size(), blender::eevee::Film::init(), blender::eevee::VolumeModule::init(), blender::compositor::parallel_reduction_dispatch(), blender::eevee::Precompute::Precompute(), blender::eevee::DepthOfField::render(), blender::eevee::MotionBlurModule::render(), blender::eevee::RayTraceModule::render(), blender::eevee::SubsurfaceModule::render(), blender::ed::vse::sequencer_draw_scopes(), blender::eevee::ShadowModule::set_view(), blender::eevee::VolumeProbeModule::set_view(), blender::eevee::IrradianceBake::surfels_create(), blender::eevee::AmbientOcclusion::sync(), blender::eevee::DepthOfField::sync(), blender::eevee::Film::sync(), blender::eevee::HiZBuffer::sync(), blender::tests::TEST(), and blender::eevee::Film::write_viewport_compositor_passes().
Definition at line 662 of file BLI_math_vector.hh.
Referenced by blender::draw::overlay::Fluids::begin_sync(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), orthogonal(), blender::bke::partition_faces_recursively(), blender::bke::pbvh::pbvh_bmesh_node_limit_ensure_fast(), and blender::bke::pbvh::pbvh_bmesh_node_split().
|
inlinenodiscard |
Dot product between two quaternions. Equivalent to vector dot product. Equivalent to component wise multiplication followed by summation of the result.
Definition at line 197 of file BLI_math_quaternion.hh.
References b, T, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
Referenced by blender::bke::mesh::accumulate_fan_normal(), angle_between(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_mesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::calc_min_radius_v3v3(), blender::ed::sculpt_paint::cloth::calc_perpendicular_pinch_forces(), blender::ed::sculpt_paint::calc_stabilized_plane(), blender::seq::calc_wipe_blend(), blender::ed::transform::calcEdgeSlide_mval_range(), blender::ed::greasepencil::calculate_texture_space(), blender::compositor::closest_point_on_line(), blender::nodes::node_composite_colorcorrection_cc::color_correction(), blender::noise::compute_2d_gabor_kernel(), blender::noise::compute_3d_gabor_kernel(), blender::ed::sculpt_paint::greasepencil::compute_auto_flip(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_classic(), blender::bke::mesh::corner_fan_space_define(), blender::bke::mesh::corner_space_custom_normal_to_data(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::io::fbx::create_transform_curve_data(), blender::nodes::node_composite_vec_blur_cc::dir_compare(), distfactor_to_bone(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::draw::edge_factor_calc(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_lensdist_cc::LensDistortionOperation::execute_horizontal_distortion_cpu(), blender::nodes::node_composite_levels_cc::LevelsOperation::execute_single_value(), faceforward(), blender::find_envelope(), blender::ed::greasepencil::generate_arc_from_point_to_point(), blender::ed::greasepencil::generate_corner(), blender::nodes::node_fn_compare_cc::get_multi_function(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::get_varray_for_context(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::draw::overlay::FlatObjectRef::if_flat_axis_orthogonal_to_view(), blender::meshintersect::in_line< double >(), blender::ed::sculpt_paint::face_set::init_op_exec(), interpolate(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::intersections_segment_circle_integers(), invert(), blender::ed::sculpt_paint::gesture::is_affected(), blender::nodes::node_composite_vec_blur_cc::is_inside_motion_line(), is_orthogonal(), is_similarity_transform(), length_squared(), blender::ed::curves::pen_tool::line_segment_closest_point(), blender::eevee::ForwardPipeline::material_transparent_add(), blender::bke::mesh::mesh_edges_sharp_tag(), blender::nodes::node_composite_diff_matte_cc::node_build_multi_function(), blender::nodes::node_composite_luma_matte_cc::node_build_multi_function(), blender::nodes::node_composite_rgb_to_bw_cc::node_build_multi_function(), blender::ed::sculpt_paint::brushes::clay_strips::node_in_box(), blender::ed::sculpt_paint::auto_mask::normal_calc(), normalize(), normalize_and_get_length(), blender::ed::sculpt_paint::expand::normals_falloff_create(), blender::ed::transform::object_project_all_view3d_ex(), blender::math::DualQuaternionBase< T >::operator+=(), orthogonalize(), blender::geometry::perpendicular_distance(), blender::eevee::ForwardPipeline::prepass_transparent_add(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), project(), blender::ed::sculpt_paint::project_translations(), blender::nodes::node_composite_lensdist_cc::radial_lens_distortion(), reflect(), blender::eevee::PlanarProbe::reflection_clip_plane_get(), refract(), blender::io::grease_pencil::GreasePencilExporter::retrieve_objects(), rotate_direction_around_axis(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::ed::mesh::set_sharpness_by_angle_exec(), blender::eevee::PlanarProbe::set_view(), blender::compositor::SMAALumaEdgeDetectionPS(), blender::compositor::SMAANeighborhoodBlendingPS(), blender::compositor::SMAASearchDiag1(), blender::compositor::SMAASearchDiag2(), blender::ed::transform::snap_object_project_view3d_ex(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::eevee::Light::sync(), blender::math::tests::TEST(), blender::tests::TEST(), blender::ed::transform::transform_mesh_edge_slide_data_create(), blender::ed::transform::transform_mesh_uv_edge_slide_data_create(), blender::ed::transform::VertSlideData::update_active_edges(), blender::draw::overlay::Resources::update_theme_settings(), v3_dist_from_plane(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), and whitepoint_to_temp_tint().
|
inlinenodiscard |
Dot product between two vectors. Equivalent to component wise multiplication followed by summation of the result. Equivalent to the cosine of the angle between the two vectors if the vectors are normalized.
Definition at line 425 of file BLI_math_vector.hh.
Definition at line 219 of file BLI_math_base.hh.
Referenced by blender::noise::compute_2d_gabor_kernel(), blender::noise::compute_3d_gabor_kernel(), blender::compositor::compute_denominator_1(), blender::compositor::compute_denominator_2(), blender::compositor::compute_denominator_3(), blender::compositor::compute_denominator_4(), blender::compositor::compute_fog_glow_kernel_value(), blender::compositor::compute_numerator_1(), blender::compositor::compute_numerator_2(), blender::compositor::compute_numerator_3(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), exp(), half_to_float(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inlinenodiscard |
Definition at line 285 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, exp(), and x.
|
inlinenodiscard |
Return vector if incident and reference are pointing in the same direction.
Definition at line 652 of file BLI_math_vector.hh.
References dot().
|
inline |
Definition at line 204 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_colorcorrection_cc::color_correction(), and fallback_pow().
|
inlinenodiscard |
Return the value of x raised to the y power. The result is the given fallback if x < 0 or if x = 0 and y <= 0.
Definition at line 256 of file BLI_math_vector.hh.
| uint16_t blender::math::float_to_half | ( | float | v | ) |
Float (FP32) <-> Half (FP16) conversion functions.
Behavior matches hardware (x64 F16C, ARM NEON FCVT), including handling of denormals, infinities, NaNs, rounding is to nearest even, etc. When NaNs are produced, the exact bit pattern might not match hardware, but it will still be a NaN.
When compiling for ARM NEON (e.g. Apple Silicon), hardware VCVT instructions are used.
For anything involving more than a handful of numbers, prefer float_to_half_array and half_to_float_array for performance. Converts float (FP32) number to half-precision (FP16).
Definition at line 27 of file math_half.cc.
Referenced by blender::gpu::convert(), blender::gpu::convert(), float_to_half_array(), and float_to_half_make_finite().
| void blender::math::float_to_half_array | ( | const float * | src, |
| uint16_t * | dst, | ||
| size_t | length ) |
Definition at line 238 of file math_half.cc.
References float_to_half(), i, and length().
Referenced by blender::tests::TEST().
| uint16_t blender::math::float_to_half_make_finite | ( | float | v | ) |
Converts float (FP32) number to half-precision (FP16), also ensuring the result is finite.
Changes +/- infinities to +/- maximum value (65504), and NaNs to zeroes.
Definition at line 91 of file math_half.cc.
References float_to_half(), and v.
Referenced by float_to_half_make_finite_array().
| void blender::math::float_to_half_make_finite_array | ( | const float * | src, |
| uint16_t * | dst, | ||
| size_t | length ) |
Definition at line 274 of file math_half.cc.
References float_to_half_make_finite(), i, and length().
Referenced by blender::gpu::convert_buffer(), blender::tests::TEST(), blender::gpu::GLTexture::update_sub(), and blender::gpu::MTLTexture::update_sub().
Definition at line 112 of file BLI_math_base.hh.
References T.
Referenced by BKE_tracking_distortion_bounds_deltas(), blender::nodes::node_shader_map_range_cc::build_vector_stepped(), blender::calculate_repetitions(), blender::noise::compute_2d_gabor_noise(), blender::noise::compute_3d_gabor_noise(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::ed::sculpt_paint::greasepencil::ColorGrid::coords_to_pos(), blender::deform_drawing(), blender::deform_drawing(), blender::geometry::extend_curve_straight(), blender::seq::final_image_cache_invalidate_frame_range(), floor(), blender::noise::floor_fraction(), blender::floored_modulo(), blender::ed::greasepencil::grease_pencil_snap_to_grid_exec(), blender::TimeMapping::local_frame_before_scene_frame(), mod_periodic(), blender::nodes::node_composite_posterize_cc::node_build_multi_function(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::geometry::sample_curve_attribute(), blender::TimeMapping::scene_frame_before_local_frame(), blender::table_sample(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_f1(), blender::noise::voronoi_f1(), blender::noise::voronoi_f1(), blender::noise::voronoi_f2(), blender::noise::voronoi_f2(), blender::noise::voronoi_f2(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_smooth_f1(), blender::noise::voronoi_smooth_f1(), and blender::noise::voronoi_smooth_f1().
|
inlinenodiscard |
Definition at line 352 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and floor().
Definition at line 89 of file BLI_math_base.hh.
Referenced by floored_mod(), and floored_mod().
|
inlinenodiscard |
Definition at line 213 of file BLI_math_vector.hh.
References b, BLI_assert, floored_mod(), i, result, and T.
|
inlinenodiscard |
Definition at line 201 of file BLI_math_vector.hh.
References b, BLI_assert, floored_mod(), i, and result.
Definition at line 148 of file BLI_math_base.hh.
References T.
Referenced by blender::deform_drawing(), blender::deform_drawing(), blender::eevee::VolumeModule::draw_prepass(), fract(), blender::nodes::node_composite_huecorrect_cc::hue_correct(), blender::nodes::node_composite_vec_blur_cc::interleaved_gradient_noise(), blender::nodes::node_composite_hue_sat_val_cc::node_build_multi_function(), and blender::table_sample().
|
inlinenodiscard |
Definition at line 413 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and fract().
|
nodiscard |
Create a rotation matrix with the angle that the given direction makes with the x axis. Assumes the direction vector is normalized.
Definition at line 1477 of file BLI_math_matrix.hh.
References BLI_assert, and is_unit_scale().
Referenced by blender::nodes::node_composite_chroma_matte_cc::chroma_matte().
|
nodiscard |
Create a transform matrix with translation and rotation applied in this order.
Definition at line 1459 of file BLI_math_matrix.hh.
References from_rotation().
Referenced by blender::math::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
nodiscard |
Create a transform matrix with translation, rotation and scale applied in this order.
Definition at line 1447 of file BLI_math_matrix.hh.
References from_rot_scale(), and scale().
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::ed::curves::append_primitive_curve(), blender::apply_stroke_transform(), blender::draw::overlay::Cursor::begin_sync(), blender::seq::calc_strip_transform_matrix(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), blender::nodes::node_composite_stabilize2d_cc::Stabilize2DOperation::execute(), blender::nodes::node_composite_transform_cc::TransformOperation::execute(), blender::bke::attribute_math::float4x4Mixer::finalize(), blender::get_rand_matrix(), interpolate_fast(), blender::bke::greasepencil::Layer::local_transform(), blender::bke::attribute_math::mix3(), blender::bke::attribute_math::mix4(), blender::nodes::node_fn_separate_transform_cc::node_eval_inverse(), blender::nodes::node_geo_transform_geometry_cc::node_geo_exec(), blender::draw::overlay::LightProbes::object_sync(), blender::seq::seq_image_transform_matrix_get_ex(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), blender::imbuf::tests::TEST(), blender::math::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::draw::test_eevee_shadow_tag_update(), and blender::geometry::transform_mesh().
|
nodiscard |
Create a transform matrix with translation and scale applied in this order.
Definition at line 1469 of file BLI_math_matrix.hh.
References from_scale(), and scale().
Referenced by blender::ed::greasepencil::fit_strokes_to_view(), blender::draw::overlay::Fluids::object_sync(), and blender::draw::overlay::GreasePencil::object_sync().
|
nodiscard |
Create a translation only matrix. Matrix dimensions should be at least 4 col x 3 row.
Definition at line 1416 of file BLI_math_matrix.hh.
Referenced by blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::nodes::node_composite_displace_cc::DisplaceOperation::execute(), blender::nodes::node_composite_translate_cc::TranslateOperation::execute(), from_origin_transform(), blender::get_array_matrix(), blender::seq::input_preprocess(), blender::nodes::node_geo_scale_instances_cc::scale_instances(), blender::eevee::VolumeProbeModule::set_view(), blender::tests::TEST(), blender::nodes::node_geo_translate_instances_cc::translate_instances(), and blender::geometry::translate_volume().
|
nodiscard |
Construct a transformation that is pivoted around the given origin point. So for instance, from_origin_transform<MatT>(from_rotation(numbers::pi * 0.5), float2(0.0f, 2.0f)) will construct a transformation representing a 90 degree rotation around the point (0, 2).
Definition at line 1623 of file BLI_math_matrix.hh.
References from_location(), and transform().
Referenced by blender::seq::calc_strip_transform_matrix(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), and blender::seq::seq_image_transform_matrix_get_ex().
|
inlinenodiscard |
Create an CartesianBasis using two orthogonal axes. The third axis is chosen by right hand rule to follow blender coordinate system. forward is Y axis in blender coordinate system. up is Z axis in blender coordinate system.
Definition at line 405 of file BLI_math_basis_types.hh.
References abs(), BLI_assert, and cross.
Referenced by from_orthonormal_axes(), from_tracking(), blender::eevee::IrradianceBake::raylists_build(), rotation_between(), blender::math::tests::TEST(), blender::math::tests::TEST(), and blender::math::tests::TEST().
|
nodiscard |
Create a rotation matrix from 2 basis vectors. The matrix determinant is given to be positive and it can be converted to other rotation types.
Definition at line 1485 of file BLI_math_matrix.hh.
References BLI_assert, cross(), and is_unit_scale().
|
nodiscard |
Create a transform matrix with translation and rotation from 2 basis vectors and a translation.
Definition at line 1501 of file BLI_math_matrix.hh.
References from_orthonormal_axes().
|
nodiscard |
Create a transform matrix with rotation and scale applied in this order.
Definition at line 1441 of file BLI_math_matrix.hh.
References from_rotation(), from_scale(), and scale().
Referenced by from_loc_rot_scale(), interpolate_fast(), and blender::tests::TEST().
|
nodiscard |
Create a rotation only matrix.
Definition at line 1435 of file BLI_math_matrix.hh.
References blender::math::detail::from_rotation().
Referenced by blender::draw::overlay::Cursor::begin_sync(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), blender::nodes::node_composite_rotate_cc::RotateOperation::execute(), blender::geometry::extend_curve_curved(), from_loc_rot(), from_rot_scale(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_delta_translation(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), interpolate(), blender::ed::view3d::geometry_nodes_gizmos::matrix_from_position_and_up_direction(), blender::ed::sculpt_paint::paint_cursor_drawing_setup_cursor_space(), blender::bke::quaternion_to_float4x4(), blender::io::grease_pencil::SVGImporter::read(), rotate(), rotate(), rotate(), blender::nodes::node_geo_rotate_instances_cc::rotate_instances(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), blender::math::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), TEST(), to_dual_quaternion(), to_euler(), to_euler(), to_gimbal_axis(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), and blender::bke::pbvh::uv_islands::UVBorderCorner::uv().
|
nodiscard |
Create a matrix whose diagonal is defined by the given scale vector. If vector dimension is lower than matrix diagonal, the missing terms are filled with ones.
Definition at line 1424 of file BLI_math_matrix.hh.
References BLI_STATIC_ASSERT, i, result, scale(), and blender::unroll().
Referenced by blender::draw::overlay::Cursor::begin_sync(), blender::ed::sculpt_paint::brushes::clay_strips::calc_local_matrix(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), chromatic_adaption_matrix(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), drw_shgroup_bone_custom_empty(), blender::draw::drw_volume_object_mesh_init(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_constant_size(), from_loc_scale(), from_rot_scale(), blender::math::detail::from_rotation(), blender::bke::greasepencil::convert::get_legacy_stroke_to_texture_matrix(), blender::get_mirror_matrix(), blender::bke::greasepencil::get_stroke_to_texture_matrix(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::draw::overlay::Bounds::object_sync(), polar_decompose(), pseudo_invert(), blender::eevee::PlanarProbe::set_view(), blender::eevee::VolumeProbeModule::set_view(), blender::tests::TEST(), blender::tests::TEST(), blender::draw::test_draw_manager_sync(), blender::draw::test_draw_resource_id_gen(), blender::draw::test_draw_visibility(), blender::imbuf::tests::transform_2x_smaller(), blender::imbuf::tests::transform_fractional_larger(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), and blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform().
|
nodiscard |
Returns a quaternion for converting local space to tracking space. This is slightly different than from_axis_conversion for legacy reasons.
Definition at line 351 of file BLI_math_rotation.hh.
References blender::math::AxisSigned::axis(), BLI_assert, from_orthonormal_axes(), rotation_between(), blender::math::AxisSigned::Y_POS, and blender::math::AxisSigned::Z_POS.
|
nodiscard |
Create a orientation from a triangle plane and the axis formed by the segment(v1, v2).
Definition at line 261 of file BLI_math_rotation.hh.
References from_triangle(), normal_tri(), and v2.
|
nodiscard |
Create a orientation from a triangle plane and the axis formed by the segment(v1, v2). Takes pre-computed normal from the triangle. Used for Ngons when their normal is known.
Definition at line 227 of file BLI_math_rotation.hh.
References angle(), atan2(), conjugate(), cos(), is_zero(), nor, normalize, safe_acos(), sin(), T, transform_point(), UNUSED_VARS, and v2.
Referenced by from_triangle(), and blender::math::tests::TEST().
|
nodiscard |
Create a rotation matrix from only one up axis. The other axes are chosen to always be orthogonal. The resulting matrix is a basis matrix.
Definition at line 1511 of file BLI_math_matrix.hh.
References b, BLI_assert, is_unit_scale(), sign(), square(), T, blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by blender::tests::TEST().
|
nodiscard |
Create a rotation from a vector and a basis rotation. Used for tracking. track_flag is supposed to be Object.trackflag up_flag is supposed to be Object.upflag
Definition at line 269 of file BLI_math_rotation.hh.
References angle(), blender::math::Axis::as_int(), blender::math::AxisSigned::axis(), blender::math::AngleCartesianBase< T >::cos(), cross(), e, eps, blender::math::QuaternionBase< T >::identity(), blender::math::AxisSigned::is_negative(), length(), normalize, normalize_and_get_length(), safe_acos(), blender::math::AngleCartesianBase< T >::sin(), T, to_quaternion(), transform_point(), UNLIKELY, blender::math::Axis::X, blender::math::Axis::Y, and blender::math::Axis::Z.
Referenced by blender::math::tests::TEST().
| float blender::math::half_to_float | ( | uint16_t | v | ) |
Converts half-precision (FP16) number to float (FP32).
Definition at line 108 of file math_half.cc.
References exp(), magic(), and v.
Referenced by blender::gpu::convert(), blender::gpu::convert(), half_to_float_array(), ViewportColorSampleSession::sample(), and blender::tests::TEST().
| void blender::math::half_to_float_array | ( | const uint16_t * | src, |
| float * | dst, | ||
| size_t | length ) |
Definition at line 368 of file math_half.cc.
References half_to_float(), i, and length().
Referenced by blender::gpu::convert_buffer(), and blender::tests::TEST().
Definition at line 268 of file BLI_math_base.hh.
Referenced by blender::math::detail::normalized_to_eul2(), and blender::math::detail::normalized_to_eul2().
|
inline |
Definition at line 18 of file BLI_math_color.hh.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, b, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::b, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::g, interpolate(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
|
inline |
Definition at line 29 of file BLI_math_color.hh.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, b, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::b, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::g, interpolate(), and blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r.
| template double3x3 blender::math::interpolate | ( | const double3x3 & | a, |
| const double3x3 & | b, | ||
| double | t ) |
References b, and interpolate().
| template double4x4 blender::math::interpolate | ( | const double4x4 & | a, |
| const double4x4 & | b, | ||
| double | t ) |
References b, and interpolate().
References b, and interpolate().
References b, and interpolate().
|
nodiscard |
A polar-decomposition-based interpolation between matrix A and matrix B.
Based on "Matrix Animation and Polar Decomposition", by Ken Shoemake & Tom Duff
| A | Input matrix which is totally effective with t = 0.0. |
| B | Input matrix which is totally effective with t = 1.0. |
| t | Interpolation factor. |
Definition at line 336 of file math_matrix.cc.
References A, B, from_rotation(), interpolate(), interpolate_linear(), is_negative(), normalize, P, polar_decompose(), T, to_quaternion(), and U.
|
nodiscard |
Complete transform matrix interpolation, based on polar-decomposition-based interpolation from interpolate<T, 3, 3>.
| A | Input matrix which is totally effective with t = 0.0. |
| B | Input matrix which is totally effective with t = 1.0. |
| t | Interpolation factor. |
Definition at line 380 of file math_matrix.cc.
References A, B, interpolate(), result, and T.
|
inlinenodiscard |
Use spherical interpolation between two quaternions. Always interpolate along the shortest angle.
Definition at line 301 of file BLI_math_quaternion.hh.
References b, BLI_assert, dot(), interpolate_dot_slerp(), is_unit_scale(), T, and w().
|
inline |
Definition at line 274 of file BLI_math_base.hh.
Referenced by blender::ed::greasepencil::add_armature_automatic_weights(), blender::nodes::node_composite_alpha_over_cc::alpha_over(), blender::nodes::node_composite_alpha_over_cc::alpha_over_conjoint(), blender::nodes::node_composite_alpha_over_cc::alpha_over_disjoint(), blender::apply_gradient_tint(), blender::seq::MaskSamplerDirectByte::apply_mask(), blender::seq::MaskSamplerDirectFloat::apply_mask(), blender::seq::MaskSamplerTransformedByte::apply_mask(), blender::seq::MaskSamplerTransformedFloat::apply_mask(), blender::apply_uniform_tint(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::apply_weight_to_point(), blender::bke::armature_vert_task_with_mixer(), blender::draw::overlay::Grid::begin_sync(), BKE_paint_randomize_color(), blender::animrig::blend_layer_results(), blender::compositor::bokeh(), blender::calc_min_radius_v3v3(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_radius_with_interpolation(), blender::ed::sculpt_paint::calc_stabilized_plane(), blender::ed::space_node::calculate_inner_link_bezier_points(), blender::bke::curves::bezier::calculate_vector_handle(), blender::nodes::node_composite_colorbalance_cc::color_balance(), blender::nodes::node_composite_colorcorrection_cc::color_correction(), blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_color(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_fog_glow_field_of_view(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_global_adaptation_level(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::compute_inpainting_region_cpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_cpu(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::compute_piecewise_linear_falloff(), blender::ed::greasepencil::control_point_colors_and_sizes(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::geometry::create_nurbs_to_bezier_positions(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc::create_quadratic_bezier_curve(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), distfactor_to_bone(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), DRW_text_edit_mesh_measure_stats(), blender::ed::transform::ElementResize(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_cpu(), blender::nodes::node_composite_filter_cc::FilterOperation::execute_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_anti_diagonal_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_diagonal_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_simple_star_vertical_pass_cpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_single_value(), blender::geometry::extend_curve_straight(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_cpu(), blender::ed::space_node::find_bounds_by_zone_recursive(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::find_envelope(), blender::find_plane_intersection(), blender::ed::space_node::find_visible_center_of_link(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::nodes::node_sh_mix_cc::get_multi_function(), blender::meshintersect::get_next_crossing_from_edge(), blender::nodes::node_composite_keyingscreen_cc::KeyingScreenOperation::get_smoothness(), gizmo_ruler_invoke(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::ed::greasepencil::grease_pencil_vertex_paint_set_exec(), blender::nodes::node_composite_huecorrect_cc::hue_correct(), blender::bke::curves::bezier::insert(), interpolate(), interpolate(), interpolate(), interpolate(), interpolate(), interpolate(), interpolate(), interpolate(), blender::draw::interpolate_face_corner_attribute_to_curve(), interpolate_fast(), interpolate_fast(), interpolate_linear(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), blender::length_parameterize::interpolate_to_masked(), layerCopyValue_propfloat2(), blender::eevee::Instance::light_bake_irradiance(), blender::bke::subdiv::mesh_interpolate_position_on_edge(), blender::bke::mesh_normals_varray(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::bke::attribute_math::mix2(), blender::geometry::mix_arrays(), blender::modify_fill_color(), blender::compositor::morphological_distance_feather_pass(), blender::nodes::node_composite_hue_sat_val_cc::node_build_multi_function(), blender::nodes::node_composite_invert_cc::node_build_multi_function(), blender::nodes::node_composite_rgb_curves_cc::node_build_multi_function(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexSmearOperation::on_stroke_extended(), blender::ed::sculpt_paint::paint_smooth_stroke(), blender::geometry::perpendicular_distance(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), blender::ed::transform::points_build_3x3_grid(), blender::ed::greasepencil::primitive_calulate_curve_positions(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::ed::greasepencil::randomize_opacity(), blender::ed::greasepencil::randomize_radius(), blender::ed::greasepencil::randomize_rotation(), blender::ed::greasepencil::randomize_rotation(), blender::geometry::sample_poly_curve_positions_handles(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::ed::vse::sequencer_draw_scopes(), blender::ed::sculpt_paint::greasepencil::simplify_opacities(), blender::compositor::SMAAMovc(), blender::compositor::SMAAMovc(), blender::ed::sculpt_paint::SmoothOperationExecutor::smooth(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::meshintersect::CDTArrangement< T >::split_edge(), blender::table_sample(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::draw::overlay::Resources::update_theme_settings(), blender::nodes::node_composite_colorbalance_cc::white_point_constant(), whitepoint_from_temp_tint(), whitepoint_to_temp_tint(), and WM_gesture_lasso_modal().
|
inlinenodiscard |
Per component linear interpolation.
| t | interpolation factor. Return a if equal 0. Return b if equal 1. Outside of [0..1] range, use linear extrapolation. |
Definition at line 631 of file BLI_math_vector.hh.
References b.
|
nodiscard |
Bilinear sampling (with black border).
Takes four image samples at floor(u,v) and floor(u,v)+1, and blends them based on fractional parts of u,v. Samples outside the image are turned into transparent black.
Note that you probably want to subtract 0.5 from u,v before this function, to get proper filtering.
Definition at line 561 of file math_interp.cc.
References bilinear_byte_impl(), and v.
Referenced by blender::seq::MaskSamplerTransformedByte::apply_mask(), blender::imbuf::interpolate_bilinear_border_byte(), blender::imbuf::interpolate_bilinear_border_byte(), blender::seq::MaskSamplerTransformedByte::load_mask_min(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
| void blender::math::interpolate_bilinear_border_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v ) |
Definition at line 580 of file math_interp.cc.
References bilinear_fl_impl(), Border, output, and v.
|
nodiscard |
Definition at line 572 of file math_interp.cc.
References bilinear_fl_impl(), Border, and v.
Referenced by blender::seq::MaskSamplerTransformedFloat::apply_mask(), blender::imbuf::interpolate_bilinear_border_fl(), blender::imbuf::interpolate_bilinear_border_fl(), blender::seq::MaskSamplerTransformedFloat::load_mask_min(), blender::compositor::Result::sample_bilinear_zero(), TEST(), TEST(), and TEST().
|
nodiscard |
Bilinear sampling.
Takes four image samples at floor(u,v) and floor(u,v)+1, and blends them based on fractional parts of u,v. Samples outside the image are clamped to texels at image edge.
Note that you probably want to subtract 0.5 from u,v before this function, to get proper filtering.
Definition at line 567 of file math_interp.cc.
References bilinear_byte_impl(), and v.
Referenced by blender::imbuf::interpolate_bilinear_byte(), blender::imbuf::interpolate_bilinear_byte(), and TEST().
| void blender::math::interpolate_bilinear_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v ) |
Definition at line 602 of file math_interp.cc.
References bilinear_fl_impl(), Extend, output, and v.
|
nodiscard |
Definition at line 594 of file math_interp.cc.
References bilinear_fl_impl(), Extend, and v.
Referenced by blender::imbuf::interpolate_bilinear_fl(), blender::imbuf::interpolate_bilinear_fl(), blender::compositor::Result::sample_bilinear_extended(), blender::imbuf::transform::sample_image(), scale_bilinear_func(), and TEST().
|
nodiscard |
Wrapped bilinear sampling. (u,v) is repeated to be inside the image size, including properly wrapping samples that are right on the edges.
Definition at line 629 of file math_interp.cc.
References b, BLI_assert, floored_fmod(), floorf, and v.
Referenced by blender::imbuf::interpolate_bilinear_wrap_byte(), and TEST().
|
nodiscard |
Definition at line 671 of file math_interp.cc.
References bilinear_fl_impl(), Repeat, and v.
Referenced by blender::imbuf::interpolate_bilinear_wrap_fl(), and TEST().
| void blender::math::interpolate_bilinear_wrapmode_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v, | ||
| InterpWrapMode | wrap_u, | ||
| InterpWrapMode | wrap_v ) |
Definition at line 616 of file math_interp.cc.
References bilinear_fl_impl(), output, and v.
Referenced by blender::compositor::Result::sample(), blender::compositor::Result::sample_bilinear_wrap(), blender::imbuf::transform::sample_image(), and TEST().
|
nodiscard |
Cubic B-Spline sampling.
Takes 4x4 image samples at floor(u,v)-1 .. floor(u,v)+2, and blends them based on fractional parts of u,v. Uses B-Spline variant Mitchell-Netravali filter (B=1, C=0), which has no ringing but introduces quite a lot of blur. Samples outside the image are clamped to texels at image edge.
Note that you probably want to subtract 0.5 from u,v before this function, to get proper filtering.
Definition at line 679 of file math_interp.cc.
References bicubic_interpolation(), Extend, and v.
Referenced by blender::imbuf::interpolate_cubic_bspline_byte(), blender::imbuf::interpolate_cubic_bspline_byte(), TEST(), TEST(), and TEST().
| void blender::math::interpolate_cubic_bspline_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v ) |
Definition at line 695 of file math_interp.cc.
References bicubic_interpolation(), Extend, output, and v.
|
nodiscard |
Definition at line 687 of file math_interp.cc.
References bicubic_interpolation(), Extend, and v.
Referenced by blender::imbuf::interpolate_cubic_bspline_fl(), blender::imbuf::interpolate_cubic_bspline_fl(), blender::compositor::Result::sample_cubic_extended(), blender::imbuf::transform::sample_image(), TEST(), and TEST().
| void blender::math::interpolate_cubic_bspline_wrapmode_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v, | ||
| math::InterpWrapMode | wrap_u, | ||
| math::InterpWrapMode | wrap_v ) |
Definition at line 709 of file math_interp.cc.
References bicubic_interpolation(), output, and v.
Referenced by blender::compositor::Result::sample(), blender::compositor::Result::sample_cubic_wrap(), and TEST().
|
nodiscard |
Cubic Mitchell sampling.
Takes 4x4 image samples at floor(u,v)-1 .. floor(u,v)+2, and blends them based on fractional parts of u,v. Uses Mitchell-Netravali filter (B=C=1/3), which has a good compromise between blur and ringing. Samples outside the image are clamped to texels at image edge.
Note that you probably want to subtract 0.5 from u,v before this function, to get proper filtering.
Definition at line 723 of file math_interp.cc.
References bicubic_interpolation(), Extend, and v.
Referenced by blender::imbuf::interpolate_cubic_mitchell_byte(), blender::imbuf::interpolate_cubic_mitchell_byte(), TEST(), TEST(), and TEST().
| void blender::math::interpolate_cubic_mitchell_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v ) |
Definition at line 740 of file math_interp.cc.
References bicubic_interpolation(), Extend, output, and v.
|
nodiscard |
Definition at line 732 of file math_interp.cc.
References bicubic_interpolation(), Extend, and v.
Referenced by blender::imbuf::transform::sample_image(), TEST(), and TEST().
|
inlinenodiscard |
Generic function for implementing slerp (quaternions and spherical vector coords).
| t | factor in [0..1] |
| cosom | dot product from normalized quaternions. |
Definition at line 271 of file BLI_math_quaternion.hh.
References abs(), acos(), BLI_assert, e, eps, IN_RANGE_INCL, LIKELY, sin(), T, and w().
Referenced by interpolate().
| template double3x3 blender::math::interpolate_fast | ( | const double3x3 & | a, |
| const double3x3 & | b, | ||
| double | t ) |
References b, and interpolate_fast().
| template double4x4 blender::math::interpolate_fast | ( | const double4x4 & | a, |
| const double4x4 & | b, | ||
| double | t ) |
References b, and interpolate_fast().
| template float3x3 blender::math::interpolate_fast | ( | const float3x3 & | a, |
| const float3x3 & | b, | ||
| float | t ) |
References b, and interpolate_fast().
| template float4x4 blender::math::interpolate_fast | ( | const float4x4 & | a, |
| const float4x4 & | b, | ||
| float | t ) |
References b, and interpolate_fast().
|
nodiscard |
Naive interpolation implementation, faster than polar decomposition
| A | Input matrix which is totally effective with t = 0.0. |
| B | Input matrix which is totally effective with t = 1.0. |
| t | Interpolation factor. |
Definition at line 397 of file math_matrix.cc.
References b, from_rot_scale(), interpolate(), interpolate_fast(), scale(), T, and to_rot_scale().
Referenced by interpolate_fast(), interpolate_fast(), interpolate_fast(), interpolate_fast(), interpolate_fast(), interpolate_fast(), blender::tests::TEST(), and blender::tests::TEST().
|
nodiscard |
Naive transform matrix interpolation, based on naive-decomposition-based interpolation from interpolate_fast<T, 3, 3>.
| A | Input matrix which is totally effective with t = 0.0. |
| B | Input matrix which is totally effective with t = 1.0. |
| t | Interpolation factor. |
Definition at line 416 of file math_matrix.cc.
References b, from_loc_rot_scale(), interpolate(), interpolate_fast(), scale(), T, and to_loc_rot_scale().
|
nodiscard |
Interpolate each component linearly.
Definition at line 730 of file BLI_math_matrix.hh.
References b, interpolate(), result, T, and blender::unroll().
Referenced by interpolate().
|
inlinenodiscard |
Definition at line 77 of file BLI_math_interp.hh.
References interpolate_nearest_border_byte(), and v.
|
inline |
Nearest (point) sampling (with black border).
Returns texel at floor(u,v) integer index. Samples outside the image are turned into transparent black.
Note that it is not "nearest to u,v coordinate", but rather with fractional part truncated (it would be "nearest" if subtracting 0.5 from input u,v).
Definition at line 57 of file BLI_math_interp.hh.
References BLI_assert, data, output, v, x, and y.
Referenced by blender::imbuf::interpolate_nearest_border_byte(), blender::imbuf::interpolate_nearest_border_byte(), interpolate_nearest_border_byte(), TEST(), and TEST().
|
inline |
Definition at line 85 of file BLI_math_interp.hh.
References BLI_assert, data, i, output, v, x, and y.
Referenced by blender::imbuf::interpolate_nearest_border_fl(), blender::imbuf::interpolate_nearest_border_fl(), interpolate_nearest_border_fl(), blender::imbuf::transform::sample_image(), blender::compositor::Result::sample_nearest_zero(), TEST(), and TEST().
|
inlinenodiscard |
Definition at line 106 of file BLI_math_interp.hh.
References interpolate_nearest_border_fl(), and v.
|
inlinenodiscard |
Definition at line 138 of file BLI_math_interp.hh.
References interpolate_nearest_byte(), and v.
|
inline |
Nearest (point) sampling.
Returns texel at floor(u,v) integer index. Samples outside the image are clamped to texels at image edge.
Note that it is not "nearest to u,v coordinate", but rather with fractional part truncated (it would be "nearest" if subtracting 0.5 from input u,v).
Definition at line 124 of file BLI_math_interp.hh.
References BLI_assert, clamp(), data, output, v, x, and y.
Referenced by interpolate_nearest_byte().
|
inline |
Definition at line 146 of file BLI_math_interp.hh.
References BLI_assert, clamp(), data, i, output, v, x, and y.
Referenced by interpolate_nearest_fl(), and blender::compositor::Result::sample_nearest_extended().
|
inlinenodiscard |
Definition at line 159 of file BLI_math_interp.hh.
References interpolate_nearest_fl(), and v.
|
inlinenodiscard |
Definition at line 188 of file BLI_math_interp.hh.
References interpolate_nearest_wrap_byte(), and v.
|
inline |
Wrapped nearest sampling. (u,v) is repeated to be inside the image size.
Definition at line 171 of file BLI_math_interp.hh.
References BLI_assert, data, floored_fmod(), output, v, x, and y.
Referenced by blender::imbuf::interpolate_nearest_wrap_byte(), and interpolate_nearest_wrap_byte().
|
inline |
Definition at line 196 of file BLI_math_interp.hh.
References BLI_assert, data, floored_fmod(), i, output, v, x, and y.
Referenced by blender::imbuf::interpolate_nearest_wrap_fl(), and interpolate_nearest_wrap_fl().
|
inlinenodiscard |
Definition at line 212 of file BLI_math_interp.hh.
References interpolate_nearest_wrap_fl(), and v.
| void blender::math::interpolate_nearest_wrapmode_fl | ( | const float * | buffer, |
| float * | output, | ||
| int | width, | ||
| int | height, | ||
| int | components, | ||
| float | u, | ||
| float | v, | ||
| InterpWrapMode | wrap_u, | ||
| InterpWrapMode | wrap_v ) |
Definition at line 43 of file math_interp.cc.
References BLI_assert, data, i, output, v, wrap_coord(), x, and y.
Referenced by blender::compositor::Result::sample(), and blender::compositor::Result::sample_nearest_wrap().
|
inlinenodiscard |
Return the inverse transformation represented by the given basis. This is conceptually the equivalent to a rotation matrix transpose, but much faster.
Definition at line 460 of file BLI_math_basis_types.hh.
References blender::math::AxisSigned::axis(), blender::math::AxisSigned::is_negative(), result, blender::math::Axis::X, blender::math::CartesianBasis::x(), blender::math::AxisSigned::X_NEG, blender::math::AxisSigned::X_POS, blender::math::Axis::Y, blender::math::CartesianBasis::y(), blender::math::AxisSigned::Y_NEG, blender::math::AxisSigned::Y_POS, blender::math::Axis::Z, blender::math::CartesianBasis::z(), blender::math::AxisSigned::Z_NEG, and blender::math::AxisSigned::Z_POS.
Referenced by blender::ed::object::apply_objects_internal(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), BKE_grease_pencil_point_coords_apply(), BKE_grease_pencil_point_coords_apply_with_mat4(), blender::ed::sculpt_paint::brushes::clay_strips::calc_local_matrix(), blender::ocio::calculate_white_point_matrix(), blender::nodes::node_fn_invert_matrix_cc::InvertMatrixFunction::call(), chromatic_adaption_matrix(), colormanage_update_matrices(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::seq::CompositorContext::CompositorContext(), blender::draw::View::compute_visibility(), blender::ocio::create_fallback_display_cpu_processor(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::vse::cursor_set_by_mouse_position(), blender::bke::CurvesSurfaceTransforms::CurvesSurfaceTransforms(), blender::eevee::ShadowTileMap::debug_draw(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::io::usd::USDHairWriter::do_write(), blender::eevee::VolumeModule::draw_prepass(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::compositor::RealizeOnDomainOperation::execute(), blender::nodes::node_composite_stabilize2d_cc::Stabilize2DOperation::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::bke::get_armature_deform_params(), blender::get_mirror_matrix(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), blender::draw::grease_pencil_geom_batch_ensure(), blender::draw::gpencil::grease_pencil_layer_cache_add(), blender::ed::greasepencil::grease_pencil_layer_parent_set(), blender::ed::greasepencil::grease_pencil_paste_strokes_exec(), blender::ed::greasepencil::grease_pencil_reproject_exec(), blender::ed::greasepencil::grease_pencil_snap_to_cursor_exec(), blender::ed::greasepencil::grease_pencil_snap_to_grid_exec(), IMB_colormanagement_working_space_check(), IMB_colormanagement_working_space_convert(), imb_colormanagement_working_space_set_from_matrix(), blender::seq::input_preprocess(), invert(), blender::ed::greasepencil::join_object_with_active(), blender::ed::greasepencil::merge_layers(), blender::geometry::merge_layers(), blender::ed::sculpt_paint::brushes::multiplane_scrape_preview_draw(), blender::ed::transform::nearest_world_tree(), blender::nodes::node_fn_invert_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_matrix_multiply_cc::node_eval_inverse(), object_grid_element_to_tangent_displacement(), blender::ed::object::object_origin_set_exec(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), blender::draw::ObjectRef::particles_matrix(), blender::ed::curves::convert_from_particle_system::particles_to_curves(), blender::io::grease_pencil::persmat_from_camera_object(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::transform::raycastMesh(), rotation_between(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::curves::pen_tool::PenToolOperation::screen_to_layer(), blender::ed::sculpt_paint::sculpt_init_mirror_clipping(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), sculpt_update_object(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::eevee::PlanarProbe::set_view(), blender::eevee::VolumeProbeModule::set_view(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::ed::transform::snapCamera(), blender::ed::transform::store_transform_properties(), blender::draw::View::sync(), blender::eevee::Camera::sync(), ObjectMatrices::sync(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::tests::TEST(), to_dual_quaternion(), transform_normals(), transform_normals(), blender::tests::transform_normals_test(), blender::bke::crazyspace::GeometryDeformation::translation_from_deformed_to_original(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::image_engine::OneTexture::update_bounds(), blender::image_engine::ScreenTileTextures< Divisions >::update_bounds(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_transform_and_target_property(), view3d_ruler_item_mousemove(), blender::draw::volume_grid_cache_get(), and workbench_render_to_image().
|
nodiscard |
Definition at line 643 of file BLI_math_matrix.hh.
References invert().
|
nodiscard |
Returns the inverse of a square matrix or zero matrix on failure. r_success is optional and set to true if the matrix was inverted successfully.
Definition at line 203 of file math_matrix.cc.
References blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr(), M, R, and result.
|
inlinenodiscard |
Return invert of q or identity if q is ill-formed. The invert allows quaternion division.
Definition at line 232 of file BLI_math_quaternion.hh.
References conjugate(), dot(), blender::math::QuaternionBase< T >::identity(), length_squared(), and T.
|
inlinenodiscard |
Return invert of q assuming it is a unit quaternion. In this case, the inverse is just the conjugate. conjugate(q) could be use directly, but this function shows the intent better, and asserts if q ever becomes non-unit-length.
Definition at line 242 of file BLI_math_quaternion.hh.
References BLI_assert, conjugate(), and is_unit_scale().
Referenced by blender::math::QuaternionBase< T >::swing(), blender::math::tests::TEST(), and blender::math::QuaternionBase< T >::wrapped_around().
Definition at line 28 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute(), and blender::ed::space_node::node_gizmo_safe_calc_dims().
|
inlinenodiscard |
Returns true if at least one component is exactly equal to 0.
Definition at line 792 of file BLI_math_vector.hh.
|
inlinenodiscard |
Returns true if matrices are equal within the given epsilon.
Definition at line 504 of file BLI_math_matrix.hh.
References abs(), b, i, and T.
Referenced by blender::bke::build_mesh_positions(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), colormanage_update_matrices(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::bke::subdiv::eval_limit_point_and_derivatives(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_cpu(), IMB_colormanagement_working_space_convert(), imb_colormanagement_working_space_set_from_matrix(), SELECTID_Context::is_dirty(), blender::compositor::Domain::is_equal(), blender::geometry::skip_transform(), skip_transform(), blender::tests::TEST(), blender::tests::TEST(), transform_normals(), and transform_normals().
|
inlinenodiscard |
Returns true if the quaternions are equal within the given epsilon. Return false otherwise.
Definition at line 115 of file BLI_math_quaternion.hh.
References abs(), b, T, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
|
inlinenodiscard |
Returns true if the matrix is exactly the identity matrix.
Definition at line 522 of file BLI_math_matrix.hh.
References i.
Referenced by blender::seq::apply_modifier_op().
| template bool blender::math::is_negative | ( | const double3x3 & | mat | ) |
References is_negative().
| template bool blender::math::is_negative | ( | const double4x4 & | mat | ) |
References is_negative().
| template bool blender::math::is_negative | ( | const float3x3 & | mat | ) |
References is_negative().
| template bool blender::math::is_negative | ( | const float4x4 & | mat | ) |
References is_negative().
Returns true if matrix has inverted handedness.
Definition at line 143 of file math_matrix.cc.
References determinant(), is_negative(), and T.
Referenced by interpolate(), is_negative(), is_negative(), is_negative(), is_negative(), is_negative(), is_negative(), blender::geometry::boolean::mesh_bm_concat(), blender::math::detail::normalized_to_quat_fast(), blender::math::AngleFraction< T >::operator AngleCartesianBase< T >(), blender::math::AngleFraction< T >::radian(), blender::tests::TEST(), to_dual_quaternion(), to_rot_scale(), to_rot_scale(), to_scale(), and to_scale().
Definition at line 148 of file math_matrix.cc.
References blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr(), is_negative(), and T.
|
inlinenodiscard |
Returns true if the DualQuaternion has not been mixed with other DualQuaternion and needs no normalization.
Definition at line 286 of file BLI_math_quaternion_types.hh.
References blender::math::DualQuaternionBase< T >::quat_weight, and T.
Referenced by blender::draw::evaluate_vertex_weight(), blender::math::detail::from_rotation(), and transform_point().
|
inlinenodiscard |
Test if the X, Y and Z axes are perpendicular with each other.
Definition at line 537 of file BLI_math_matrix.hh.
Referenced by is_orthonormal(), is_uniformly_scaled(), and blender::tests::TEST().
|
inlinenodiscard |
Test if the X, Y and Z axes are perpendicular with each other and unit length.
Definition at line 554 of file BLI_math_matrix.hh.
References abs(), is_orthogonal(), and length_squared().
Referenced by blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::tests::TEST(), and to_dual_quaternion().
| bool blender::math::is_similarity_transform | ( | const MatBase< T, 3, 3 > & | matrix, |
| const T & | epsilon = 1e-6 ) |
Check that each column is orthogonal to the others, and that each column is the same length. In other words, there is no shear, and any scaling is uniform.
Definition at line 526 of file math_matrix.cc.
References abs(), dot(), e, is_similarity_transform(), length_squared(), and T.
Referenced by is_similarity_transform(), transform_normals(), and transform_normals().
|
inlinenodiscard |
Test if the X, Y and Z axes are perpendicular with each other and the same length.
Definition at line 574 of file BLI_math_matrix.hh.
References abs(), e, eps, is_orthogonal(), length_squared(), T, x, y, and z().
Referenced by blender::tests::TEST().
|
inlinenodiscard |
Return true if the squared length of the vector is (almost) equal to 1 (with a 10 * std::numeric_limits<T>::epsilon() epsilon error by default).
Definition at line 807 of file BLI_math_vector.hh.
References abs(), length(), length_squared(), and T.
Referenced by rotate_direction_around_axis().
|
inlinenodiscard |
Definition at line 632 of file BLI_math_matrix.hh.
References i, and is_unit_scale().
Referenced by angle_between(), angle_of(), angle_of_signed(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::math::DualQuaternionBase< T >::DualQuaternionBase(), blender::math::DualQuaternionBase< T >::DualQuaternionBase(), blender::math::QuaternionBase< T >::expmap(), from_direction(), from_orthonormal_axes(), blender::math::detail::from_rotation(), from_up_axis(), interpolate(), invert_normalized(), is_unit_scale(), blender::ed::view3d::geometry_nodes_gizmos::matrix_from_position_and_up_direction(), blender::math::detail::normalized_to_angle(), blender::math::detail::normalized_to_eul2(), blender::math::detail::normalized_to_eul2(), blender::math::detail::normalized_to_quat_fast(), pow(), reflect(), blender::tests::TEST(), to_axis_angle(), to_euler(), to_euler(), to_quaternion(), transform_point(), and blender::math::QuaternionBase< T >::wrapped_around().
|
inlinenodiscard |
Definition at line 123 of file BLI_math_quaternion.hh.
References abs(), T, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
|
inlinenodiscard |
Return true if each individual column is unit scaled. Mainly for assert usage.
Definition at line 457 of file BLI_math_vector.hh.
References abs(), length_squared(), T, v, and blender::math::AssertUnitEpsilon< T >::value.
|
inline |
Definition at line 588 of file BLI_math_matrix.hh.
|
inlinenodiscard |
Returns true if all components are exactly equal to 0.
Definition at line 106 of file BLI_math_quaternion.hh.
References T, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
Definition at line 23 of file BLI_math_base.hh.
References T.
Referenced by blender::nodes::node_fn_align_euler_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_euler_to_vector_cc::align_rotations_fixed_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_fixed_pivot(), blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::apply_stroke_transform(), blender::ed::sculpt_paint::calc_brush_plane(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::calc_radius_limit(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_grids(), blender::bke::curves::poly::calculate_next_normal(), blender::bke::curves::poly::calculate_normals_minimum(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::nodes::node_fn_combine_transform_cc::CombineTransformFunction::call(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::brushes::do_clay_strips_brush(), blender::ed::sculpt_paint::brushes::do_clay_thumb_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::transform::drawEdgeSlide(), blender::ed::transform::edge_slide_snap_apply(), blender::bke::subdiv::eval_limit_point_and_derivatives(), blender::geometry::extend_curve_straight(), blender::bke::mesh::face_normal_calc(), blender::find_envelope(), blender::bke::float2_to_bool(), blender::bke::float3_to_bool(), blender::bke::float4_to_bool(), from_triangle(), blender::ed::greasepencil::generate_arc_from_point_to_point(), blender::nodes::node_fn_axes_to_rotation_cc::get_orthogonal_of_non_zero_vector(), IMB_colormanagement_working_space_check(), IMB_colormanagement_working_space_convert(), IMB_colormanagement_working_space_convert(), IMB_colormanagement_working_space_init_startup(), blender::bke::int2_to_bool(), is_any_zero(), is_zero(), knife_constrain_axis(), blender::bke::mesh_translate(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::nodes::node_fn_axis_angle_to_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_rotation_to_axis_angle_cc::node_eval_inverse(), blender::ed::transform::node_snap_grid_apply(), blender::geometry::perpendicular_distance(), project(), rotate_direction_around_axis(), blender::bke::rotate_directions_around_axes(), blender::bke::short2_to_bool(), blender::tests::TEST(), blender::bke::CurvesGeometry::translate(), blender::geometry::translate_geometry(), blender::geometry::translate_pointcloud(), blender::bke::greasepencil::update_curve_plane_normal_cache(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), and vpaint_proj_dm_map_cosnos_init__map_cb().
|
inlinenodiscard |
Return true if the absolute values of all components are smaller than given epsilon (0 by default).
Definition at line 779 of file BLI_math_vector.hh.
| isect_result< double2 > blender::math::isect_seg_seg | ( | const double2 & | v1, |
| const double2 & | v2, | ||
| const double2 & | v3, | ||
| const double2 & | v4 ) |
Definition at line 46 of file math_vec.cc.
References blender::math::isect_result< T >::kind, blender::math::isect_result< T >::lambda, blender::math::isect_result< T >::LINE_LINE_COLINEAR, blender::math::isect_result< T >::LINE_LINE_CROSS, blender::math::isect_result< T >::LINE_LINE_EXACT, blender::math::isect_result< T >::LINE_LINE_NONE, and v2.
| isect_result< float2 > blender::math::isect_seg_seg | ( | const float2 & | v1, |
| const float2 & | v2, | ||
| const float2 & | v3, | ||
| const float2 & | v4 ) |
Definition at line 16 of file math_vec.cc.
References blender::math::isect_result< T >::kind, blender::math::isect_result< T >::lambda, blender::math::isect_result< T >::LINE_LINE_COLINEAR, blender::math::isect_result< T >::LINE_LINE_CROSS, blender::math::isect_result< T >::LINE_LINE_EXACT, blender::math::isect_result< T >::LINE_LINE_NONE, and v2.
|
inlinenodiscard |
Definition at line 451 of file BLI_math_vector.hh.
References length_squared(), sqrt(), and T.
Referenced by blender::apply_gradient_tint(), blender::compositor::bokeh(), blender::ed::sculpt_paint::brushes::calc_distances(), blender::bke::curves::bezier::calculate_point_handles(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::ed::greasepencil::calculate_radius_projection_factor(), blender::nodes::node_shader_tex_gradient_cc::GradientFunction::call(), blender::ed::sculpt_paint::cloth::cloth_brush_satisfy_constraints(), blender::noise::compute_3d_orientation(), blender::compositor::compute_fog_glow_kernel_value(), blender::nodes::node_composite_vec_blur_cc::compute_motion_line(), blender::nodes::node_composite_relative_to_pixel_cc::RelativeToPixelOperation::compute_reference_size(), blender::io::fbx::ArmatureImportContext::create_armature_bones(), blender::ed::transform::createEdgeSlideVerts(), blender::bke::curves::poly::delta_dir(), blender::bke::curves::poly::direction_bisect(), blender::ed::sculpt_paint::brushes::do_elastic_deform_brush(), blender::ed::sculpt_paint::color::do_smear_brush_task(), blender::nodes::node_composite_ellipsemask_cc::ellipse_mask(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams(), blender::bke::tests::EXPECT_M3_ORTHOGONAL(), blender::geometry::extend_curve_straight(), blender::find_envelope(), float_to_half_array(), float_to_half_make_finite_array(), blender::draw::View::frustum_culling_planes_calc(), blender::noise::gabor(), blender::noise::gabor(), blender::nodes::node_composite_vec_blur_cc::gather_blur(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::nodes::node_composite_vec_blur_cc::gather_sample(), blender::ed::greasepencil::generate_corner(), blender::generate_curves(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_delta_translation(), blender::ed::greasepencil::trim::get_intersection_distance_of_segments(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_iterations(), blender::nodes::node_fn_compare_cc::get_multi_function(), blender::ed::greasepencil::grease_pencil_primitive_scale_all_update(), half_to_float_array(), is_unit(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::modify_drawing(), blender::nodes::node_geo_mesh_primitive_line_cc::node_geo_exec(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_stroke_line_constrain(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::imbuf::transform::process_scanlines(), blender::ed::sculpt_paint::project_brush_radius_grease_pencil(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::compositor::SMAANeighborhoodBlendingPS(), blender::compositor::SymmetricBlurWeights::SymmetricBlurWeights(), blender::tests::TEST(), to_axis_angle(), blender::tests::transform_normals_test(), blender::ed::transform::transform_result_get(), blender::math::projection::translate(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_transform_and_target_property(), blender::nodes::node_composite_vec_blur_cc::velocity_atomic_max_value(), and blender::seq::WipeData::WipeData().
|
inlinenodiscard |
Returns summation of all components.
Definition at line 437 of file BLI_math_vector.hh.
References abs(), i, result, and T.
Referenced by apply_to_curves_point_selection(), distance_manhattan(), to_euler(), to_euler(), to_nearest_euler(), and to_nearest_euler().
|
inlinenodiscard |
Definition at line 446 of file BLI_math_vector.hh.
Referenced by BKE_mball_polygonize(), blender::bke::pbvh::bmesh_update_topology(), blender::calc_min_radius_v3v3(), blender::seq::calc_wipe_blend(), blender::noise::compute_2d_gabor_kernel(), blender::noise::compute_2d_gabor_noise_cell(), blender::noise::compute_3d_gabor_kernel(), blender::noise::compute_3d_gabor_noise_cell(), blender::geometry::dist_signed_squared_to_edge(), distance_squared(), blender::ed::sculpt_paint::filter_plane_trim_limit_factors(), blender::bke::greasepencil::get_local_to_stroke_matrix(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), invert(), is_orthonormal(), is_similarity_transform(), is_uniformly_scaled(), is_unit(), is_unit_scale(), length(), blender::nodes::node_composite_vec_blur_cc::max_velocity(), blender::ed::transform::nearest_world_tree(), normalize_and_get_length(), blender::ed::sculpt_paint::project_translations(), blender::geometry::signed_distance_fat_triangle(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), to_dual_quaternion(), blender::bke::greasepencil::update_curve_plane_normal_cache(), blender::noise::voronoi_distance_bound(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_n_sphere_radius(), blender::noise::voronoi_n_sphere_radius(), and WM_gesture_lasso_modal().
Definition at line 49 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::accumulate_ghosts_cpu(), blender::eevee::RenderBuffers::acquire(), bicubic_interpolation(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), BKE_tracking_distortion_bounds_deltas(), blender::nodes::node_composite_boxmask_cc::box_mask(), blender::nodes::node_composite_brightness_cc::brightness_and_contrast(), blender::gpu::render_graph::VKUpdateMipmapsNode::build_commands(), buttons_context_path_material(), blender::ed::vse::ScopeHistogram::calc_from_ibuf(), blender::nodes::node_shader_radial_tiling_cc::RoundedPolygonFunction::call(), blender::nodes::node_shader_tex_noise_cc::NoiseFunction::call(), blender::nodes::node_composite_channel_matte_cc::channel_key(), clamp(), clamp(), clamp(), blender::nodes::node_composite_color_matte_cc::color_matte(), blender::compositor::compute_anti_diagonal_start(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_base_ghost_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_chain_length(), blender::nodes::node_composite_lensdist_cc::compute_chromatic_distortion_scale(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_classic(), blender::nodes::node_composite_crop_cc::CropOperation::compute_cropping_bounds(), blender::compositor::compute_diagonal_start(), blender::nodes::node_composite_lensdist_cc::compute_distortion_scale(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_eccentricity(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_image_cpu(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_log_maximum_luminance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_log_minimum_luminance(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::compute_luminance_scale_blend_factor(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_cpu(), blender::nodes::node_composite_blur_cc::BlurOperation::compute_maximum_blur_size(), blender::nodes::node_composite_vec_blur_cc::compute_motion_rect(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::compositor::compute_sigma_from_radius(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_cpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::compute_variable_size_search_radius(), blender::compositor::convolve(), blender::io::fbx::ArmatureImportContext::create_armature_bones(), blender::create_array_copies(), blender::bke::create_attribute_providers_for_mesh(), blender::deform_drawing(), blender::deform_drawing(), blender::nodes::node_composite_distance_matte_cc::distance_key(), do_version_glare_node_bloom_strength(), do_version_map_value_node(), blender::ed::vse::draw_strip_thumbnails(), blender::imbuf::transform::edge_aa(), blender::ed::transform::ElementResize(), blender::nodes::node_composite_ellipsemask_cc::ellipse_mask(), blender::eevee::LightModule::end_sync(), blender::eevee::VolumeModule::end_sync(), evaluate_film_like(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_cpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_gpu(), blender::nodes::node_composite_zcombine_cc::ZCombineOperation::execute_single_value(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams_cpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_cpu(), blender::nodes::node_composite_scale_cc::ScaleOperation::execute_variable_size_cpu(), blender::geometry::extend_curve_curved(), blender::ed::curves::extend_range(), fcurve_to_keylist(), blender::nodes::FileOutputItemsAccessor::find_available_identifier(), blender::ed::greasepencil::fit_strokes_to_view(), blender::noise::gabor(), blender::noise::gabor(), blender::seq::gaussian_blur_x(), blender::seq::gaussian_blur_y(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::get_blur_radius(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::get_blur_radius(), blender::nodes::node_composite_blur_cc::BlurOperation::get_blur_size(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::get_color_threshold(), blender::compositor::Context::get_compositing_region_size(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::get_contrast(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_despill_strength(), blender::get_distance_factor(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_edge_search_size(), blender::nodes::node_composite_defocus_cc::DefocusOperation::get_f_stop(), blender::get_factor_from_draw_speed(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::get_falloff_size(), blender::nodes::node_composite_defocus_cc::DefocusOperation::get_focal_length(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::get_gamma(), blender::nodes::node_composite_glare_cc::GlareOperation::get_highlights_smoothness(), blender::nodes::node_composite_id_mask_cc::IDMaskOperation::get_index(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_composite_tonemap_cc::ToneMapOperation::get_key(), blender::nodes::node_composite_antialiasing_cc::AntiAliasingOperation::get_local_contrast_adaptation_factor(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::get_max_distance(), blender::nodes::node_composite_glare_cc::GlareOperation::get_max_highlights(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_composite_glare_cc::GlareOperation::get_normalization_scale(), blender::nodes::node_composite_pixelate_cc::PixelateOperation::get_pixel_size(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_postprocess_blur_size(), blender::nodes::node_composite_keying_cc::KeyingOperation::get_preprocess_blur_size(), blender::nodes::node_composite_glare_cc::GlareOperation::get_saturation(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_scale(), blender::nodes::node_composite_scale_cc::ScaleOperation::get_scale_render_size_crop(), blender::nodes::node_composite_vec_blur_cc::VectorBlurOperation::get_shutter(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::get_size(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::get_size(), blender::nodes::node_composite_mask_cc::MaskOperation::get_size(), blender::nodes::node_composite_glare_cc::GlareOperation::get_strength(), blender::nodes::node_composite_bilateralblur_cc::BilateralBlurOperation::get_threshold(), blender::nodes::node_composite_glare_cc::GlareOperation::get_threshold(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::get_uniformity(), blender::seq::glow_blur_bitmap(), gpu_texture_update_scaled(), gpu_texture_update_unscaled(), blender::draw::grease_pencil_geom_batch_ensure(), blender::ed::greasepencil::grease_pencil_vertex_paint_brightness_contrast_exec(), blender::nodes::node_composite_huecorrect_cc::hue_correct(), blender::eevee::Film::init(), blender::eevee::Sampling::init(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking(), blender::seq::ColorBalanceApplyOp::init_lgg(), blender::seq::ColorBalanceApplyOp::init_sop(), blender::bounds::intersect(), blender::compositor::jump_flooding(), blender::ed::object::lattice_add_to_selected_collect_targets_and_calc_bounds(), blender::nodes::node_composite_colorbalance_cc::lift_gamma_gain(), max(), blender::compositor::maximum_float2_cpu(), blender::bounds::merge(), min_max(), min_max(), blender::modify_drawing(), blender::compositor::morphological_distance_cpu(), blender::nodes::node_composite_diff_matte_cc::node_build_multi_function(), blender::nodes::node_composite_hue_sat_val_cc::node_build_multi_function(), blender::ed::space_node::node_frame_rect_inside(), blender::ed::space_node::node_get_resize_direction(), blender::draw::overlay::Bounds::object_sync(), blender::nodes::node_composite_colorbalance_cc::offset_power_slope(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexPaintOperation::on_stroke_extended(), ScaleUpX::op(), ScaleUpY::op(), blender::draw::overhang_remap(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::PaintOperationExecutor(), blender::point_counts_to_keep_concurrent(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::seq::query_thumbnail(), blender::ed::greasepencil::randomize_radius(), blender::eevee::IrradianceBake::raylists_build(), blender::reorder_strokes(), blender::compositor::SMAALumaEdgeDetectionPS(), blender::compositor::SMAANeighborhoodBlendingPS(), blender::nodes::node_composite_glare_cc::GlareOperation::smooth_min(), blender::ed::space_node::socket_link_connection_location(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::draw::statvis_calc_distort(), blender::draw::statvis_calc_overhang(), blender::draw::statvis_calc_sharp(), blender::draw::statvis_calc_thickness(), blender::eevee::HiZBuffer::sync(), blender::eevee::SyncModule::sync_mesh(), blender::eevee::SyncModule::sync_sculpt(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::seq::text_gaussian_blur_x(), blender::seq::text_gaussian_blur_y(), blender::draw::thickness_remap(), blender::seq::tonemap_calc_chunk_luminance(), blender::seq::tonemap_simple(), blender::bounds::transform_bounds(), blender::geometry::tri_to_cell_bounds(), and blender::ed::greasepencil::vertex_group_normalize_exec().
|
inlinenodiscard |
Definition at line 88 of file BLI_math_vector.hh.
References b, BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and max().
|
inlinenodiscard |
Element-wise maximum of the passed vectors.
Definition at line 97 of file BLI_math_vector.hh.
References BLI_assert, max, result, and v.
|
inlinenodiscard |
Element-wise maximum of the passed vectors.
Definition at line 113 of file BLI_math_vector.hh.
References max.
Definition at line 55 of file BLI_math_base.hh.
Referenced by blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors(), UniqueName_Value::mark_used(), and blender::io::obj::Geometry::track_vertex_index().
See std::midpoint from C++20.
Definition at line 283 of file BLI_math_base.hh.
Referenced by blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::bke::calc_edge_centers(), blender::ed::sculpt_paint::filter::calc_sphere_translations(), blender::nodes::node_geo_field_average_cc::calculate_median(), blender::Bounds< T >::center(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), edbm_rip_edge_side_measure(), blender::ed::sculpt_paint::ensure_valid_pivot(), blender::ed::space_node::find_visible_center_of_link(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), blender::ed::greasepencil::grease_pencil_snap_cursor_to_sel_exec(), blender::bke::int2_to_int(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::object::object_origin_set_exec(), blender::draw::overlay::Bounds::object_sync(), paint_init_pivot_curves(), paint_init_pivot_grease_pencil(), paint_init_pivot_mesh(), blender::bke::partition_faces_recursively(), blender::bke::pbvh::pbvh_bmesh_node_limit_ensure_fast(), blender::bke::pbvh::pbvh_bmesh_node_split(), blender::bke::pbvh::pbvh_bmesh_split_edge(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::bke::short2_to_int(), blender::ed::sculpt_paint::SmoothOperationExecutor::smooth(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), ObjectInfos::sync(), blender::tests::TEST(), blender::ed::transform::transform_mesh_edge_slide_data_create(), blender::ed::transform::transform_mesh_uv_edge_slide_data_create(), blender::draw::Manager::unique_handle_for_sculpt(), view3d_ob_drop_matrix_from_snap(), and view3d_orbit_calc_center().
|
inlinenodiscard |
Definition at line 642 of file BLI_math_vector.hh.
References b.
Definition at line 43 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::adaptive_smooth_clamp(), bicubic_interpolation(), BKE_object_minmax_dupli(), BKE_pchan_minmax(), BKE_tracking_distortion_bounds_deltas(), blender::seq::blur_isolate_highlights(), blender::ed::space_node::calculate_inner_link_bezier_points(), blender::nodes::node_composite_channel_matte_cc::channel_key(), blender::nodes::node_composite_chroma_matte_cc::chroma_matte(), clamp(), clamp(), clamp(), blender::ed::sculpt_paint::greasepencil::closest_distance_to_surface_2d(), blender::nodes::node_composite_colorbalance_cc::color_balance(), blender::nodes::node_composite_colorcorrection_cc::color_correction(), blender::nodes::node_composite_color_matte_cc::color_matte(), blender::compositor::compute_anti_diagonal_start(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::compute_classic(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_defocus_radius_from_depth_cpu(), blender::compositor::compute_diagonal_length(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_image_cpu(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_matte_cpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::compute_maximum_defocus_radius(), blender::nodes::node_composite_vec_blur_cc::compute_motion_rect(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::nodes::node_composite_keying_cc::KeyingOperation::compute_tweaked_matte_cpu(), blender::nodes::node_composite_distance_matte_cc::distance_key(), blender::draw::distort_remap(), blender::compositor::DistortionGrid::DistortionGrid(), do_version_glare_node_options_to_inputs(), do_version_map_value_node(), blender::eevee::VolumeModule::draw_prepass(), blender::eevee::VolumeModule::end_sync(), blender::draw::gpencil::erfinv_approx(), evaluate_film_like(), blender::nodes::node_composite_pixelate_cc::PixelateOperation::execute_cpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_step_pass_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams_cpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_cpu(), blender::geometry::extend_curve_curved(), blender::ed::curves::extend_range(), fcurve_to_keylist(), blender::nodes::node_composite_inpaint_cc::InpaintOperation::fill_inpainting_region_cpu(), blender::seq::fill_rect_alpha_under(), find_first_points(), blender::index_mask::IndexMask::foreach_segment_zipped(), blender::noise::fractal_voronoi_distance_to_edge(), blender::seq::gaussian_blur_x(), blender::seq::gaussian_blur_y(), blender::get_build_factor(), blender::get_factor_from_draw_speed(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::get_iterations(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_composite_scale_cc::ScaleOperation::get_scale_render_size_fit(), blender::seq::glow_blur_bitmap(), blender::bounds::intersect(), blender::ed::object::lattice_add_to_selected_collect_targets_and_calc_bounds(), blender::bke::calc_edges::mask_first_distinct_edges(), blender::bounds::merge(), min(), min_max(), min_max(), blender::compositor::morphological_distance_cpu(), blender::ed::space_node::node_add_nodes_modal(), blender::nodes::node_composite_diff_matte_cc::node_build_multi_function(), blender::nodes::node_composite_luma_matte_cc::node_build_multi_function(), blender::ed::space_node::node_insert_offset_modal(), blender::draw::overlay::Fluids::object_sync(), blender::draw::overhang_remap(), blender::eevee::IrradianceBake::raylists_build(), blender::draw::sharp_remap(), blender::nodes::node_composite_glare_cc::GlareOperation::smooth_min(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::draw::statvis_calc_distort(), blender::draw::statvis_calc_overhang(), blender::draw::statvis_calc_sharp(), blender::draw::statvis_calc_thickness(), blender::compositor::summed_area_table_sum(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), TEST(), blender::seq::text_gaussian_blur_x(), blender::seq::text_gaussian_blur_y(), blender::draw::thickness_remap(), blender::seq::tonemap_calc_chunk_luminance(), blender::bounds::transform_bounds(), blender::geometry::tri_to_cell_bounds(), blender::nodes::node_composite_vec_blur_cc::velocity_atomic_max_value(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), and blender::nodes::node_composite_colorbalance_cc::white_point_constant().
|
inlinenodiscard |
Definition at line 57 of file BLI_math_vector.hh.
References b, BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and min().
|
inlinenodiscard |
Element-wise minimum of the passed vectors.
Definition at line 66 of file BLI_math_vector.hh.
References BLI_assert, min, result, and v.
|
inlinenodiscard |
Element-wise minimum of the passed vectors.
Definition at line 82 of file BLI_math_vector.hh.
References min.
Definition at line 62 of file BLI_math_base.hh.
Referenced by blender::io::obj::Geometry::track_vertex_index().
Definition at line 99 of file BLI_math_base.hh.
References max(), min(), and T.
Referenced by BKE_object_minmax(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::bke::pbvh::calc_face_bounds(), blender::bke::pbvh::calc_face_grid_bounds(), blender::meshintersect::cdt_draw(), fcurve_to_keylist(), blender::bke::pbvh::Tree::from_bmesh(), blender::ed::space_node::get_min_max_of_nodes(), blender::ed::greasepencil::grease_pencil_snap_compute_centroid(), hair_get_boundbox(), init_meta(), blender::ed::sculpt_paint::paint::image::init_uv_primitives_brush_test(), layerDoMinMax_propfloat2(), particle_intersect_mesh(), blender::bke::partition_faces_recursively(), blender::bke::pbvh::pbvh_bmesh_node_finalize(), blender::bke::pbvh::pbvh_bmesh_node_limit_ensure(), blender::bke::pbvh::pbvh_bmesh_node_limit_ensure_fast(), blender::bke::pbvh::pbvh_bmesh_node_split(), PE_minmax(), TEST(), blender::bke::pbvh::update_node_bounds_bmesh(), blender::bke::pbvh::update_node_bounds_grids(), and blender::bke::pbvh::update_node_bounds_mesh().
|
inline |
Definition at line 326 of file BLI_math_vector.hh.
Definition at line 79 of file BLI_math_base.hh.
Referenced by blender::deform_drawing(), blender::ed::greasepencil::get_control_point_type(), blender::get_rand_matrix(), mod(), mod(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::noise::perlin_signed(), blender::ed::greasepencil::primitive_calulate_curve_positions(), safe_mod(), and blender::geometry::sample_curve_attribute().
|
inlinenodiscard |
Definition at line 164 of file BLI_math_vector.hh.
|
inlinenodiscard |
Definition at line 158 of file BLI_math_vector.hh.
References b, BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and mod().
Repeats the saw-tooth pattern even on negative numbers. ex: mod_periodic(-3, 4) = 1, mod(-3, 4)= -3. This will cause undefined behavior for negative b.
Definition at line 127 of file BLI_math_base.hh.
References abs(), b, BLI_assert, floor(), and T.
Referenced by blender::compositor::bokeh(), blender::ed::transform::curves::cyclic_curve_connected_point_distances(), blender::nodes::node_fn_bit_math_cc::get_multi_function(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_geo_mesh_topology_offset_corner_in_face_cc::OffsetCornerInFaceFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::tests::TEST(), blender::math::AngleFraction< T >::wrapped(), and blender::math::AngleRadianBase< float >::wrapped().
|
inlinenodiscard |
Return normal vector to a triangle. The result is normalized but can still be degenerate.
Definition at line 618 of file BLI_math_vector.hh.
References cross_tri(), normalize, and v2.
Referenced by blender::ed::sculpt_paint::calc_area_normal_and_center_node_bmesh(), blender::io::stl::export_frame(), blender::bke::mesh::face_normal_calc(), from_triangle(), and blender::bke::pbvh::node_raycast_bmesh().
|
nodiscard |
Apply all accumulated weights to the dual-quaternions. Also make sure the rotation quaternions is normalized.
Definition at line 445 of file BLI_math_quaternion.hh.
References dot(), blender::math::DualQuaternionBase< T >::identity(), blender::math::DualQuaternionBase< T >::quat, blender::math::DualQuaternionBase< T >::quat_weight, blender::math::DualQuaternionBase< T >::scale, blender::math::DualQuaternionBase< T >::scale_weight, sqrt(), T, and blender::math::DualQuaternionBase< T >::trans.
|
nodiscard |
Normalize each column of the matrix individually.
Definition at line 778 of file BLI_math_matrix.hh.
References i, normalize(), result, and blender::unroll().
Referenced by blender::bke::mesh::accumulate_fan_normal(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::active_jitter(), blender::ed::sculpt_paint::pose::align_pivot_local_space(), blender::nodes::node_fn_align_euler_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_fixed_pivot(), blender::draw::overlay::Meshes::begin_sync(), blender::draw::overlay::Paints::begin_sync(), blender::ed::sculpt_paint::boundary::bend_data_init_bmesh(), blender::ed::sculpt_paint::boundary::bend_data_init_grids(), blender::ed::sculpt_paint::boundary::bend_data_init_mesh(), BKE_multires_construct_tangent_matrix(), BM_face_splits_check_legal(), blender::bke::build_point_matrix(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner(), blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner(), blender::ed::sculpt_paint::smooth::calc_boundary_normal_corner(), blender::ed::sculpt_paint::calc_brush_plane(), blender::bke::mesh::calc_edge_directions(), blender::ed::sculpt_paint::cloth::calc_forces_bmesh(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::cloth::calc_forces_mesh(), blender::ed::sculpt_paint::brushes::clay_strips::calc_local_matrix(), blender::ed::sculpt_paint::cloth::calc_perpendicular_pinch_forces(), blender::ed::sculpt_paint::cloth::calc_pinch_forces(), blender::ed::sculpt_paint::cloth::calc_plane_pinch_forces(), blender::ed::sculpt_paint::pose::calc_pose_data(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::ed::sculpt_paint::pose::calc_scale_from_grab_delta(), blender::ed::sculpt_paint::filter::calc_sphere_translations(), blender::ed::sculpt_paint::calc_stabilized_plane(), blender::bke::curves::bezier::calculate_aligned_handle(), blender::geometry::calculate_directions(), blender::bke::curves::poly::calculate_next_normal(), blender::bke::curves::poly::calculate_normals_minimum(), blender::bke::curves::poly::calculate_normals_z_up(), blender::calculate_plane(), blender::ed::sculpt_paint::min_distance_edit::calculate_points_per_side(), blender::ed::greasepencil::calculate_texture_space(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::call(), blender::nodes::node_composite_chroma_matte_cc::chroma_matte(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_forces(), blender::nodes::node_geo_curve_primitive_arc_cc::colinear_f3_f3_f3(), blender::nodes::node_geo_curve_primitive_circle_cc::colinear_f3_f3_f3(), blender::ed::sculpt_paint::greasepencil::compute_auto_flip(), blender::geometry::compute_surface_point_normal(), blender::bke::mesh::corner_fan_space_define(), blender::bke::mesh::corner_space_custom_normal_to_data(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_line_cc::create_direction_line_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::deform_drawing(), blender::bke::curves::poly::direction_bisect(), blender::ed::sculpt_paint::boundary::displacement_from_grab_delta_get(), blender::ed::sculpt_paint::brushes::do_bmesh_topology_rake_brush(), blender::ed::sculpt_paint::brushes::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::brushes::do_pinch_brush(), blender::ed::sculpt_paint::brushes::do_plane_brush(), blender::ed::sculpt_paint::color::do_smear_brush_task(), do_version_normal_node_dot_product(), blender::io::usd::USDPointInstancerWriter::do_write(), DRW_text_edit_mesh_measure_stats(), blender::bke::subdiv::eval_limit_point_and_normal(), blender::bke::CurvesGeometry::evaluated_tangents(), blender::geometry::extend_curve_curved(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::find_envelope(), blender::bke::float4x4_to_quaternion(), blender::noise::gabor(), blender::ed::greasepencil::generate_cap(), blender::ed::greasepencil::generate_corner(), blender::ed::greasepencil::generate_stroke_perimeter(), blender::ed::sculpt_paint::trim::gesture_to_screen_points(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::get_axis_gizmo_matrix_basis(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_composite_normal_cc::get_normal(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), gizmo_ruler_draw(), blender::ed::sculpt_paint::grease_pencil_fill_get_extension_data(), blender::ed::greasepencil::grease_pencil_reproject_exec(), imapaint_pick_face(), blender::ed::sculpt_paint::gesture::init_common(), knife_draw_line(), knife_find_closest_edge_of_face(), knife_snap_update_from_mval(), blender::ed::sculpt_paint::gesture::line_plane_from_tri(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::bke::mesh_normals_varray(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::bke::attribute_math::mix3(), multires_reshape_apply_base_refit_base_mesh(), blender::nodes::node_fn_axis_angle_to_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_quaternion_to_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_rotation_to_axis_angle_cc::node_eval_inverse(), blender::nodes::node_geo_interpolate_curves_cc::node_geo_exec(), blender::nodes::node_geo_mesh_primitive_line_cc::node_geo_exec(), blender::nodes::node_geo_raycast_cc::node_geo_exec(), blender::nodes::node_geo_distribute_points_on_faces_cc::normal_to_rotation(), normalize(), normalize(), blender::bke::normalize_span(), blender::geometry::normalize_span(), blender::draw::overlay::LightProbes::object_sync(), blender::ed::sculpt_paint::greasepencil::RandomizeOperation::on_stroke_extended(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::paint_space_stroke(), blender::bke::pbvh::pbvh_bmesh_split_edge(), blender::ed::sculpt_paint::boundary::populate_twist_data(), blender::ed::curves::primitive_random_sphere(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::ed::transform::SnapData::register_result(), blender::ed::transform::SnapData::register_result_raycast(), blender::ed::greasepencil::DrawingPlacement::reproject(), blender::bke::mesh_surface_sample::sample_corner_normals(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::sample_curves_surface_3d_brush(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center(), blender::bke::mesh_surface_sample::sample_point_normals(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::ed::sculpt_paint::boundary::slide_data_init_bmesh(), blender::ed::sculpt_paint::boundary::slide_data_init_grids(), blender::ed::sculpt_paint::boundary::slide_data_init_mesh(), blender::ed::sculpt_paint::pose::solve_ik_chain(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::geometry::curve_constraints::solve_length_constraints(), blender::ed::sculpt_paint::pose::solve_roll_chain(), blender::io::obj::OBJMesh::store_normal_coords_and_indices(), blender::ed::sculpt_paint::tilt_apply_to_normal(), blender::ed::transform::transform_mesh_edge_slide_data_create(), blender::ed::transform::transform_mesh_uv_edge_slide_data_create(), transform_normals(), transform_normals(), blender::tests::transform_normals_test(), blender::geometry::transform_volume(), blender::ed::transform::VertSlideData::update_active_edges(), blender::bke::greasepencil::update_curve_plane_normal_cache(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), blender::noise::voronoi_distance_to_edge(), blender::noise::voronoi_distance_to_edge(), and blender::noise::voronoi_distance_to_edge().
|
nodiscard |
Definition at line 747 of file BLI_math_matrix.hh.
References i, normalize(), result, and blender::unroll().
|
inlinenodiscard |
Return a unit quaternion representing the same rotation as q or the identity quaternion if q is ill-formed.
Definition at line 256 of file BLI_math_quaternion.hh.
References len, normalize_and_get_length(), and T.
|
inlinenodiscard |
Definition at line 537 of file BLI_math_vector.hh.
References len, normalize_and_get_length(), T, and v.
|
inlinenodiscard |
Definition at line 249 of file BLI_math_quaternion.hh.
References dot(), blender::math::QuaternionBase< T >::identity(), sqrt(), and T.
Referenced by blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::ed::sculpt_paint::cloth::cloth_brush_solve_collision(), convexhull_2d_angle_iter_init(), convexhull_2d_angle_iter_step_on_axis(), distfactor_to_bone(), blender::math::QuaternionBase< T >::expmap(), blender::geometry::extend_curve_curved(), blender::ed::greasepencil::find_curve_intersections(), from_vector(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::bke::node_foreach_working_space_color(), normalize(), normalize(), normalize_and_get_size(), normalize_and_get_size(), blender::bke::pbvh::normals_calc_verts_simple(), orthogonalize(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::raycast_init(), blender::ed::transform::raycastMesh(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::ed::transform::transform_mesh_edge_slide_data_create(), blender::bke::greasepencil::update_curve_plane_normal_cache(), blender::math::QuaternionBase< T >::wrapped_around(), and blender::write_fill_transforms().
|
inlinenodiscard |
Definition at line 521 of file BLI_math_vector.hh.
References length_squared(), sqrt, T, and v.
|
nodiscard |
Normalize each column of the matrix individually. Return the length of each column vector.
Definition at line 786 of file BLI_math_matrix.hh.
References BLI_STATIC_ASSERT, i, normalize_and_get_length(), result, and blender::unroll().
Referenced by blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::call(), blender::eevee::Light::sync(), blender::tests::TEST(), to_rot_scale(), and to_rot_scale().
|
nodiscard |
Definition at line 765 of file BLI_math_matrix.hh.
References BLI_STATIC_ASSERT, i, normalize_and_get_length(), result, and blender::unroll().
|
inlinenodiscard |
This is "safe" in the sense that the input matrix may not actually encode a rotation but can also contain shearing etc.
Definition at line 1285 of file BLI_math_matrix.hh.
References to_euler(), and to_quaternion().
Referenced by blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::call(), blender::bke::float4x4_to_quaternion(), blender::bke::attribute_math::mix3(), and blender::tests::TEST().
| std::ostream & blender::math::operator<< | ( | std::ostream & | stream, |
| const Axis | axis ) |
Definition at line 15 of file math_basis_types.cc.
| std::ostream & blender::math::operator<< | ( | std::ostream & | stream, |
| const AxisSigned | axis ) |
Definition at line 29 of file math_basis_types.cc.
| std::ostream & blender::math::operator<< | ( | std::ostream & | stream, |
| const CartesianBasis & | rot ) |
Definition at line 44 of file math_basis_types.cc.
| std::ostream & blender::math::operator<< | ( | std::ostream & | stream, |
| EulerOrder | order ) |
|
constexpr |
Definition at line 185 of file BLI_math_basis_types.hh.
References b.
|
constexpr |
Definition at line 190 of file BLI_math_basis_types.hh.
References b.
|
inlinenodiscard |
Calculates a perpendicular vector to v.
Definition at line 751 of file BLI_math_vector.hh.
References v.
|
inlinenodiscard |
Calculates a perpendicular vector to v.
Definition at line 733 of file BLI_math_vector.hh.
References dominant_axis(), and v.
Referenced by blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::ed::transform::isect_face_dst(), and blender::eevee::IrradianceBake::raylists_build().
|
nodiscard |
This returns a version of mat with orthonormal basis axes. This leaves the given axis untouched.
In other words this removes the shear of the matrix. However this doesn't properly account for volume preservation, and so, the axes keep their respective length.
The secondary axis is chosen as follow (X->Y, Y->X, Z->X). 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).
Definition at line 1528 of file BLI_math_matrix.hh.
References BLI_assert_unreachable, cross, dot(), normalize, normalize_and_get_length(), R, result, scale(), T, blender::math::Axis::X, blender::math::Axis::Y, and blender::math::Axis::Z.
Referenced by to_dual_quaternion().
|
static |
Right polar decomposition: M = UP
U is the rotation-like component, the closest orthogonal matrix to M. P is the scaling-like component, defined in U space.
See https://en.wikipedia.org/wiki/Polar_decomposition for more.
WORKAROUND: (ComputeThinU | ComputeThinV) must be set as runtime parameters in Eigen < 3.4.0. But this requires the matrix type to be dynamic to avoid an assert.
Definition at line 292 of file math_matrix.cc.
References blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr(), from_scale(), polar_decompose(), transpose, V, and W.
Referenced by interpolate(), and polar_decompose().
|
nodiscard |
Raise a unit Quaternion q to the real y exponent.
Definition at line 202 of file BLI_math_quaternion.hh.
References BLI_assert, cos(), blender::math::QuaternionBase< T >::imaginary_part(), is_unit_scale(), normalize, safe_acos(), sin(), T, blender::math::QuaternionBase< T >::w, and y.
Definition at line 194 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::compute_fog_glow_field_of_view(), do_version_glare_node_options_to_inputs(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::geometry::extend_curve_curved(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_composite_colorbalance_cc::lift_gamma_gain(), blender::nodes::node_composite_colorbalance_cc::offset_power_slope(), pow(), pow(), blender::ed::greasepencil::simplify_fixed(), blender::ed::sculpt_paint::simplify_fixed(), blender::simplify_fixed(), and blender::math::tests::TEST().
|
inlinenodiscard |
Return the value of x raised to the y power. The result is undefined if x < 0 or if x = 0 and y <= 0.
Definition at line 272 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, pow(), x, and y.
|
inlinenodiscard |
Project p onto v_proj . Returns zero vector if v_proj is degenerate (zero length).
Definition at line 511 of file BLI_math_vector.hh.
| VecBase< T, N > blender::math::project_point | ( | const MatBase< T, N+1, NumRow > & | mat, |
| const VecBase< T, N > & | point ) |
Definition at line 1665 of file BLI_math_matrix.hh.
|
nodiscard |
Project a point using a matrix (location & rotation & scale & perspective divide).
Referenced by blender::ed::sculpt_paint::do_brush_action(), blender::nodes::node_fn_project_point_cc::node_build_multi_function(), blender::ed::transform::EdgeSlideData::project(), blender::ed::transform::VertSlideData::project(), blender::io::grease_pencil::GreasePencilExporter::project_to_screen(), blender::eevee::ShadowModule::screen_pixel_radius(), blender::tests::TEST(), blender::ed::transform::VertSlideData::update_active_edges(), and blender::eevee::VolumeObjectBounds::VolumeObjectBounds().
References pseudo_invert().
References pseudo_invert().
References pseudo_invert().
References pseudo_invert().
References pseudo_invert().
References pseudo_invert().
|
nodiscard |
Compute Moore-Penrose pseudo inverse of matrix. Singular values below epsilon are ignored for stability (truncated SVD). Gives a good enough approximation of the regular inverse matrix if the given matrix is non-invertible (ex: degenerate transform). The returned pseudo inverse matrix A+ of input matrix A will not satisfy A+ * A = Identity but will satisfy A * A+ * A = A. For more detail, see https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse.
Compute the Single Value Decomposition of an arbitrary matrix A That is compute the 3 matrices U,W,V with U column orthogonal (m,n) ,W a diagonal matrix and V an orthogonal square matrix s.t.A = U.W.Vt. From this decomposition it is trivial to compute the (pseudo-inverse) of A as Ainv = V.Winv.transpose(U).
WORKAROUND: (ComputeThinU | ComputeThinV) must be set as runtime parameters in Eigen < 3.4.0. But this requires the matrix type to be dynamic to avoid an assert.
Definition at line 223 of file math_matrix.cc.
References blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr(), from_scale(), i, invert(), pseudo_invert(), T, transpose, U, blender::unroll(), V, and W.
Referenced by blender::ed::transform::pointcloud::createTransPointCloudVerts(), blender::ed::transform::curves::curve_populate_trans_data_structs(), pseudo_invert(), pseudo_invert(), pseudo_invert(), pseudo_invert(), pseudo_invert(), pseudo_invert(), pseudo_invert(), and blender::tests::TEST().
Definition at line 160 of file BLI_math_base.hh.
References T.
Referenced by blender::ed::sculpt_paint::cloth::apply_forces(), blender::ed::sculpt_paint::apply_hardness_to_distances(), blender::ed::sculpt_paint::smooth::average_positions(), BKE_brush_calc_curve_factors(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_grids(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_mesh(), blender::ed::sculpt_paint::auto_mask::calc_face_factors(), blender::geometry::calc_straight_curve_positions(), blender::bke::attribute_math::float4x4Mixer::finalize(), blender::seq::ColorBalanceApplyOp::init_lgg(), blender::seq::ColorBalanceApplyOp::init_sop(), blender::ed::sculpt_paint::mask::mask_increase_contrast(), multires_reshape_apply_base_refit_base_mesh(), blender::math::AngleFraction< T >::operator AngleCartesianBase< T >(), blender::ed::sculpt_paint::project_translations(), rcp(), blender::tests::TEST(), and to_quaternion().
|
inlinenodiscard |
Per-element inverse. Zero elements are evaluated to NaN.
Definition at line 397 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and rcp().
|
inlinenodiscard |
Definition at line 699 of file BLI_math_vector.hh.
Referenced by average(), blender::compositor::compute_boundary_coefficient(), blender::compositor::compute_boundary_coefficient(), blender::compositor::compute_feedforward_coefficient(), blender::compositor::compute_normalization_scale(), blender::nodes::node_composite_glare_cc::GlareOperation::karis_brightness_weighted_sum(), and blender::draw::overlay::Resources::update_theme_settings().
|
inlinenodiscard |
Definition at line 671 of file BLI_math_vector.hh.
Referenced by blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::nodes::node_composite_relative_to_pixel_cc::RelativeToPixelOperation::compute_reference_size(), blender::compositor::deriche_gaussian_blur(), do_version_glare_node_options_to_inputs(), blender::ed::vse::draw_histogram(), evaluate_film_like(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_fog_glow(), blender::ed::greasepencil::fit_strokes_to_view(), blender::io::obj::geometry_to_blender_objects(), blender::eevee::IrradianceBake::init(), blender::eevee::VolumeModule::init(), blender::nodes::node_composite_glare_cc::GlareOperation::karis_brightness_weighted_sum(), blender::draw::overlay::Bounds::object_sync(), blender::draw::overlay::LightProbes::object_sync(), blender::eevee::Film::overscan_pixels_get(), blender::compositor::recursive_gaussian_blur(), blender::eevee::VolumePipeline::register_and_get_layer(), blender::ed::sculpt_paint::dyntopo::sculpt_detail_flood_fill_exec(), blender::compositor::van_vliet_gaussian_blur(), and blender::ed::vse::view_frame_preview_scope().
|
inlinenodiscard |
Definition at line 685 of file BLI_math_vector.hh.
Referenced by blender::nodes::node_composite_glare_cc::GlareOperation::compute_bloom_chain_length(), blender::nodes::node_composite_relative_to_pixel_cc::RelativeToPixelOperation::compute_reference_size(), do_version_glare_node_bloom_strength(), evaluate_film_like(), and blender::eevee::IrradianceBake::surfels_create().
|
inlinenodiscard |
Definition at line 711 of file BLI_math_vector.hh.
Referenced by blender::eevee::VolumeProbeModule::init(), and blender::draw::overlay::Fluids::object_sync().
|
inlinenodiscard |
Definition at line 486 of file BLI_math_vector.hh.
References BLI_assert, dot(), and is_unit_scale().
|
inlinenodiscard |
Definition at line 494 of file BLI_math_vector.hh.
|
nodiscard |
Rotate a by b. In other word, insert the b rotation before a.
Definition at line 199 of file BLI_math_rotation.hh.
References b.
|
nodiscard |
Rotate a by b. In other word, insert the b rotation before a.
Definition at line 212 of file BLI_math_rotation.hh.
References b, from_rotation(), blender::math::Euler3Base< T >::order(), and to_euler().
|
nodiscard |
Rotate a by b. In other word, insert the b rotation before a.
Definition at line 205 of file BLI_math_rotation.hh.
References b, from_rotation(), and to_euler().
|
nodiscard |
Definition at line 682 of file BLI_math_matrix.hh.
References blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), cos, from_rotation(), result, sin, T, and blender::unroll().
|
nodiscard |
Equivalent to mat * from_rotation(rotation) but with fewer operation. Optimized for AxisAngle rotation on basis vector (i.e: AxisAngle({1, 0, 0}, 0.2)).
References b, e, scale(), T, and transform().
Referenced by blender::eevee::LookdevWorld::LookdevWorld(), and blender::tests::TEST().
|
nodiscard |
Rotate a by b. In other word, insert the b rotation before a.
Definition at line 193 of file BLI_math_rotation.hh.
References b.
| float3 blender::math::rotate_around_axis | ( | const float3 & | vector, |
| const float3 & | center, | ||
| const float3 & | axis, | ||
| float | angle ) |
Rotate any arbitrary vector around the center position, with a unit-length axis and the specified angle.
Definition at line 129 of file math_rotation.cc.
References angle(), axis_angle_normalized_to_mat3(), mul_m3_v3(), and result.
Referenced by blender::ed::sculpt_paint::boundary::calc_twist_position().
| float3 blender::math::rotate_direction_around_axis | ( | const float3 & | direction, |
| const float3 & | axis, | ||
| float | angle ) |
Rotate the unit-length direction around the unit-length axis by the angle.
Definition at line 112 of file math_rotation.cc.
References angle(), BLI_assert, cross(), diff(), dot(), is_unit(), is_zero(), and UNLIKELY.
Referenced by blender::bke::curves::poly::calculate_next_normal(), blender::bke::curves::poly::calculate_normals_minimum(), blender::bke::rotate_directions_around_axes(), blender::math::tests::TEST(), and blender::ed::sculpt_paint::tilt_apply_to_normal().
|
inlinenodiscard |
Create an CartesianBasis for converting from an a orientation defined only by its forward vector to a b orientation defined only by its forward vector. Rotation is given to be non flipped and deterministic.
Definition at line 430 of file BLI_math_basis_types.hh.
References abs, from_orthonormal_axes(), blender::math::AxisSigned::next_after(), rotation_between(), and sign().
|
inlinenodiscard |
Create an CartesianBasis for converting from a orientation to b orientation.
Definition at line 415 of file BLI_math_basis_types.hh.
References abs, blender::math::CartesianBasis::axes, b, sign(), blender::math::CartesianBasis::x(), blender::math::CartesianBasis::y(), and blender::math::CartesianBasis::z().
Referenced by angle_between(), angle_between_signed(), from_tracking(), rotation_between(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::math::tests::TEST(), and blender::math::tests::TEST().
|
nodiscard |
Return rotation from orientation a to orientation b into another quaternion.
Definition at line 220 of file BLI_math_rotation.hh.
Definition at line 117 of file BLI_math_base.hh.
References T.
Referenced by blender::seq::apply_text_alignment(), blender::geometry::assign_samples_to_segments(), blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::compute_piecewise_linear_falloff(), blender::bke::attribute_math::DefaultMixerStruct< int2 >::double_to_int(), blender::seq::final_image_cache_get(), blender::seq::final_image_cache_put(), blender::bke::attribute_math::DefaultMixerStruct< short2 >::float_to_int(), blender::get_build_factor(), blender::ed::sculpt_paint::greasepencil::GreasePencilStrokeOperationCommon::init_auto_masking(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::intersections_segment_circle_integers(), blender::ed::space_node::mark_sockets_collapsed_recursive(), blender::ed::transform::node_snap_grid_apply(), blender::ed::space_node::node_update_basis(), blender::ed::space_node::node_update_basis_buttons(), blender::ed::space_node::node_update_basis_from_declaration(), blender::ed::space_node::node_update_collapsed(), round(), blender::compositor::SMAAArea(), blender::compositor::SMAABlendingWeightCalculationPS(), blender::compositor::SMAADecodeDiagBilinearAccess(), blender::compositor::SMAADecodeDiagBilinearAccess(), blender::ed::transform::snap_grid(), blender::seq::source_image_cache_get(), blender::seq::source_image_cache_put(), store_pixel(), blender::seq::thumbnail_cache_get(), and uv_copy_mirrored_faces().
|
inlinenodiscard |
Definition at line 358 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and round().
Definition at line 224 of file BLI_math_base.hh.
References acos(), blender::math::numbers::pi, T, and UNLIKELY.
Referenced by angle_between(), angle_of(), angle_of_signed(), from_triangle(), from_vector(), blender::ed::sculpt_paint::auto_mask::normal_calc(), pow(), and to_quaternion_legacy().
Faster/approximate version of safe_acos. Max error 4.51803e-5 (0.00258 degrees).
Definition at line 236 of file BLI_math_base.hh.
References float, blender::math::numbers::pi, and x.
Referenced by blender::bke::mesh::accumulate_fan_normal(), accumulate_vertex_normals_poly_v3(), accumulate_vertex_normals_tri_v3(), accumulate_vertex_normals_v3(), bm_loop_normal_accum(), bm_mesh_loops_calc_normals_for_loop(), bm_vert_calc_normals_accum_loop(), calc_tangent_spaces(), blender::bke::mesh::corner_fan_space_define(), and blender::bke::mesh::corner_space_custom_normal_to_data().
Definition at line 107 of file BLI_math_base.hh.
Referenced by blender::nodes::node_composite_alpha_over_cc::alpha_over_conjoint(), blender::nodes::node_composite_alpha_over_cc::alpha_over_disjoint(), blender::apply_gradient_tint(), blender::ed::sculpt_paint::smooth::average_data_bmesh(), blender::ed::sculpt_paint::smooth::average_data_grids(), blender::ed::sculpt_paint::average_mask_border_position(), blender::ed::sculpt_paint::average_unmasked_position(), blender::geometry::build_point_to_sample_map(), blender::nodes::node_shader_map_range_cc::build_vector_linear(), blender::nodes::node_shader_map_range_cc::build_vector_stepped(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::ed::space_node::calculate_inner_link_bezier_points(), blender::deform_drawing(), blender::nodes::node_composite_distance_matte_cc::distance_key(), blender::ed::sculpt_paint::ScaleCurvesEffect::execute(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_constant_size_cpu(), blender::nodes::node_composite_defocus_cc::DefocusOperation::execute_cpu(), blender::nodes::node_composite_blur_cc::BlurOperation::execute_variable_size_cpu(), blender::nodes::node_composite_bokehblur_cc::BokehBlurOperation::execute_variable_size_cpu(), blender::ed::greasepencil::fit_strokes_to_view(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), blender::nodes::node_composite_glare_cc::GlareOperation::get_sample_position(), blender::geometry::limit_radius(), blender::ed::sculpt_paint::move_last_point_and_resample(), blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::nodes::node_composite_diff_matte_cc::node_build_multi_function(), blender::nodes::node_fn_integer_math_cc::node_eval_inverse(), blender::nodes::node_shader_math_cc::node_eval_inverse(), blender::nodes::node_shader_vector_math_cc::node_eval_inverse(), openexr_header_metadata_global(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::ed::sculpt_paint::project_brush_radius_grease_pencil(), safe_divide(), blender::nodes::node_fn_integer_math_cc::safe_divide_round_i(), blender::length_parameterize::sample_at_length(), blender::geometry::sample_curve_padded(), SCULPT_calc_vertex_displacement(), blender::nodes::node_shader_map_range_cc::sh_node_map_range_build_multi_function(), stretchto_evaluate(), blender::compositor::SymmetricBlurWeights::SymmetricBlurWeights(), and view3d_panel_curve_data().
|
inlinenodiscard |
Returns 0 if denominator is exactly equal to 0.
Definition at line 346 of file BLI_math_vector.hh.
|
inlinenodiscard |
Returns 0 if denominator is exactly equal to 0.
Definition at line 336 of file BLI_math_vector.hh.
References b, BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and safe_divide().
Definition at line 94 of file BLI_math_base.hh.
|
inlinenodiscard |
Safe version of mod(a, b) that returns 0 if b is equal to 0.
Definition at line 178 of file BLI_math_vector.hh.
References b, BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and safe_mod().
Definition at line 199 of file BLI_math_base.hh.
Referenced by blender::nodes::node_shader_gamma_cc::node_build_multi_function(), and safe_pow().
|
inlinenodiscard |
Return the value of x raised to the y power. The result is x if x < 0 or if x = 0 and y <= 0.
Definition at line 242 of file BLI_math_vector.hh.
Definition at line 168 of file BLI_math_base.hh.
References T.
Referenced by blender::ed::sculpt_paint::smooth::average_positions(), blender::ed::sculpt_paint::smooth::calc_average(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::nodes::node_geo_uv_tangent_cc::compute_triangle_tangent(), blender::draw::drw_volume_object_mesh_init(), blender::draw::overlay::MeshUVs::end_sync(), blender::ed::greasepencil::fit_strokes_to_view(), blender::bke::greasepencil::convert::get_legacy_stroke_to_texture_matrix(), blender::bke::greasepencil::get_stroke_to_texture_matrix(), blender::nodes::node_composite_glare_cc::GlareOperation::karis_brightness_weighted_sum(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), safe_rcp(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::tests::TEST(), blender::seq::WipeData::WipeData(), blender::write_fill_transforms(), and blender::write_stroke_transforms().
|
inlinenodiscard |
Per-element inverse. Zero elements are evaluated to zero.
Definition at line 407 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and safe_rcp().
|
inlinenodiscard |
Per-element square root. Negative elements are evaluated to zero.
Definition at line 384 of file BLI_math_vector.hh.
Referenced by blender::tests::TEST().
|
nodiscard |
Equivalent to mat * from_scale(scale) but with fewer operation.
Definition at line 719 of file BLI_math_matrix.hh.
References BLI_STATIC_ASSERT, result, scale(), and blender::unroll().
Referenced by blender::draw::overlay::Cursor::begin_sync(), blender::meshintersect::cdt_draw(), draw_bone_degrees_of_freedom(), blender::draw::drw_volume_object_mesh_init(), blender::bke::fill_mesh_positions(), from_loc_rot_scale(), from_loc_scale(), from_rot_scale(), from_scale(), get_dupliface_transform_from_coords(), blender::draw::gpencil::gpencil_uv_transform_get(), blender::meshintersect::graph_draw(), interpolate_fast(), interpolate_fast(), make_duplis_particle_system(), blender::draw::overlay::Bounds::object_sync(), orthogonalize(), blender::eevee::Film::pixel_jitter_get(), blender::io::grease_pencil::SVGImporter::read(), rotate(), scale(), blender::draw::overlay::ShapeCache::ShapeCache(), blender::draw::statvis_calc_thickness(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), blender::eevee::Light::sync(), blender::eevee::LookdevModule::sync(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), to_dual_quaternion(), and blender::write_fill_transforms().
|
inlinenodiscard |
Definition at line 206 of file BLI_math_basis_types.hh.
References blender::math::AxisSigned::sign().
Definition at line 38 of file BLI_math_base.hh.
References T.
Referenced by blender::noise::compute_3d_orientation(), blender::nodes::node_composite_vec_blur_cc::compute_motion_rect(), float_to_half(), from_up_axis(), blender::nodes::node_fn_integer_math_cc::get_multi_function(), midpoint(), rotation_between(), rotation_between(), blender::nodes::node_fn_integer_math_cc::safe_divide_round_i(), blender::bke::greasepencil::Drawing::set_texture_matrices(), sign(), and blender::tests::TEST().
|
inlinenodiscard |
Returns -1 if a is less than 0, 0 if a is equal to 0, and +1 if a is greater than 0.
Definition at line 51 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and sign().
| T blender::math::sin | ( | const AngleCartesianBase< T > & | a | ) |
Definition at line 701 of file BLI_math_angle_types.hh.
References blender::math::AngleCartesianBase< T >::sin(), and T.
| T blender::math::sin | ( | const AngleFraction< T > & | a | ) |
Definition at line 714 of file BLI_math_angle_types.hh.
| T blender::math::sin | ( | const AngleRadianBase< T > & | a | ) |
Definition at line 688 of file BLI_math_angle_types.hh.
References blender::math::AngleRadianBase< T >::radian(), sin, and T.
Referenced by blender::math::AngleRadianBase< float >::AngleRadianBase(), blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::noise::compute_2d_gabor_kernel(), blender::noise::compute_3d_gabor_kernel(), blender::noise::compute_3d_orientation(), blender::compositor::compute_numerator_1(), blender::compositor::compute_numerator_2(), blender::compositor::compute_numerator_3(), blender::nodes::node_composite_glare_cc::GlareOperation::compute_streak_direction(), blender::bke::tests::GreasePencilInterpolate::create_test_shape(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_boxmask_cc::BoxMaskOperation::execute_cpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_cpu(), blender::nodes::node_composite_ellipsemask_cc::EllipseMaskOperation::execute_cpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_cpu(), blender::nodes::node_composite_directionalblur_cc::DirectionalBlurOperation::execute_gpu(), blender::nodes::node_composite_split_cc::SplitOperation::execute_gpu(), blender::math::detail::from_rotation(), from_triangle(), blender::ed::greasepencil::generate_arc_from_point_to_point(), blender::ed::greasepencil::generate_circle_from_point(), blender::get_rand_matrix(), blender::compositor::get_regular_polygon_vertex_position(), blender::ed::greasepencil::grease_pencil_primitive_rotate_all_update(), interpolate_dot_slerp(), blender::workbench::SceneResources::load_jitter_tx(), blender::math::AngleFraction< T >::operator AngleCartesianBase< T >(), pow(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::draw::overlay::ring_vertices(), blender::ed::sculpt_paint::greasepencil::rotate_by_angle(), blender::rotate_by_angle(), blender::tests::TEST(), to_quaternion(), to_quaternion(), to_quaternion_legacy(), blender::write_fill_transforms(), and blender::write_weights_for_drawing().
Definition at line 179 of file BLI_math_base.hh.
References T.
|
static |
Definition at line 599 of file math_matrix.cc.
References blender::MatBase< float, 4, 4 >::identity(), is_equal(), skip_transform(), and transform().
Referenced by skip_transform(), transform_points(), and transform_points().
Definition at line 153 of file BLI_math_base.hh.
References T.
Referenced by blender::ed::sculpt_paint::greasepencil::brush_point_influence_mask(), blender::calc_min_radius_v3v3(), blender::noise::compute_2d_gabor_standard_deviation(), blender::noise::compute_3d_gabor_standard_deviation(), blender::nodes::node_composite_lensdist_cc::compute_chromatic_distortion_scale(), blender::nodes::node_composite_lensdist_cc::compute_distortion_scale(), blender::nodes::node_composite_lensdist_cc::compute_number_of_integration_steps_heuristic(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_despeckle_cc::DespeckleOperation::execute_cpu(), blender::nodes::node_composite_filter_cc::FilterOperation::execute_cpu(), blender::nodes::node_composite_dilate_cc::DilateErodeOperation::execute_distance_threshold_cpu(), blender::math::AngleCartesianBase< float >::from_point(), blender::hook_falloff(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::intersections_segment_circle_integers(), length(), normalize(), normalize_and_get_length(), blender::math::detail::normalized_to_quat_fast(), blender::math::AngleCartesianBase< float >::operator/, blender::compositor::SMAABlendingWeightCalculationPS(), blender::compositor::SMAANeighborhoodBlendingPS(), blender::ed::transform::snap_object_project_view3d_ex(), sqrt(), and blender::tests::TEST().
|
inlinenodiscard |
Per-element square root. Negative elements are evaluated to NaN.
Definition at line 374 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and sqrt().
Definition at line 209 of file BLI_math_base.hh.
References T.
Referenced by BKE_light_area(), BKE_mball_polygonize(), bmesh_find_doubles_by_distance_connected_impl(), bone_envelope_falloff(), blender::ed::sculpt_paint::cloth::brush_affected_nodes_gather(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::brushes::clay_strips::calc_node_mask(), blender::compositor::compute_fog_glow_kernel_value(), blender::compositor::compute_scaled_poles_variance_derivative(), ed_tracking_pick_plane_track(), ed_tracking_pick_point_track(), blender::nodes::node_composite_kuwahara_cc::ConvertKuwaharaOperation::execute_anisotropic_cpu(), blender::nodes::node_composite_glare_cc::GlareOperation::execute_sun_beams_cpu(), blender::compositor::find_scale_factor(), from_up_axis(), blender::compositor::morphological_distance_cpu(), blender::ed::sculpt_paint::pbvh_gather_generic(), square(), blender::tests::TEST(), to_dual_quaternion(), and uv_remove_doubles_to_selected_shared_vertex().
|
inlinenodiscard |
Per-element square.
Definition at line 279 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_OP_VEC, and square().
Definition at line 74 of file BLI_math_base.hh.
References T.
Referenced by blender::draw::overlay::append_line_loop(), blender::compositor::SMAACalculateDiagWeights(), blender::compositor::SMAADetectHorizontalCornerPattern(), blender::compositor::SMAADetectVerticalCornerPattern(), blender::compositor::SMAALumaEdgeDetectionPS(), step(), step(), blender::eevee::VelocityModule::step_sync(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inlinenodiscard |
Definition at line 141 of file BLI_math_vector.hh.
References BLI_UNROLL_MATH_VEC_FUNC_VEC_VEC, and step().
| T blender::math::tan | ( | const AngleCartesianBase< T > & | a | ) |
Definition at line 705 of file BLI_math_angle_types.hh.
References T, and blender::math::AngleCartesianBase< T >::tan().
| T blender::math::tan | ( | const AngleFraction< T > & | a | ) |
Definition at line 718 of file BLI_math_angle_types.hh.
| T blender::math::tan | ( | const AngleRadianBase< T > & | a | ) |
Definition at line 692 of file BLI_math_angle_types.hh.
References blender::math::AngleRadianBase< T >::radian(), T, and tan.
Referenced by blender::nodes::node_composite_chroma_matte_cc::chroma_matte(), blender::draw::curve_create_edit_curves_nor(), and blender::math::projection::perspective_fov().
Definition at line 184 of file BLI_math_base.hh.
References T.
|
inlinenodiscard |
Extract euler rotation from transform matrix.
Definition at line 1184 of file BLI_math_matrix.hh.
References blender::math::detail::normalized_to_angle().
Referenced by blender::math::detail::to_rotation().
| AxisAngleBase< T, AngleT > blender::math::to_axis_angle | ( | const Euler3Base< T > & | euler | ) |
Definition at line 106 of file BLI_math_euler.hh.
References to_axis_angle(), and to_quaternion().
| AxisAngleBase< T, AngleT > blender::math::to_axis_angle | ( | const EulerXYZBase< T > & | euler | ) |
Definition at line 99 of file BLI_math_euler.hh.
References to_axis_angle(), and to_quaternion().
Referenced by blender::nodes::node_fn_rotation_to_axis_angle_cc::QuaterniontoAxisAngleFunction::call(), blender::io::fbx::create_transform_curve_data(), blender::math::QuaternionBase< T >::expmap(), blender::nodes::node_fn_axis_angle_to_rotation_cc::node_eval_inverse(), blender::math::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), to_axis_angle(), to_axis_angle(), and to_axis_angle().
|
extern |
| AxisAngleBase< T, AngleT > blender::math::to_axis_angle | ( | const QuaternionBase< T > & | quat | ) |
Definition at line 624 of file BLI_math_quaternion.hh.
References abs, angle(), BLI_assert, blender::math::AxisAngleBase< T, AngleT >::identity(), is_unit_scale(), length(), sign(), T, to_axis_angle(), blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
|
nodiscard |
Convert transformation mat with parent transform basemat into a dual-quaternion representation.
This allows volume preserving deformation for skinning.
Conversion routines between (regular quaternion, translation) and dual quaternion.
Version 1.0.0, February 7th, 2007
SPDX-License-Identifier: Zlib Copyright 2006-2007 University of Dublin, Trinity College, All Rights Reserved.
Changes for Blender:
Definition at line 548 of file BLI_math_quaternion.hh.
References from_rotation(), invert(), is_negative(), is_orthonormal(), length_squared(), normalize, orthogonalize(), R, scale(), square(), T, to_quaternion(), to_scale(), blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::Axis::Y, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
Referenced by blender::math::tests::TEST().
|
extern |
| EulerXYZBase< T > blender::math::to_euler | ( | const AxisAngleBase< T, AngleT > & | axis_angle | ) |
Definition at line 97 of file BLI_math_axis_angle.hh.
References blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), T, to_euler(), and to_quaternion().
| Euler3Base< T > blender::math::to_euler | ( | const AxisAngleBase< T, AngleT > & | axis_angle, |
| EulerOrder | order ) |
Definition at line 90 of file BLI_math_axis_angle.hh.
References to_euler(), and to_quaternion().
Referenced by blender::io::fbx::create_transform_curve_data(), blender::io::usd::USDPointInstancerWriter::do_write(), blender::nodes::node_fn_rotation_to_euler_cc::node_build_multi_function(), blender::nodes::node_fn_euler_to_rotation_cc::node_eval_inverse(), normalized_to_quaternion_safe(), blender::bke::quaternion_to_float3(), rotate(), rotate(), blender::nodes::node_geo_rotate_instances_cc::rotate_instances(), blender::nodes::inverse_eval::set_modifier_value(), blender::nodes::inverse_eval::set_socket_value(), blender::nodes::inverse_eval::set_value_node_value(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), to_euler(), to_euler(), to_euler(), to_euler(), to_euler(), to_euler(), to_nearest_euler(), to_nearest_euler(), blender::math::detail::to_rotation(), and blender::math::detail::to_rotation().
|
extern |
|
extern |
|
inlinenodiscard |
Definition at line 1199 of file BLI_math_matrix.hh.
References length_manhattan(), and blender::math::detail::normalized_to_eul2().
|
inlinenodiscard |
Definition at line 1190 of file BLI_math_matrix.hh.
References length_manhattan(), and blender::math::detail::normalized_to_eul2().
|
inlinenodiscard |
Definition at line 1215 of file BLI_math_matrix.hh.
References to_euler().
|
inlinenodiscard |
Definition at line 1209 of file BLI_math_matrix.hh.
References to_euler().
|
extern |
|
extern |
| EulerXYZBase< T > blender::math::to_euler | ( | const QuaternionBase< T > & | quat | ) |
Definition at line 654 of file BLI_math_quaternion.hh.
References BLI_assert, from_rotation(), is_unit_scale(), and to_euler().
| Euler3Base< T > blender::math::to_euler | ( | const QuaternionBase< T > & | quat, |
| EulerOrder | order ) |
Definition at line 662 of file BLI_math_quaternion.hh.
References BLI_assert, from_rotation(), is_unit_scale(), and to_euler().
|
nodiscard |
Convert euler rotation to gimbal rotation matrix.
Definition at line 361 of file BLI_math_rotation.hh.
References from_rotation(), blender::math::Euler3Base< T >::i(), blender::math::Euler3Base< T >::i_index(), blender::math::Euler3Base< T >::j_index(), blender::math::Euler3Base< T >::k_index(), result, and T.
Referenced by blender::math::tests::TEST().
|
inline |
Definition at line 1362 of file BLI_math_matrix.hh.
References blender::MatBase< T, NumCol, NumRow, Alignment >::location(), and to_rot_scale().
Referenced by blender::nodes::node_composite_image_info_cc::ImageInfoOperation::execute(), interpolate_fast(), blender::eevee::IrradianceBake::surfel_raster_views_sync(), blender::tests::TEST(), blender::tests::TEST(), and to_loc_rot_scale_safe().
|
inline |
Definition at line 1387 of file BLI_math_matrix.hh.
References blender::MatBase< T, NumCol, NumRow, Alignment >::location(), and to_rot_scale().
|
inline |
Same as to_loc_rot_scale but is handles matrices that are not only location, rotation and scale more gracefully, e.g. when the matrix has skew.
Definition at line 1401 of file BLI_math_matrix.hh.
References to_loc_rot_scale(), and to_quaternion().
Referenced by blender::bke::attribute_math::float4x4Mixer::mix_in(), blender::nodes::node_fn_combine_transform_cc::node_eval_inverse(), blender::nodes::node_geo_object_info_cc::node_geo_exec(), blender::ed::object::set_local_object_transform(), and blender::bke::greasepencil::Layer::set_local_transform().
|
inlinenodiscard |
Definition at line 1222 of file BLI_math_matrix.hh.
References length_manhattan(), blender::math::detail::normalized_to_eul2(), blender::math::Euler3Base< T >::order(), and blender::math::Euler3Base< T >::wrapped_around().
|
inlinenodiscard |
Extract euler rotation from transform matrix. The returned euler triple is given to be the closest from the reference. It avoids axis flipping for animated f-curves for eg.
Definition at line 1237 of file BLI_math_matrix.hh.
References length_manhattan(), blender::math::detail::normalized_to_eul2(), and blender::math::EulerXYZBase< T >::wrapped_around().
Referenced by blender::tests::TEST().
|
inlinenodiscard |
Definition at line 1252 of file BLI_math_matrix.hh.
References to_euler().
|
inlinenodiscard |
Definition at line 1260 of file BLI_math_matrix.hh.
References to_euler().
|
extern |
| QuaternionBase< T > blender::math::to_quaternion | ( | const AxisAngleBase< T, AngleT > & | axis_angle | ) |
Definition at line 71 of file BLI_math_axis_angle.hh.
References blender::math::AxisAngleBase< T, AngleT >::angle(), blender::math::AxisAngleBase< T, AngleT >::axis(), BLI_assert, cos(), is_unit_scale(), sin(), and T.
Referenced by blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_fixed_pivot(), blender::ed::sculpt_paint::brush_delta_update(), blender::nodes::node_fn_axes_to_rotation_cc::AxesToRotationFunction::call(), blender::nodes::node_geo_mesh_primitive_cube_cc::create_cube_mesh(), blender::io::usd::USDPointInstancerWriter::do_write(), blender::math::QuaternionBase< T >::expmap(), blender::geometry::extend_curve_curved(), blender::bke::float3_to_quaternion(), blender::bke::float_to_quaternion(), from_vector(), blender::nodes::init_socket_cpp_value_from_property(), interpolate(), make_socket_type_rotation(), blender::bke::attribute_math::mix4(), blender::nodes::node_fn_axis_angle_to_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_euler_to_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_input_rotation_cc::node_build_multi_function(), blender::nodes::node_fn_rotation_to_axis_angle_cc::node_eval_inverse(), blender::nodes::node_fn_rotation_to_euler_cc::node_eval_inverse(), blender::nodes::node_geo_tool_3d_cursor_cc::node_geo_exec(), normalized_to_quaternion_safe(), blender::math::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), to_axis_angle(), to_axis_angle(), to_dual_quaternion(), to_euler(), to_euler(), to_loc_rot_scale_safe(), to_quaternion(), to_quaternion(), and blender::math::detail::to_rotation().
|
extern |
| QuaternionBase< T > blender::math::to_quaternion | ( | const CartesianBasis & | rotation | ) |
Creates a quaternion from an axis triple. This is faster and more precise than converting from another representation.
There are only 6 * 4 = 24 possible valid orthonormal orientations. We precompute them and store them inside this switch using a key. Generated using generate_axes_to_quaternion_switch_cases().
Definition at line 393 of file BLI_math_rotation.hh.
References blender::math::CartesianBasis::axes, blender::math::QuaternionBase< T >::identity(), rcp(), blender::math::numbers::sqrt2, T, x, blender::math::AxisSigned::X_NEG, blender::math::AxisSigned::X_POS, y, blender::math::AxisSigned::Y_NEG, blender::math::AxisSigned::Y_POS, z(), blender::math::AxisSigned::Z_NEG, and blender::math::AxisSigned::Z_POS.
|
extern |
| QuaternionBase< T > blender::math::to_quaternion | ( | const Euler3Base< T > & | eulO | ) |
Definition at line 75 of file BLI_math_euler.hh.
References blender::math::Euler3Base< T >::i_index(), blender::math::Euler3Base< T >::ijk(), blender::math::Euler3Base< T >::j_index(), blender::math::Euler3Base< T >::k_index(), blender::math::Euler3Base< T >::parity(), to_quaternion(), UNPACK3, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::EulerBase< T >::y(), blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
|
extern |
| QuaternionBase< T > blender::math::to_quaternion | ( | const EulerXYZBase< T > & | eul | ) |
Definition at line 50 of file BLI_math_euler.hh.
References cos(), sin(), T, blender::math::QuaternionBase< T >::w, blender::math::EulerBase< T >::x(), blender::math::QuaternionBase< T >::x, blender::math::EulerBase< T >::y(), blender::math::QuaternionBase< T >::y, blender::math::EulerBase< T >::z(), and blender::math::QuaternionBase< T >::z.
|
inlinenodiscard |
Extract quaternion rotation from transform matrix.
Definition at line 1268 of file BLI_math_matrix.hh.
References blender::math::detail::normalized_to_quat_with_checks().
|
inlinenodiscard |
Definition at line 1274 of file BLI_math_matrix.hh.
References to_quaternion().
|
nodiscard |
Extract quaternion rotation from transform matrix. Legacy version of to_quaternion which has slightly different behavior. Keep for particle-system & boids since replacing this will make subtle changes that impact hair in existing files. See: D15772.
Definition at line 442 of file math_matrix.cc.
References atan2(), conjugate(), cos(), nor, normalize, safe_acos(), sin(), to_quaternion_legacy(), transform_point(), blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by blender::tests::TEST(), and to_quaternion_legacy().
|
inline |
Decompose a matrix into location, rotation, and scale components.
| AllowNegativeScale | if true, will compute determinant to know if matrix is negative. Rotation and scale values will be flipped if it is negative. This is a costly operation so it is disabled by default. |
Definition at line 1347 of file BLI_math_matrix.hh.
References is_negative(), normalize_and_get_size(), blender::math::detail::to_rotation(), and UNLIKELY.
Referenced by interpolate_fast(), blender::tests::TEST(), to_loc_rot_scale(), and to_loc_rot_scale().
|
inline |
Definition at line 1372 of file BLI_math_matrix.hh.
References is_negative(), normalize_and_get_size(), blender::math::detail::to_rotation(), and UNLIKELY.
|
inlinenodiscard |
Definition at line 1306 of file BLI_math_matrix.hh.
References is_negative(), length(), result, and UNLIKELY.
|
inlinenodiscard |
Extract the absolute 3d scale from a transform matrix.
| AllowNegativeScale | if true, will compute determinant to know if matrix is negative. This is a costly operation so it is disabled by default. |
Definition at line 1294 of file BLI_math_matrix.hh.
References is_negative(), length(), result, UNLIKELY, blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis(), blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis(), and blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis().
Referenced by BKE_light_area(), boundbox_to_dimensions(), blender::nodes::node_fn_separate_transform_cc::SeparateTransformFunction::call(), blender::ed::greasepencil::create_curves_outline(), blender::io::usd::USDPointInstancerWriter::do_write(), blender::ed::greasepencil::image_render::draw_circles(), blender::generate_curves(), blender::ed::sculpt_paint::grease_pencil_fill_extension_lines_from_circles(), blender::eevee::IrradianceBake::init(), blender::bke::attribute_math::mix3(), blender::bke::attribute_math::mix4(), blender::draw::overlay::LightProbes::object_sync(), blender::workbench::VolumePass::object_sync_volume(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::eevee::IrradianceBake::surfels_create(), ObjectInfos::sync(), blender::tests::TEST(), to_dual_quaternion(), and blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform().
Create basis vector.
Definition at line 322 of file BLI_math_basis_types.hh.
References blender::math::Axis::as_int(), BLI_assert, and T.
Referenced by blender::math::AxisAngleBase< T, AngleT >::AxisAngleBase(), blender::math::detail::from_rotation(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::get_axis_gizmo_matrix_basis(), blender::ed::view3d::geometry_nodes_gizmos::matrix_from_position_and_up_direction(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), and blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property().
| T blender::math::to_vector | ( | const AxisSigned | axis | ) |
Create signed basis vector.
Definition at line 331 of file BLI_math_basis_types.hh.
References abs, BLI_assert, blender::math::AxisSigned::from_int(), blender::math::AxisSigned::is_negative(), and T.
|
extern |
|
extern |
|
nodiscard |
Transform a 3d direction vector using a 3x3 matrix (rotation & scale).
Definition at line 1653 of file BLI_math_matrix.hh.
Referenced by assign_final_coords_from_mdisps(), assign_final_elements_from_orig_mdisps(), blender::bke::subdiv::average_read_displacement_object(), blender::ed::sculpt_paint::calc_brush_plane(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::ed::sculpt_paint::cursor_geometry_info_update(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::bke::subdiv::eval_displacement(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::get_axis_gizmo_matrix_basis(), blender::workbench::get_light_data_from_studio_solidlight(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::workbench::ShadowPass::init(), blender::ed::sculpt_paint::gesture::init_common(), blender::ed::sculpt_paint::gesture::line_plane_from_tri(), blender::geometry::boolean::mesh_bm_concat(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::modify_drawing(), multires_reshape_apply_base_update_mesh_coords(), blender::ed::transform::nearest_world_tree(), blender::nodes::node_fn_transform_direction_cc::node_build_multi_function(), object_grid_element_to_tangent_displacement(), blender::ed::object::object_origin_set_exec(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::ed::sculpt_paint::project_brush_radius_grease_pencil(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::ed::transform::raycastMesh(), blender::ed::transform::SnapData::register_result(), blender::ed::transform::SnapData::register_result_raycast(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::tests::TEST(), blender::ed::sculpt_paint::tilt_apply_to_normal(), blender::ed::transform::transdata_elem_translate(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), and blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_transform_and_target_property().
|
nodiscard |
Transform a 3d direction vector using a 4x4 matrix (rotation & scale).
Definition at line 1659 of file BLI_math_matrix.hh.
References view.
| void blender::math::transform_normals | ( | const float3x3 & | transform, |
| MutableSpan< float3 > | normals ) |
Transform normal vectors, maintaining their unit length status, but implementing some optimizations for identity matrix and uniform scaling.
Definition at line 552 of file math_matrix.cc.
References blender::MatBase< float, 3, 3 >::identity(), invert(), is_equal(), is_similarity_transform(), normalize(), normals, blender::threading::parallel_for(), transform(), transform_normals(), and transpose().
Referenced by blender::geometry::execute_realize_curve_task(), blender::ed::mesh::join_normals(), blender::bke::transform_custom_normal_attribute(), transform_normals(), transform_normals(), and blender::tests::transform_normals_test().
| void blender::math::transform_normals | ( | Span< float3 > | src, |
| const float3x3 & | transform, | ||
| MutableSpan< float3 > | dst ) |
Definition at line 575 of file math_matrix.cc.
References blender::MutableSpan< T >::copy_from(), blender::MatBase< float, 3, 3 >::identity(), blender::Span< T >::index_range(), invert(), is_equal(), is_similarity_transform(), normalize(), blender::threading::parallel_for(), transform(), transform_normals(), and transpose().
|
inlinenodiscard |
Definition at line 446 of file BLI_math_basis_types.hh.
References blender::math::Axis::as_int(), blender::math::AxisSigned::axis(), blender::math::AxisSigned::is_negative(), result, v, blender::math::CartesianBasis::x(), blender::math::CartesianBasis::y(), and blender::math::CartesianBasis::z().
Referenced by blender::bke::BoneDeformLinearMixer< full_deform >::accumulate(), blender::bke::BoneDeformLinearMixer< full_deform >::accumulate_bbone(), blender::geometry::add_curves_on_mesh(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_auto_pivot(), blender::nodes::node_fn_align_rotation_to_vector_cc::align_rotations_fixed_pivot(), blender::ed::sculpt_paint::apply_crazyspace_to_translations(), blender::apply_gradient_tint(), blender::apply_stroke_transform(), blender::ed::transform::applyTranslationValue(), blender::bke::armature_vert_task_with_mixer(), BKE_grease_pencil_point_coords_apply(), BKE_grease_pencil_point_coords_apply_with_mat4(), BKE_grease_pencil_point_coords_get(), BKE_object_minmax(), blender::draw::overlay::BoneInstanceData::BoneInstanceData(), blender::ed::greasepencil::boundary_to_curves(), bounds_min_max_with_transform(), blender::ed::sculpt_paint::calc_brush_plane(), blender::ed::sculpt_paint::color::calc_local_positions(), blender::ed::sculpt_paint::pose::calc_segment_translations(), blender::ed::sculpt_paint::calc_symm_area_transform_translations(), blender::ed::sculpt_paint::calc_transform_translations(), blender::ed::sculpt_paint::trim::calculate_depth(), blender::ed::transform::calculate_new_origin_position(), blender::ed::sculpt_paint::greasepencil::calculate_view_positions(), blender::ed::sculpt_paint::greasepencil::calculate_view_radii(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::ed::sculpt_paint::cloth::cloth_brush_solve_collision(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), blender::compositor::RealizeOnDomainOperation::compute_realized_transformation_domain(), blender::ed::vse::cursor_set_by_mouse_position(), blender::deform_drawing(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), blender::io::usd::USDHairWriter::do_write(), blender::ed::greasepencil::image_render::draw_circles(), blender::ed::greasepencil::draw_control_points(), blender::ed::greasepencil::image_render::draw_dot(), blender::ed::greasepencil::image_render::draw_dots(), blender::ed::greasepencil::image_render::draw_grease_pencil_stroke(), blender::ed::greasepencil::image_render::draw_lines(), blender::ed::greasepencil::image_render::draw_polyline(), blender::draw::drw_debug_matrix(), drw_shgroup_bone_relationship_lines_ex(), drw_shgroup_bone_stick(), DRW_text_edit_mesh_measure_stats(), blender::ed::sculpt_paint::ensure_valid_pivot(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::geometry::extend_curve_curved(), blender::bke::fill_mesh_positions(), blender::ed::sculpt_paint::filter_region_clip_factors(), blender::ed::sculpt_paint::filter_region_clip_factors(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), from_triangle(), from_vector(), blender::draw::View::frustum_boundbox_calc(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::greasepencil::get_boundary_bounds(), blender::get_distance_factor(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), blender::ed::sculpt_paint::grease_pencil_brush_cursor_draw(), blender::ed::sculpt_paint::grease_pencil_fill_extension_cut(), blender::ed::sculpt_paint::grease_pencil_fill_extension_lines_from_circles(), blender::ed::sculpt_paint::grease_pencil_fill_get_extension_data(), blender::draw::grease_pencil_geom_batch_ensure(), blender::ed::greasepencil::grease_pencil_reproject_exec(), blender::ed::greasepencil::grease_pencil_snap_compute_centroid(), blender::ed::greasepencil::grease_pencil_snap_to_cursor_exec(), blender::ed::greasepencil::grease_pencil_snap_to_grid_exec(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), imapaint_pick_face(), ViewOpsData::init_navigation(), blender::ed::sculpt_paint::CombOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::DeleteOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::initialize_spherical_brush_reference_point(), blender::ed::curves::pen_tool::PenToolOperation::layer_to_screen(), blender::ed::sculpt_paint::gesture::line_plane_from_tri(), blender::geometry::boolean::mesh_bm_concat(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), MOD_lineart_gpencil_generate_v3(), motionpaths_calc_bake_targets(), blender::ed::transform::nearest_world_tree(), blender::nodes::node_fn_rotate_vector_cc::node_build_multi_function(), blender::nodes::node_fn_transform_point_cc::node_build_multi_function(), blender::nodes::node_geo_tool_3d_cursor_cc::node_geo_exec(), blender::ed::sculpt_paint::brushes::clay_strips::node_in_box(), blender::ed::object::object_origin_set_exec(), blender::draw::overlay::Relations::object_sync(), blender::ed::sculpt_paint::greasepencil::CloneOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::paint_brush_stroke_add_step(), blender::ed::sculpt_paint::paint_cursor_update_pixel_radius(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::paint_line_strokes_spacing(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::paint_space_stroke(), blender::ed::sculpt_paint::paint_space_stroke_spacing(), blender::ed::sculpt_paint::paint_stroke_modal(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical_with_symmetry(), blender::ed::greasepencil::pixel_radius_to_world_space_radius(), blender::ed::greasepencil::DrawingPlacement::place(), blender::ed::greasepencil::primitive_local_to_screen(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::greasepencil::DrawingPlacement::project(), blender::io::grease_pencil::GreasePencilExporter::project_to_screen(), blender::ed::greasepencil::DrawingPlacement::project_with_shift(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::ed::sculpt_paint::raycast_init(), blender::ed::transform::raycastMesh(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical_with_symmetry(), blender::ed::transform::SnapData::register_result(), blender::ed::transform::SnapData::register_result_raycast(), blender::ed::greasepencil::DrawingPlacement::reproject(), blender::ed::sculpt_paint::sample_curves_3d_brush(), blender::ed::sculpt_paint::sample_curves_surface_3d_brush(), blender::ed::sculpt_paint::AddOperationExecutor::sample_in_center_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_projected(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), blender::ed::sculpt_paint::AddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_spherical_with_symmetry(), blender::ed::curves::pen_tool::PenToolOperation::screen_to_layer(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::ed::transform::snapCamera(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry(), blender::seq::strip_image_transform_quad_get_ex(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::vse::text_edit_draw_cursor(), blender::ed::vse::text_selection_draw(), blender::bounds::transform_bounds(), blender::ed::sculpt_paint::transform_brush_radius(), transform_point(), transform_points_no_threading(), transform_points_no_threading(), blender::bke::crazyspace::GeometryDeformation::translation_from_deformed_to_original(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::image_engine::OneTexture::update_bounds(), blender::image_engine::ScreenTileTextures< Divisions >::update_bounds(), view3d_calc_point_in_selected_bounds(), view3d_orbit_calc_center(), blender::eevee::VolumeObjectBounds::VolumeObjectBounds(), blender::io::obj::OBJWriter::write_vertex_coords(), and blender::write_weights_for_drawing().
|
nodiscard |
Transform point using the dual-quaternion dq . Applying the DualQuaternion transform can only happen if the DualQuaternion was normalized first. Optionally outputs crazy space matrix.
From: "Skinning with Dual Quaternions" Ladislav Kavan, Steven Collins, Jiri Zara, Carol O'Sullivan Trinity College Dublin, Czech Technical University in Prague
Definition at line 486 of file BLI_math_quaternion.hh.
References BLI_assert, is_normalized(), is_unit_scale(), M, blender::math::DualQuaternionBase< T >::quat, result, blender::math::DualQuaternionBase< T >::scale, blender::math::DualQuaternionBase< T >::scale_weight, T, blender::math::DualQuaternionBase< T >::trans, transform_point(), and view.
|
extern |
|
extern |
|
nodiscard |
Transform a 2d point using a 2x2 matrix (rotation & scale).
Definition at line 1629 of file BLI_math_matrix.hh.
|
nodiscard |
Transform a 2d point using a 3x3 matrix (location & rotation & scale).
Definition at line 1635 of file BLI_math_matrix.hh.
References blender::MatBase< T, NumCol, NumRow, Alignment >::location(), and view.
|
nodiscard |
Transform a 3d point using a 3x3 matrix (rotation & scale).
Definition at line 1641 of file BLI_math_matrix.hh.
|
nodiscard |
Transform a 3d point using a 4x4 matrix (location & rotation & scale).
Definition at line 1647 of file BLI_math_matrix.hh.
References blender::MatBase< T, NumCol, NumRow, Alignment >::location(), and view.
|
inlinenodiscard |
Transform v by rotation using the quaternion q.
Definition at line 313 of file BLI_math_quaternion.hh.
References conjugate(), R, T, UNPACK3, V, v, blender::math::QuaternionBase< T >::w, blender::math::QuaternionBase< T >::x, blender::math::QuaternionBase< T >::y, and blender::math::QuaternionBase< T >::z.
| void blender::math::transform_points | ( | const float4x4 & | transform, |
| MutableSpan< float3 > | points, | ||
| bool | use_threading = true ) |
Transform point vectors with matrix multiplication, optionally using multi-threading.
Definition at line 640 of file math_matrix.cc.
References blender::MutableSpan< T >::index_range(), blender::threading::parallel_for(), skip_transform(), transform(), transform_points(), and transform_points_no_threading().
Referenced by blender::ed::greasepencil::add_armature_automatic_weights(), blender::ed::greasepencil::add_armature_envelope_weights(), blender::ed::object::apply_objects_internal(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::ed::sculpt_paint::brushes::calc_bmesh(), blender::ed::sculpt_paint::brushes::calc_faces(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::ed::greasepencil::create_curves_outline(), blender::ed::object::data_xform_by_mat4(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_mesh_task(), blender::geometry::execute_realize_pointcloud_task(), blender::geometry::execute_realize_pointcloud_tasks(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::draw::grease_pencil_cache_add_nurbs(), blender::draw::grease_pencil_edit_batch_ensure(), blender::draw::grease_pencil_weight_batch_ensure(), blender::ed::mesh::join_positions(), blender::ed::mesh::join_shape_keys(), blender::bke::mesh_transform(), blender::ed::sculpt_paint::greasepencil::process_stroke_weights(), blender::ed::sculpt_paint::brushes::sample_node_surface_bmesh(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::ed::sculpt_paint::brushes::sample_node_surface_mesh(), blender::bke::CurvesGeometry::transform(), blender::geometry::transform_curve_edit_hints(), blender::geometry::transform_grease_pencil_edit_hints(), blender::geometry::transform_pointcloud(), transform_points(), and transform_points().
| void blender::math::transform_points | ( | Span< float3 > | src, |
| const float4x4 & | transform, | ||
| MutableSpan< float3 > | dst, | ||
| bool | use_threading = true ) |
Definition at line 613 of file math_matrix.cc.
References blender::MutableSpan< T >::copy_from(), blender::Span< T >::index_range(), blender::threading::parallel_for(), skip_transform(), transform(), transform_points(), and transform_points_no_threading().
|
static |
Definition at line 633 of file math_matrix.cc.
References transform(), transform_point(), and transform_points_no_threading().
|
static |
Definition at line 604 of file math_matrix.cc.
References i, blender::Span< T >::index_range(), transform(), transform_point(), and transform_points_no_threading().
Referenced by transform_points(), transform_points(), transform_points_no_threading(), and transform_points_no_threading().
|
nodiscard |
Equivalent to mat * from_location(translation) but with fewer operation.
Definition at line 659 of file BLI_math_matrix.hh.
References BLI_STATIC_ASSERT, result, and blender::unroll().
Referenced by blender::compositor::RealizeOnDomainOperation::execute(), blender::draw::overlay::Fluids::object_sync(), blender::draw::overlay::ForceFields::object_sync(), blender::ed::sculpt_paint::paint_cursor_drawing_setup_cursor_space(), blender::eevee::CaptureView::render_probes(), blender::ed::sculpt_paint::SCULPT_layer_brush_height_preview_draw(), and blender::tests::TEST().
|
nodiscard |
Flip the matrix across its diagonal. Also flips dimensions for non square matrices.
Definition at line 651 of file BLI_math_matrix.hh.
References i, result, and blender::unroll().
Referenced by blender::ed::greasepencil::calculate_texture_space(), blender::ed::transform::SnapData::clip_planes_enable(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), blender::bke::CurvesSurfaceTransforms::CurvesSurfaceTransforms(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::ed::spreadsheet::format_matrix_to_grid(), blender::get_legacy_stroke_matrix(), blender::ed::greasepencil::grease_pencil_texture_gradient_exec(), blender::nodes::node_fn_transpose_matrix_cc::node_build_multi_function(), blender::draw::sculpt_batches_get_ex(), blender::bke::greasepencil::Drawing::set_texture_matrices(), blender::eevee::VolumeProbeModule::set_view(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::eevee::ShadowTileMap::sync_orthographic(), transform_normals(), transform_normals(), and blender::tests::transform_normals_test().
Definition at line 46 of file BLI_math_vector_types.hh.
References BLI_STATIC_ASSERT, result, and T.
Definition at line 851 of file math_color.cc.
References clamp(), i, interpolate(), blender::math::locus_entry_t::mired, normalize, planck_locus, blender::math::locus_entry_t::t, blender::math::locus_entry_t::uv, x, and y.
Referenced by blender::ocio::calculate_white_point_matrix(), blender::nodes::node_composite_colorbalance_cc::get_white_point_matrix(), IMB_colormanagement_get_whitepoint(), and blender::nodes::node_composite_colorbalance_cc::white_point_variable().
| bool blender::math::whitepoint_to_temp_tint | ( | const float3 & | white, |
| float & | temperature, | ||
| float & | tint ) |
Definition at line 820 of file math_color.cc.
References blender::math::locus_entry_t::dist(), dot(), i, interpolate(), length(), blender::math::locus_entry_t::mired, planck_locus, sqrtf, blender::math::locus_entry_t::t, and blender::math::locus_entry_t::uv.
Referenced by IMB_colormanagement_set_whitepoint().
| BLI_INLINE int blender::math::wrap_coord | ( | float | u, |
| int | size, | ||
| InterpWrapMode | wrap ) |
Definition at line 23 of file math_interp.cc.
References BLI_INLINE, Border, clamp(), Extend, floored_fmod(), Repeat, size(), wrap(), and x.
Referenced by bicubic_interpolation(), and interpolate_nearest_wrapmode_fl().
|
inlineconstexpr |
Definition at line 20 of file BLI_math_base.hh.
Referenced by blender::seq::gaussian_blur_x(), and blender::seq::gaussian_blur_y().
|
inlineconstexpr |
Definition at line 21 of file BLI_math_base.hh.
|
static |
Definition at line 801 of file math_color.cc.
Referenced by whitepoint_from_temp_tint(), and whitepoint_to_temp_tint().