public static Planes GetPlanes(Dictionary <JointType, Joint> joints) { CameraSpacePoint spineBase = joints[JointType.SpineBase].Position; CameraSpacePoint spineMid = joints[JointType.SpineMid].Position; CameraSpacePoint horizontalPlane = LinearAlgebra.Normalize(LinearAlgebra.Sub(spineMid, spineBase)); CameraSpacePoint hipToHip = LinearAlgebra.Normalize(LinearAlgebra.Sub(joints[JointType.HipLeft].Position, joints[JointType.HipRight].Position)); // difference between both hips CameraSpacePoint sagittalPlane = LinearAlgebra.Normalize(LinearAlgebra.CrossProduct(horizontalPlane, hipToHip)); CameraSpacePoint frontalPlane = LinearAlgebra.Normalize(LinearAlgebra.CrossProduct(horizontalPlane, sagittalPlane)); Planes planes = new Planes(horizontalPlane, sagittalPlane, frontalPlane); return(planes); }