Blender V4.3
IK_QJacobian.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "IK_Math.h"
12
14 public:
17
18 // Call once to initialize
19 void ArmMatrices(int dof, int task_size);
20 void SetDoFWeight(int dof, double weight);
21
22 // Iteratively called
23 void SetBetas(int id, int size, const Vector3d &v);
24 void SetDerivatives(int id, int dof_id, const Vector3d &v, double norm_weight);
25
26 void Invert();
27
28 double AngleUpdate(int dof_id) const;
29 double AngleUpdateNorm() const;
30
31 // DoF locking for inner clamping loop
32 void Lock(int dof_id, double delta);
33
34 // Secondary task
36
37 void Restrict(VectorXd &d_theta, MatrixXd &nullspace);
38 void SubTask(IK_QJacobian &jacobian);
39
40 private:
41 void InvertSDLS();
42 void InvertDLS();
43
44 int m_dof, m_task_size;
45 bool m_transpose;
46
47 // the jacobian matrix and its null space projector
48 MatrixXd m_jacobian, m_jacobian_tmp;
49 MatrixXd m_nullspace;
50
52 VectorXd m_beta;
53
55 VectorXd m_d_theta;
56 VectorXd m_d_norm_weight;
57
59 VectorXd m_svd_w;
60 MatrixXd m_svd_v;
61 MatrixXd m_svd_u;
62
63 VectorXd m_svd_u_beta;
64
65 // space required for SDLS
66
67 bool m_sdls;
68 VectorXd m_norm;
69 VectorXd m_d_theta_tmp;
70 double m_min_damp;
71
72 // null space task vector
73 VectorXd m_alpha;
74
75 // dof weighting
76 VectorXd m_weight;
77 VectorXd m_weight_sqrt;
78};
ATTR_WARN_UNUSED_RESULT const BMVert * v
void Lock(int dof_id, double delta)
void SetDerivatives(int id, int dof_id, const Vector3d &v, double norm_weight)
void SetDoFWeight(int dof, double weight)
void Restrict(VectorXd &d_theta, MatrixXd &nullspace)
void SubTask(IK_QJacobian &jacobian)
double AngleUpdateNorm() const
void SetBetas(int id, int size, const Vector3d &v)
double AngleUpdate(int dof_id) const
void ArmMatrices(int dof, int task_size)
bool ComputeNullProjection()