Age | Commit message (Collapse) | Author |
|
|
|
There was no simple way to get the shortest quaternion angle.
|
|
Single axis version of mat3_from_axis_conversion,
when the second axis isn't important (orienting an arrow for eg).
|
|
- Remove 'rotate_m2', unlike 'rotate_m4' it created a new matrix
duplicating 'angle_to_mat2' - now used instead.
(better avoid matching functions having different behavior).
- Add 'axis_angle_to_mat4_single',
convenience wrapper for 'axis_angle_to_mat3_single'.
- Replace 'unit_m4(), rotate_m4()' with a single call to 'axis_angle_to_mat4_single'.
|
|
Many uses of matrices for rotation keep them normalized,
so no need to normalize each time.
|
|
When the quat is known to be unit length, so we can avoid scaling
(just conjugate_qt which asserts on non unit quats).
|
|
Useful to avoid defining a vector for an axis-aligned rotation.
Matches axis_angle_to_mat3_single behavior.
|
|
Added conversion to and from exponential map representation. This
representation is useful for interpolation of > 2 quaternions, or in
PD controllers.
Implementation in C functions quat_to_expmap,
quat_normalized_to_expmap, and expmap_to_quat with Python API, unit
tests and documentation.
Added Quaternion.to_exponential_map() and Quaternion(3-vector) to
Python API.
Reviewers: campbellbarton
Projects: #bf_blender
Differential Revision: https://developer.blender.org/D1049
|
|
Use axis/angle calculation but avoid calls to sin/cos
|
|
- behaves like rotation_between_vecs_to_quat
- avoids calling sin,cos calls (approx 1.6x faster).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this matches closer to convention from existing functions - angle_v3v3() angle_normalized_v3v3().
also added assert to ensure argument given to axis_angle_normalized_to_mat3() is in fact normalized.
|
|
It has much better rotation and avoids the compression effect that old
twist brushes have. Also twisting is now non periodic, meaning you can
twist beyond 180 degrees. The amount of twist is also calculated
relative to the angle formed after first translating the mouse away from
the brush center.
|
|
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
|
|
made bone roll get compatible angle values with the original roll.
|
|
supports MDD and PC2 formats.
see wiki docs:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Deform/Mesh_Cache
|
|
|
|
concave ngons could flip the dupliface, now use the faces normal when calculating the dupli-face.
|
|
var in math_rotation.c
|
|
|
|
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
- Added support of variable size sensor width and height.
- Added presets for most common cameras, also new presets can be defined by user.
- Added option to control which dimension (vertical or horizontal) of sensor
size defines FOV. Old behavior of automatic FOV calculation is also kept.
- Renderer, viewport, game engine and collada importer/exporter should
deal fine with this changes. Other exporters would be updated soon.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
single_axis_angle_to_mat3(mat3, axis, angle), copied out from mathutils, axis arg is a char 'X/Y/Z' rather then a vector like axis_angle_to_mat3().
|
|
|
|
use with mathutils.
|
|
floats (in most cases) otherwise cast to double.
|
|
|
|
|
|
rotation (only functional change of this commit).
- use BLI_math functions for removing rotations from objects and pose channels.
- add unit_axis_angle() to avoid setting the Y axis inline anywhere rotation needs removing.
|
|
|
|
where normalized quat was incorrectly assumed.
This would have made bug #25003 very simple to find.
- Objects had their quats normalized when calculating their matrix, this is inconstant with pose bones and isn't useful for animation.
Also it wasn't normalizing the delta rotation so these would give bad rotations.
- Converting between rotation modes BKE_rotMode_change_values() assumed normal length quat. changing quat to euler rotation for eg could change the bone.
- Clear rotation and transform were not normalizing the quat when 4d loc was disabled on quat rotation, corrected and also made it so the quat scale is restored after conversion so animations curves dont jump.
There is 1 case in mat3_to_quat_is_ok() where quat_to_mat3 on an unnormalized quat is needed, for this I had to add an ugly static function quat_to_mat3_no_assert(), but overall its worthwhile IMHO to be able to find incorrect use of rotation conversion.
|
|
|
|
- armature_mat_pose_to_bone() was missing axis-angle check.
- added loc_axisangle_size_to_mat4() for completeness.
- use 'const' prefix where possible in math rotation functions.
|
|
Curve.
use the curve's twist for follow path constraint and parent-path.
|
|
|
|
|
|
quat * quat was returning the dot product (a float), rather then the cross product.
Use BLI_math's mul_qt_qtqt() function.
|
|
also moved rotation_between_quats_to_quat into BLI_math from python mathutils.
|
|
|
|
|