X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FSkeleton.h;h=63e1ad6239a6cb69d9284abda3a539e0b9017c89;hb=5931bd1edf827e8645f89b5a4a16585cb25bc6e1;hp=20429af422d25f778ffd8bf335d04beee38140aa;hpb=1eec4500c708d0619abf36759454f59fa175cacf;p=lugaru.git diff --git a/Source/Skeleton.h b/Source/Skeleton.h index 20429af..63e1ad6 100644 --- a/Source/Skeleton.h +++ b/Source/Skeleton.h @@ -221,9 +221,12 @@ public: ~Skeleton(); private: - Joint& joint(int bodypart); - XYZ& jointPos(int bodypart); - XYZ& jointVel(int bodypart); + // convenience functions + // only for Skeleton.cpp + inline Joint& joint(int bodypart) { return joints[jointlabels[bodypart]]; } + inline XYZ& jointPos(int bodypart) { return joint(bodypart).position; } + inline XYZ& jointVel(int bodypart) { return joint(bodypart).velocity; } + }; #endif