public void AddPosition(CylLoad load, CylPosition pos) { Matrix4D matRot = Matrix4D.Identity; Vector3D vTranslation = Vector3D.Zero; if (_swapped) { matRot = new Matrix4D( 0.0, -1.0, 0.0, 0.0 , 1.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 1.0, 0.0 , 0.0, 0.0, 0.0, 1.0 ); vTranslation = new Vector3D(load.PalletLength, 0.0, 0.0); matRot.M14 = vTranslation[0]; matRot.M24 = vTranslation[1]; matRot.M34 = vTranslation[2]; } load.Add(pos.Transform(new Transform3D(matRot))); }