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 GitHub
commit 9e2b1f9c4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 1109 additions and 261 deletions

View file

@ -680,14 +680,14 @@ int PClass::FindVirtualIndex(FName name, PFunction::Variant *variant, PFunction
auto vproto = Virtuals[i]->Proto;
auto &vflags = Virtuals[i]->ArgFlags;
int n = flags.size();
int n = flags.SSize();
bool flagsOk = true;
for(int i = 0; i < n; i++)
{
int argA = i >= vflags.size() ? 0 : vflags[i];
int argB = i >= flags.size() ? 0 : flags[i];
int argA = i >= vflags.SSize() ? 0 : vflags[i];
int argB = i >= flags.SSize() ? 0 : flags[i];
bool AisRef = argA & (VARF_Out | VARF_Ref);
bool BisRef = argB & (VARF_Out | VARF_Ref);