66 #define ANIM_FEEDBACK 0.8
231 bPoseChannel *curchan, *pchan_root =
nullptr, *chanlist[256], **oldchan;
235 int a,
t, segcount = 0,
size, newsize, *oldparent, parent, rootbone, treecount;
241 pchan_tip = pchan_tip->
parent;
244 rootbone =
data->rootbone;
246 for (curchan = pchan_tip; curchan; curchan = curchan->
parent) {
247 pchan_root = curchan;
249 if (++segcount > 255) {
253 if (segcount == rootbone) {
279 for (rootbone = segcount, segcount = 0, curchan = pchan_tip; segcount < rootbone;
280 segcount++, curchan = curchan->
parent) {
281 chanlist[segcount] = curchan;
297 tree->iterations =
data->iterations;
298 tree->totchannel = segcount;
302 tree->parent = (
int *)
MEM_callocN(segcount *
sizeof(
int),
"ik tree parent");
303 for (
a = 0;
a < segcount;
a++) {
304 tree->pchan[
a] = chanlist[segcount -
a - 1];
307 target->
tip = segcount - 1;
321 while (
a <
size && t < tree->totchannel) {
323 for (;
t <
tree->totchannel &&
tree->pchan[
t] != chanlist[segcount -
a - 1];
t++) {
326 if (
t >=
tree->totchannel) {
329 for (;
a <
size &&
t <
tree->totchannel &&
tree->pchan[
t] == chanlist[segcount -
a - 1];
335 segcount = segcount -
a;
336 target->
tip =
tree->totchannel + segcount - 1;
339 for (parent =
a - 1; parent <
tree->totchannel; parent++) {
340 if (
tree->pchan[parent] == chanlist[segcount - 1]->parent) {
346 if (parent ==
tree->totchannel) {
351 newsize =
tree->totchannel + segcount;
352 oldchan =
tree->pchan;
353 oldparent =
tree->parent;
356 tree->parent = (
int *)
MEM_callocN(newsize *
sizeof(
int),
"ik tree parent");
357 memcpy(
tree->pchan, oldchan,
sizeof(
void *) *
tree->totchannel);
358 memcpy(
tree->parent, oldparent,
sizeof(
int) *
tree->totchannel);
363 for (
a = 0;
a < segcount;
a++) {
364 tree->pchan[
tree->totchannel +
a] = chanlist[segcount -
a - 1];
367 tree->parent[
tree->totchannel] = parent;
369 tree->totchannel = newsize;
401 if (
data->tar ==
nullptr) {
470 double qy =
R(0, 2) -
R(2, 0);
471 double qw =
R(0, 0) +
R(1, 1) +
R(2, 2) + 1;
614 next.setValue(&tarmat[0][0]);
646 next.setValue(&rootmat[0][0]);
688 double q_rest[3], q[3],
length;
712 polerot.
UnitZ(-poledir);
724 unsigned int _nvalues,
769 unsigned int nvalues,
778 for (i = 0,
error = 0.0, value = values->
values; i < values->number; i++, value++) {
786 for (i = 0,
error = 0.0, value = values->
values; i < values->number; i++, value++) {
796 unsigned int _nvalues,
813 switch (condata->
mode) {
826 switch (condata->
mode) {
846 unsigned int _nvalues,
854 unsigned int _nvalues,
870 if (chan->rotmode > 0) {
929 for (
unsigned int i = 0; i < _nvalues; i++, dof++) {
931 _values[i].
alpha = chan->ikrotweight;
949 for (
a = 0, ikchan = ikscene->
channels; a < ikscene->numchan;
a++, ikchan++) {
950 pchan =
tree->pchan[
a];
951 ikchan->
pchan = pchan;
1063 njoint += ikchan->
ndof;
1087 for (joint =
a = 0, ikchan = ikscene->
channels;
1088 a < ikscene->numchan && joint < ikscene->numjoint;
1090 pchan = ikchan->
pchan;
1110 joint += ikchan->
ndof;
1130 for (joint =
a = 0, ikchan = ikscene->
channels;
1131 a < ikscene->numchan && joint < ikscene->numjoint;
1133 pchan = ikchan->
pchan;
1140 joint += ikchan->
ndof;
1165 if (
tree->totchannel == 0) {
1175 ikscene->numchan =
tree->totchannel;
1176 ikscene->armature = arm;
1177 ikscene->scene =
scene;
1190 switch (ikparam->solver) {
1201 ikscene->blArmature = ob;
1204 ikscene->blInvScale = (ikscene->blScale <
KDL::epsilon) ? 0.0f : 1.0f / ikscene->blScale;
1207 std::string root(
"root");
1209 std::vector<double> weights;
1215 rot = ikscene->jointArray(0);
1217 for (
a = 0, ikchan = ikscene->channels; a < tree->totchannel;
a++, ikchan++) {
1218 pchan = ikchan->pchan;
1225 fl[0][0], fl[1][0], fl[2][0], fl[0][1], fl[1][1], fl[2][1], fl[0][2], fl[1][2], fl[2][2]);
1230 float R_parmat[3][3];
1231 float iR_parmat[3][3];
1242 start[0] = start[1] = start[2] = 0.0f;
1249 bpos *= ikscene->blScale;
1253 length = bone->length * ikscene->blScale;
1254 parent = (
a > 0) ? ikscene->channels[
tree->parent[
a]].tail : root;
1267 weight[0] = (1.0 - pchan->
stiffness[0]);
1268 weight[1] = (1.0 - pchan->
stiffness[1]);
1269 weight[2] = (1.0 - pchan->
stiffness[2]);
1270 switch (ikchan->jointType & ~
IK_TRANSY) {
1280 weights.push_back(weight[0]);
1286 weights.push_back(weight[1]);
1292 weights.push_back(weight[2]);
1297 weights.push_back(weight[0]);
1303 weights.push_back(weight[1]);
1309 weights.push_back(weight[0]);
1310 weights.push_back(weight[2]);
1316 weights.push_back(weight[2]);
1322 weights.push_back(weight[1]);
1329 weights.push_back(weight[0]);
1330 weights.push_back(weight[2]);
1336 weights.push_back(weight[1]);
1342 weights.push_back(weight[0]);
1343 weights.push_back(weight[1]);
1344 weights.push_back(weight[2]);
1354 weight[1] = (1.0 -
min_ff(1.0 - ikstretch, 1.0f - 0.001f));
1355 weights.push_back(weight[1]);
1362 ikchan->tail = joint;
1363 ikchan->head = parent;
1370 if (arm->addLimitConstraint(joint, 0, pchan->
limitmin[0], pchan->
limitmax[0]) < 0) {
1375 if (arm->addConstraint(joint,
joint_callback, ikchan,
false,
false) < 0) {
1384 if (arm->addLimitConstraint(joint, 0, pchan->
limitmin[1], pchan->
limitmax[1]) < 0) {
1389 if (arm->addConstraint(joint,
joint_callback, ikchan,
false,
false) < 0) {
1398 if (arm->addLimitConstraint(joint, 0, pchan->
limitmin[2], pchan->
limitmax[2]) < 0) {
1403 if (arm->addConstraint(joint,
joint_callback, ikchan,
false,
false) < 0) {
1408 if ((ikchan->jointType &
IK_SWING) &&
1413 if (arm->addLimitConstraint(joint, 0, pchan->
limitmin[0], pchan->
limitmax[0]) < 0) {
1418 if (arm->addLimitConstraint(joint, 1, pchan->
limitmin[2], pchan->
limitmax[2]) < 0) {
1423 if (arm->addConstraint(joint,
joint_callback, ikchan,
false,
false) < 0) {
1431 if (arm->addConstraint(joint,
joint_callback, ikchan,
false,
false) < 0) {
1437 rot += ikchan->ndof;
1444 for (numtarget = 0, polarcon =
nullptr,
ret =
true, target = (
PoseTarget *)
tree->targets.first;
1448 pchan =
tree->pchan[target->tip];
1453 ikscene->targets.push_back(iktarget);
1454 iktarget->
ee = arm->addEndEffector(ikscene->channels[target->tip].tail);
1455 if (iktarget->
ee == -1) {
1461 iktarget->
channel = target->tip;
1463 iktarget->
rootChannel = ikscene->channels[0].pchan;
1464 iktarget->
owner = ob;
1472 if (condata->poletar) {
1474 polarcon = target->con;
1479 if (numtarget == 1 && polarcon) {
1480 ikscene->polarConstraint = polarcon;
1488 std::string armname;
1491 ret =
scene->addObject(armname, ikscene->base);
1495 ret =
scene->addObject(armname, ikscene->armature, ikscene->base);
1503 assert(Wq.cols() == (
int)weights.size());
1504 for (
int q = 0; q < Wq.cols(); q++) {
1505 Wq(q, q) = weights[q];
1511 float invBaseFrame[4][4];
1512 pchan = ikscene->channels[0].pchan;
1515 float baseFrame[4][4];
1526 for (
t = 0;
t < ikscene->targets.size();
t++) {
1532 unsigned int controltype, bonecnt;
1538 for (bonecnt = 0, bonelen = 0.0f,
a = iktarget->
channel;
a >= 0;
1539 a =
tree->parent[
a], bonecnt++) {
1540 bonelen += ikscene->blScale *
tree->pchan[
a]->bone->length;
1561 switch (condata->type) {
1607 ikscene->channels[iktarget->
channel].tail);
1614 ikscene->channels[iktarget->
channel].tail);
1631 ikscene->channels[iktarget->
channel].tail);
1638 if (!
ret || !
scene->addCache(ikscene->cache) || !
scene->addSolver(ikscene->solver) ||
1639 !
scene->initialize()) {
1661 ikdata->
first = ikscene;
1673 if (
tree->basis_change) {
1711 for (i = 0, ikchan = ikscene->
channels; i < ikscene->numchan; i++, ikchan++) {
1721 for (i = 0, ikchan = ikscene->
channels; i < ikscene->numchan; i++, ikchan++) {
1733 for (i = ikscene->
targets.size(); i > 0; i--) {
1745 double timestamp = ctime * frtime + 2147483.648;
1746 double timestep = frtime;
1780 timestep = sts / 1000.0;
1787 for (i = 0; i < ikparam->
numiter; i++) {
1796 ikscene->
scene->
update(timestamp, 0.0, 1,
true,
true,
true);
1800 for (i = ikscene->
targets.size(); i > 0; i--) {
1803 unsigned int nvalues;
1817 double q_rest[3], q[3];
1824 for (i = 0, ikchan = ikscene->
channels; i < ikscene->numchan; i++, ikchan++) {
1841 if (!arm->
getSegment(ikchan->
tail, 3, joint, q_rest[0], q[0], tip)) {
1846 scale = (
float)(q[0] / q_rest[0]);
1856 pchan = ikchan->
pchan;
1874 if (i < ikscene->numchan) {
1930 if (ikscene->channels[0].pchan == pchan_root) {
1964 scene->cache->clearCacheFrom(
nullptr, 1);
1976 double armlength = ikscene->armature->getArmLength();
1983 ikscene->armature->setControlParameter(
1992 ikscene->armature->setControlParameter(
2008 switch (
data->type) {
typedef float(TangentPoint)[2]
Blender kernel action and pose functionality.
void BKE_pose_itasc_init(struct bItasc *itasc)
void BKE_pose_where_is_bone(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, bool do_extra)
void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph, struct Scene *scene, struct bConstraint *con, int index, short ownertype, void *ownerdata, float mat[4][4], float ctime)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE float min_ff(float a, float b)
void mul_m3_v3(const float M[3][3], float r[3])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m3(float m[3][3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void mul_m4_m4m3(float R[4][4], const float A[4][4], const float B[3][3])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
#define mul_m4_series(...)
bool invert_m3_m3(float R[3][3], const float A[3][3])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void blend_m4_m4m4(float out[4][4], const float dst[4][4], const float src[4][4], const float srcweight)
void normalize_m4(float R[4][4]) ATTR_NONNULL()
float normalize_qt(float q[4])
void eulO_to_mat3(float mat[3][3], const float eul[3], const short order)
void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
void quat_to_mat3(float mat[3][3], const float q[4])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
#define CONSTRAINT_ID_ALL
struct Depsgraph Depsgraph
@ ITASC_INITIAL_REITERATION
@ CONSTRAINT_IK_TARGETAXIS
@ CONSTRAINT_TYPE_KINEMATIC
@ CONSTRAINT_OBTYPE_OBJECT
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Distance
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
represents a frame transformation in 3D space (rotation + translation)
Rotation M
Orientation of the Frame.
void setValue(float *oglmat)
void getValue(float *oglmat) const
Vector p
origine of the Frame
void resize(unsigned int newSize)
This class encapsulates a simple joint, that is with one parameterized degree of freedom and with sca...
const JointType & getType() const
represents rotations in 3 dimensional space.
Rotation Inverse() const
Gives back the inverse rotation matrix of *this.
Vector UnitY() const
Access to the underlying unitvectors of the rotation matrix.
Vector UnitZ() const
Access to the underlying unitvectors of the rotation matrix.
Vector UnitX() const
Access to the underlying unitvectors of the rotation matrix.
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
void setValue(float *oglmat)
static Rotation RotY(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
static Rotation RotZ(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
void GetValue(double *xy) const
store vector components in array
A concrete implementation of a 3 dimensional vector class.
void GetValue(double *xyz) const
store vector components in array
bool getRelativeFrame(Frame &result, const std::string &segment_name, const std::string &base_name=m_root)
virtual const Frame & getPose(const unsigned int end_effector)
bool getSegment(const std::string &segment_name, const unsigned int q_size, const Joint *&p_joint, double &q_rest, double &q, const Frame *&p_tip)
double getMaxEndEffectorChange()
virtual bool setJointArray(const KDL::JntArray &joints)
double getMaxJointChange()
const void * getPreviousCacheItem(const void *device, int channel, CacheTS *timestamp)
bool setControlParameter(int id, ConstraintAction action, double value, double timestep=0.0)
void substep(bool _substep)
virtual EIGEN_MAKE_ALIGNED_OPERATOR_NEW bool registerCallback(ConstraintCallback _function, void *_param)
virtual const ConstraintValues * getControlParameters(unsigned int *_nvalues)=0
virtual const unsigned int getNrOfConstraints()
bool setCallback(MovingFrameCallback _function, void *_param)
virtual const KDL::Frame & getPose(const unsigned int end_effector=0)
bool update(double timestamp, double timestep, unsigned int numsubstep=1, bool reiterate=false, bool cache=true, bool interpolate=true)
virtual void setParam(SolverParam param, double value)=0
const Depsgraph * depsgraph
IMETHOD void SetToZero(Vector &v)
static void execute_scene(struct Depsgraph *depsgraph, Scene *blscene, IK_Scene *ikscene, bItasc *ikparam, float ctime, float frtime)
static void RemoveEulerAngleFromMatrix(KDL::Rotation &R, double angle, int axis)
static void distance_error(const iTaSC::ConstraintValues *values, unsigned int _nvalues, IK_Target *iktarget)
void itasc_clear_cache(struct bPose *pose)
static int init_scene(Object *ob)
static IK_Data * get_ikdata(bPose *pose)
static bool target_callback(const iTaSC::Timestamp ×tamp, const iTaSC::Frame ¤t, iTaSC::Frame &next, void *param)
void itasc_clear_data(struct bPose *pose)
static bool base_callback(const iTaSC::Timestamp ×tamp, const iTaSC::Frame ¤t, iTaSC::Frame &next, void *param)
static void BKE_pose_rest(IK_Scene *ikscene)
static void convert_pose(IK_Scene *ikscene)
static bool copypose_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, unsigned int _nvalues, void *_param)
void itasc_update_param(struct bPose *pose)
static int convert_channels(struct Depsgraph *depsgraph, IK_Scene *ikscene, PoseTree *tree, float ctime)
static int initialize_scene(Object *ob, bPoseChannel *pchan_tip)
static bool joint_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, unsigned int _nvalues, void *_param)
static void create_scene(struct Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime)
static bool constraint_valid(bConstraint *con)
void itasc_release_tree(struct Scene *scene, struct Object *ob, float ctime)
static void GetJointRotation(KDL::Rotation &boneRot, int type, double *rot)
static void copypose_error(const iTaSC::ConstraintValues *values, unsigned int nvalues, IK_Target *iktarget)
static double ComputeTwist(const KDL::Rotation &R)
void itasc_initialize_tree(struct Depsgraph *depsgraph, struct Scene *scene, Object *ob, float ctime)
static bool is_cartesian_constraint(bConstraint *con)
void(*)(const iTaSC::ConstraintValues *values, unsigned int nvalues, IK_Target *iktarget) ErrorCallback
void itasc_execute_tree(struct Depsgraph *depsgraph, struct Scene *scene, Object *ob, bPoseChannel *pchan_root, float ctime)
void itasc_test_constraint(struct Object *ob, struct bConstraint *cons)
static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *con)
static IK_Scene * convert_tree(struct Depsgraph *depsgraph, Scene *blscene, Object *ob, bPoseChannel *pchan, float ctime)
static double EulerAngleFromMatrix(const KDL::Rotation &R, int axis)
static bool distance_callback(const iTaSC::Timestamp ×tamp, iTaSC::ConstraintValues *const _values, unsigned int _nvalues, void *_param)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void error(const char *str)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
Vector Normalize(const Vector &, double eps=epsilon)
const double PI
the value of pi
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
INLINE Rall1d< T, V, S > sqr(const Rall1d< T, V, S > &arg)
struct bConstraint * polarConstraint
iTaSC::MovingFrame * base
iTaSC::Armature * armature
std::vector< IK_Target * > targets
struct Depsgraph * bldepsgraph
unsigned short controlType
std::string constraintName
struct bPoseChannel * rootChannel
iTaSC::ConstraintSet * constraint
struct bConstraint * blenderConstraint
struct Depsgraph * bldepsgraph
ErrorCallback errorCallback
iTaSC::MovingFrame * target
struct bConstraint * next
struct bPoseChannel * parent
struct bPoseChannel * next
struct ConstraintSingleValue * values
ccl_device_inline float2 fabs(const float2 &a)