|
Blender V4.3
|
#include "testing/testing.h"#include "BLI_math_base.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_rotation.hh"#include "BLI_math_rotation_legacy.hh"#include "BLI_math_vector.hh"#include "BLI_vector.hh"#include <cmath>Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::math |
| namespace | blender::math::tests |
Functions | |
| static void | test_quat_to_mat_to_quat (float w, float x, float y, float z) |
| TEST (math_rotation, quat_to_mat_to_quat_rot180) | |
| TEST (math_rotation, quat_to_mat_to_quat_rot180n) | |
| TEST (math_rotation, quat_to_mat_to_quat_rot90) | |
| TEST (math_rotation, quat_to_mat_to_quat_rot90n) | |
| TEST (math_rotation, quat_to_mat_to_quat_bad_T83196) | |
| TEST (math_rotation, quat_to_mat_to_quat_bad_negative) | |
| TEST (math_rotation, quat_to_mat_to_quat_near_1000) | |
| TEST (math_rotation, quat_to_mat_to_quat_near_0100) | |
| TEST (math_rotation, quat_to_mat_to_quat_near_0010) | |
| TEST (math_rotation, quat_to_mat_to_quat_near_0001) | |
| TEST (math_rotation, quat_to_mat_to_quat_zeroed_matrix) | |
| TEST (math_rotation, quat_split_swing_and_twist_negative) | |
| TEST (math_rotation, mat3_normalized_to_quat_fast_degenerate) | |
| blender::math::tests::TEST (math_rotation, DefaultConstructor) | |
| blender::math::tests::TEST (math_rotation, RotateDirectionAroundAxis) | |
| blender::math::tests::TEST (math_rotation, AxisAngleConstructors) | |
| blender::math::tests::TEST (math_rotation, QuaternionDot) | |
| blender::math::tests::TEST (math_rotation, QuaternionConjugate) | |
| blender::math::tests::TEST (math_rotation, QuaternionNormalize) | |
| blender::math::tests::TEST (math_rotation, QuaternionInvert) | |
| blender::math::tests::TEST (math_rotation, QuaternionCanonicalize) | |
| blender::math::tests::TEST (math_rotation, QuaternionAngleBetween) | |
| blender::math::tests::TEST (math_rotation, QuaternionPower) | |
| blender::math::tests::TEST (math_rotation, QuaternionFromTriangle) | |
| blender::math::tests::TEST (math_rotation, QuaternionFromVector) | |
| blender::math::tests::TEST (math_rotation, QuaternionWrappedAround) | |
| blender::math::tests::TEST (math_rotation, QuaternionFromTracking) | |
| blender::math::tests::TEST (math_rotation, EulerWrappedAround) | |
| blender::math::tests::TEST (math_rotation, Euler3ToGimbal) | |
| blender::math::tests::TEST (math_rotation, CartesianBasis) | |
| blender::math::tests::TEST (math_rotation, Transform) | |
| blender::math::tests::TEST (math_rotation, DualQuaternionNormalize) | |
| blender::math::tests::TEST (math_rotation, DualQuaternionFromMatrix) | |
| blender::math::tests::TEST (math_rotation, DualQuaternionTransform) | |
| blender::math::tests::TEST (math_axis_angle, AxisAngleFromQuaternion) | |
Test <tt>sin_cos_from_fraction</tt> Accuracy & Exact Symmetry | |
| static void | test_sin_cos_from_fraction_accuracy (const int range, const float expected_eps) |
| TEST (math_rotation, sin_cos_from_fraction_accuracy) | |
| static void | test_sin_cos_from_fraction_symmetry (const int range) |
| TEST (math_rotation, sin_cos_from_fraction_symmetry) | |
| TEST | ( | math_rotation | , |
| mat3_normalized_to_quat_fast_degenerate | ) |
Definition at line 174 of file BLI_math_rotation_test.cc.
References dot_qtqt(), and mat3_normalized_to_quat_fast().
| TEST | ( | math_rotation | , |
| quat_split_swing_and_twist_negative | ) |
Definition at line 160 of file BLI_math_rotation_test.cc.
References M_PI, quat_split_swing_and_twist(), and sqrtf.
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_bad_negative | ) |
Definition at line 83 of file BLI_math_rotation_test.cc.
References sqrtf, and test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_bad_T83196 | ) |
Definition at line 74 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_near_0001 | ) |
Definition at line 131 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_near_0010 | ) |
Definition at line 117 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_near_0100 | ) |
Definition at line 103 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_near_1000 | ) |
Definition at line 89 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_rot180 | ) |
Definition at line 36 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_rot180n | ) |
Definition at line 44 of file BLI_math_rotation_test.cc.
References test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_rot90 | ) |
Definition at line 52 of file BLI_math_rotation_test.cc.
References sqrtf, and test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_rot90n | ) |
Definition at line 63 of file BLI_math_rotation_test.cc.
References sqrtf, and test_quat_to_mat_to_quat().
| TEST | ( | math_rotation | , |
| quat_to_mat_to_quat_zeroed_matrix | ) |
Definition at line 146 of file BLI_math_rotation_test.cc.
References mat3_normalized_to_quat(), quat_to_mat3(), and unit_m3().
| TEST | ( | math_rotation | , |
| sin_cos_from_fraction_accuracy | ) |
Ensure the result of sin_cos_from_fraction match sinf & cosf.
Definition at line 216 of file BLI_math_rotation_test.cc.
References test_sin_cos_from_fraction_accuracy().
| TEST | ( | math_rotation | , |
| sin_cos_from_fraction_symmetry | ) |
Definition at line 292 of file BLI_math_rotation_test.cc.
References test_sin_cos_from_fraction_symmetry().
Definition at line 19 of file BLI_math_rotation_test.cc.
References mat3_normalized_to_quat(), mul_qt_fl(), normalize_qt_qt(), quat_to_mat3(), w(), x, y, and z().
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
static |
Definition at line 204 of file BLI_math_rotation_test.cc.
References cosf, float, M_PI, range, sin_cos_from_fraction(), and sinf.
Referenced by TEST().
|
static |
Ensure values are exactly symmetrical where possible.
Definition at line 224 of file BLI_math_rotation_test.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), b, blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::Vector< T, InlineBufferCapacity, Allocator >::end(), fabsf, range, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), and sin_cos_from_fraction().
Referenced by TEST().