[bfdf16]: / Body / AAUHuman / Trunk / InitialPositions.any

Download this file

70 lines (61 with data), 2.8 kB

#include "InitialPositionsPelvis.any"

//Thorax
 SegmentsThorax.T12Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
 RotMat((pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
 RotMat((pi/180 )*JointPos.PelvisThoraxRotation ,y)*
 RotMat((pi/180 )*JointPos.PelvisThoraxLateralBending ,x)*
 SegmentsThorax.T12Seg.AnatomicalFrameTrunk.ARel';

//This is a rough approximation
//L1Seg 
 SegmentsLumbar.L1Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
RotMat(5/6*(pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
RotMat(5/6*(pi/180 )*JointPos.PelvisThoraxRotation ,y)*
RotMat(5/6*(pi/180 )*JointPos.PelvisThoraxLateralBending ,x);
//L2Seg
 SegmentsLumbar.L2Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
RotMat(4/6*(pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
RotMat(4/6*(pi/180 )*JointPos.PelvisThoraxRotation ,y)*
RotMat(4/6*(pi/180 )*JointPos.PelvisThoraxLateralBending ,x);
//L3Seg
 SegmentsLumbar.L3Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
RotMat(3/6*(pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
RotMat(3/6*(pi/180 )*JointPos.PelvisThoraxRotation ,y)*
RotMat(3/6*(pi/180 )*JointPos.PelvisThoraxLateralBending ,x);
//L4Seg
 SegmentsLumbar.L4Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
RotMat(2/6*(pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
RotMat(2/6*(pi/180 )*JointPos.PelvisThoraxRotation ,y)*
RotMat(2/6*(pi/180 )*JointPos.PelvisThoraxLateralBending ,x);
//L5Seg
 SegmentsLumbar.L5Seg.Axes0=
 SegmentsLumbar.PelvisSeg.Axes0*
 SegmentsLumbar.PelvisSeg.AnatomicalFrameTrunk.ARel*
RotMat(1/6*(pi/180 )*JointPos.PelvisThoraxExtension ,z)* 
RotMat(1/6*(pi/180 )*JointPos.PelvisThoraxRotation ,y)*
RotMat(1/6*(pi/180 )*JointPos.PelvisThoraxLateralBending ,x);

//Cervical segments
 SegmentsCervicalSpine.C1Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C2Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C3Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C4Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C5Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C6Seg.Axes0= SegmentsThorax.T1Seg.Axes0;
 SegmentsCervicalSpine.C7Seg.Axes0= SegmentsThorax.T1Seg.Axes0;


//SkullSeg
 SegmentsCervicalSpine.SkullSeg.Axes0=
 SegmentsCervicalSpine.C1Seg.Axes0*
 SegmentsCervicalSpine.C1Seg.C1C0JntNode.ARel*
RotMat((pi/180 )*JointPos.NeckExtension,z)* 
RotMat((pi/180 )*JointPos.NeckRotation,y)* 
RotMat((pi/180 )*JointPos.NeckLateralBending,x)* 
 SegmentsCervicalSpine.SkullSeg.NeckNode.ARel';