Bone Getters Part 2/3, plus fixed warnings for MSVC

* add getters for frame poses

* fix missing joint in GetJointPose

* clean up models_iqm.cpp

* clean up usage of I_GetTimeFrac, split out matrix calculation into its own function

* clean up SetModelBoneRotationInternal

* clean up a few float <-> double and unsigned <-> signed warnings

* fix more warnings

* further clean up warnings

* split mode ObjectToWorldMatrix stuff

* initial work on bone getters, matrix hell

(the matrix/vec3 multiplications are probably wrong af, just gotta add more stuff 'till i can test it)

* clean up matrix math

* GetBone/TransformByBone

* fix GetBoneFramePose

* fix ObjectToWorldMatrix

* fix missing array resize

* raw matrix getters (for use with gutamatics/etc)

* reverse matrix mult order

* replace GetBoneLength/GetBoneDir with GetBoneBaseTRS

* fix GetBonePosition, remove GetBoneWorldMatrix as it's useless

* GetBonePosition

* deduplicate code

* rename GetBonePosition to GetBoneBasePosition to avoid confusion

* GetBoneBaseRotation

* GetBonePosition helper function

* forgot include_offsets
This commit is contained in:
Ricardo Luís Vaz Silva 2025-05-09 17:06:16 -03:00 committed by Nash Muhandes
commit d5f5c71d67
33 changed files with 1065 additions and 220 deletions

View file

@ -416,7 +416,7 @@ static int actioncmp(void *_ap1,void *_ap2)
rc = ap1->x.rp->index - ap2->x.rp->index;
}
if( rc==0 ){
rc = ap2 - ap1;
rc = (int)(ap2 - ap1);
}
return rc;
}
@ -1957,7 +1957,7 @@ static int handleswitch(int i, FILE *err)
if( err ){
fprintf(err,
"%sillegal character in floating-point argument.\n",emsg);
errline(i,((size_t)end)-(size_t)argv[i],err);
errline(i,(int)(((size_t)end)-(size_t)argv[i]),err);
}
errcnt++;
}
@ -1968,7 +1968,7 @@ static int handleswitch(int i, FILE *err)
if( *end ){
if( err ){
fprintf(err,"%sillegal character in integer argument.\n",emsg);
errline(i,((size_t)end)-(size_t)argv[i],err);
errline(i,(int)(((size_t)end)-(size_t)argv[i]),err);
}
errcnt++;
}