[770c98]: / Application / MocapExamples / BVH_Xsens_OptimizeOrigin / CalculateSegmentDimensionsFromBVH.any

Download this file

40 lines (37 with data), 2.2 kB

#ifndef BVH_MODEL
#define BVH_MODEL Main.ModelSetup.BVHFileData.Model
#endif

Main.HumanModel.Anthropometrics.SegmentDimensions =
{
   PelvisWidth=vnorm(BVH_MODEL.Hips.Seg.RightHip.sRel
                    -BVH_MODEL.Hips.Seg.LeftHip.sRel); ///< distance between hip joints
   
   HeadHeight  = 0.75*vnorm( BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.Neck.Head.Seg.End_Site.sRel);///< height in neutral position from  C1HatNode to top of head
   TrunkHeight = 1.08*(//vnorm(BVH_MODEL.Hips.Seg.Chest.sRel) +
                  vnorm(BVH_MODEL.Hips.Chest.Seg.Chest2.sRel)
                 + vnorm(BVH_MODEL.Hips.Chest.Chest2.Seg.Chest3.sRel) 
                 + vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Seg.Chest4.sRel)
                 + vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.Seg.Neck.sRel)
                 + vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.Neck.Seg.Head.sRel));
   Right = 
   {
     ThighLength = vnorm(BVH_MODEL.Hips.RightHip.Seg.RightKnee.sRel);  
     ShankLength = vnorm(BVH_MODEL.Hips.RightHip.RightKnee.Seg.RightAnkle.sRel);
     FootLength = vnorm(BVH_MODEL.Hips.RightHip.RightKnee.RightAnkle.Seg.RightToe.sRel) 
                  + vnorm(BVH_MODEL.Hips.RightHip.RightKnee.RightAnkle.RightToe.Seg.End_Site.sRel);
     UpperArmLength = vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.RightCollar.RightShoulder.Seg.RightElbow.sRel);
     LowerArmLength = vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.RightCollar.RightShoulder.RightElbow.Seg.RightWrist.sRel);
     HandLength = 0.18;
     HandBreadth = 0.085;
   };
   Left = 
   {
     ThighLength = vnorm(BVH_MODEL.Hips.LeftHip.Seg.LeftKnee.sRel);  
     ShankLength = vnorm(BVH_MODEL.Hips.LeftHip.LeftKnee.Seg.LeftAnkle.sRel);
     FootLength = vnorm(BVH_MODEL.Hips.LeftHip.LeftKnee.LeftAnkle.Seg.LeftToe.sRel) 
                  + vnorm(BVH_MODEL.Hips.LeftHip.LeftKnee.LeftAnkle.LeftToe.Seg.End_Site.sRel);
     UpperArmLength = vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.LeftCollar.LeftShoulder.Seg.LeftElbow.sRel);
     LowerArmLength = vnorm(BVH_MODEL.Hips.Chest.Chest2.Chest3.Chest4.LeftCollar.LeftShoulder.LeftElbow.Seg.LeftWrist.sRel);
     HandLength = 0.18;
     HandBreadth = 0.085;
   }; 
};